diff --git a/src/api/home/index.js b/src/api/home/index.js index cd571e8..34068e8 100644 --- a/src/api/home/index.js +++ b/src/api/home/index.js @@ -6,3 +6,10 @@ export const getHomeTaskInfo = () => { method: "get" }); }; +//获取已办数据 +export const getDoneTaskInfo = () => { + return request({ + url: '/workflow/mosr/process/task/about', + method: "get" + }); +}; diff --git a/src/api/research-fund/index.js b/src/api/research-fund/index.js index 15be2de..2a2c01e 100644 --- a/src/api/research-fund/index.js +++ b/src/api/research-fund/index.js @@ -1,10 +1,11 @@ import request from '@/utils/request.js' -export const getResearchFundChart = () => { +export const getResearchFundChart = (year) => { return request({ url: '/workflow/mosr/rd/home', method: 'get', + params: {year:year} }) } export const getResearchFundDetail = (rdFundId) => { diff --git a/src/views/home/index.vue b/src/views/home/index.vue index bb62fab..44deeed 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -23,13 +23,13 @@ 刷新一下
- +
- 您有{{ todoList.length }}条待办需要处理 + 您有{{ todoList?.length ||0}}条待办需要处理
查看更多 @@ -50,10 +50,11 @@ -
+
+
{{item.targetState=='00'?'征集名称':'项目名称'}}:{{ item.targetName }}
发起人:{{ item.initiatorName }}
当前节点:{{ item.taskName }}
@@ -77,7 +78,7 @@ - +
@@ -105,8 +106,9 @@
+
{{item.targetState=='00'?'征集名称':'项目名称'}}:{{ item.targetName }}
发起人:{{ item.initiatorName }}
-
当前节点:{{ item.taskName }}
+
@@ -205,8 +207,19 @@
-
-
总资金:{{ toThousands(totalMoney) }}
+
+
+ +
+
总资金:{{ toThousands(totalMoney) }}
@@ -297,13 +310,14 @@ import {useAuthStore} from '@/stores/userstore.js' import * as echarts from 'echarts' import {toThousands} from "@/utils/changePrice.js"; import {ElNotification} from "element-plus"; -import {getHomeTaskInfo} from "@/api/home"; +import {getHomeTaskInfo,getDoneTaskInfo} from "@/api/home"; import {getResearchFundChart} from "@/api/research-fund"; import {getArticle} from "@/api/article"; const AuthStore = useAuthStore() const router = useRouter() const topLeftHeight = ref('') +const researchFundYear = ref('2024') const activeName = ref('first') const docActiveTab = ref('first') const totalMoney = ref('45000') @@ -528,6 +542,7 @@ const moneyPieOption = ref({ onMounted(async () => { getTodoList() + getDoneList() await getResearchChart() // nextTick(() => { // let topLeft=document.getElementById('topLeft') @@ -563,8 +578,10 @@ const goToSpecialFund = () => { name: 'Fund' }) } -const refreshTodoOrDoneList = () => { - getTodoList() +const refreshTodoOrDoneList = (name) => { + console.info("🚀 ~method:refreshTodoOrDoneList -----", name) + // getTodoList() + // getDoneList() } const initFundCharts = () => { data.fundPieCharts = echarts.init(document.getElementById('fundPie')).setOption(fundPieOption.value) @@ -586,8 +603,27 @@ const getTodoList = () => { } }) } -const getResearchChart = () => { - getResearchFundChart().then(res => { +const getDoneList = () => { + getDoneTaskInfo().then(res => { + if (res.code === 1000) { + doneList.value=res.data.rows + // todoNum.value=res.data.total + } else { + ElNotification({ + title: '提示', + message: res.msg, + type: 'error' + }) + } + }) +} +const changeResearchFundDataByYear=(year)=>{ + if(year){ + getResearchChart(year) + } +} +const getResearchChart = (year) => { + getResearchFundChart(year).then(res => { if (res.code === 1000) { totalMoney.value = res.data.totalAmount moneyData.value = res.data.rdCompanyList @@ -893,6 +929,9 @@ const handleView = (row) => { .money-block { display: flex; align-items: center; + position: relative; + padding-top: 49px; + padding-right: 10px; .total-money { height: 25px; @@ -901,7 +940,28 @@ const handleView = (row) => { color: #000000; line-height: 18px; } +.legend-block{ + height: 240px; + overflow-y: auto; + display: flex; + flex-direction: column; + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + // 滚动条轨道 + &::-webkit-scrollbar-track { + background: rgb(239, 239, 239); + border-radius: 2px; + } + + // 小滑块 + &::-webkit-scrollbar-thumb { + background: rgba(80, 81, 82, 0.29); + border-radius: 10px; + } +} .legend { margin-top: 14px; display: flex; @@ -927,6 +987,7 @@ const handleView = (row) => { .money-dot { width: 16px; height: 16px; + flex-shrink:0; border-radius: 50%; } } @@ -937,7 +998,7 @@ const handleView = (row) => { display: flex; justify-content: center; align-items: center; - margin-top: 49px; + //margin-top: 49px; width: 250px; > div { @@ -1083,7 +1144,7 @@ const handleView = (row) => { margin-top: 10px; .todo-content { - height: 202px; + height: 216px; overflow-x: auto; margin: 0 12px 0 19px; //padding: 0 0 10px 0; @@ -1110,7 +1171,8 @@ const handleView = (row) => { .todo-border { padding: 13px; - width: 172px; + width: 170px; + //height: 185px; background: rgba(73, 171, 239, 0.05); border-radius: 8px 8px 8px 8px; border: 1px solid #D0D0E3; @@ -1171,7 +1233,16 @@ const handleView = (row) => { margin-bottom: 7px; font-size: 12px; } - + .target-name{ + width: 140px; + color: #000000; + margin-bottom: 7px; + font-size: 12px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + -webkit-line-clamp: 1; + } .process-type { white-space: nowrap; margin-top: 13px; @@ -1379,7 +1450,7 @@ const handleView = (row) => { .right-top { //height: 100%; - height: 513px; + height: 528px; //flex: 0.7; overflow: hidden; border-radius: 10px;