From f476dc9203c40033adf1bb9fd5d14fcc8bb0630f Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 13 Oct 2024 22:47:44 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E9=A6=96=E9=A1=B5=E5=BE=85=E5=8A=9E?= =?UTF-8?q?/=E5=B7=B2=E5=8A=9E=E6=9F=A5=E7=9C=8B=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 18 +++++ src/views/doneList/index.vue | 139 +++++++++++++++++++++++++++++++++ src/views/home/index.vue | 27 +++++-- src/views/todoList/index.vue | 144 +++++++++++++++++++++++++++++++++++ 4 files changed, 320 insertions(+), 8 deletions(-) create mode 100644 src/views/doneList/index.vue create mode 100644 src/views/todoList/index.vue diff --git a/src/router/index.js b/src/router/index.js index 727fabe..19e5a5f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -190,6 +190,24 @@ const router = createRouter({ breadcrumb: false } }, + { + path: '/todolist', + name: 'Todolist', + component: () => import('@/views/todoList/index.vue'), + meta: { + title: '待办', + breadcrumb: false + } + }, + { + path: '/donelist', + name: 'Donelist', + component: () => import('@/views/doneList/index.vue'), + meta: { + title: '已办', + breadcrumb: false + } + }, ] }, { diff --git a/src/views/doneList/index.vue b/src/views/doneList/index.vue new file mode 100644 index 0000000..71980ec --- /dev/null +++ b/src/views/doneList/index.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 8ef469e..b577673 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -33,7 +33,7 @@ 您有{{ todoList?.length || 0 }}条待办需要处理 -
+
查看更多 @@ -77,7 +77,7 @@ 您有{{ todoList.length }}条待办需要处理
-
+
查看更多 @@ -295,7 +295,7 @@ import {useAuthStore} from '@/stores/userstore.js' import * as echarts from 'echarts' import {toThousands} from "@/utils/changePrice.js"; import {ElNotification} from "element-plus"; -import {getHomeTaskInfo, getDoneTaskInfo,getHomeStatistics, getSpecialFundChart} from "@/api/home"; +import {getHomeTaskInfo, getDoneTaskInfo, getHomeStatistics, getSpecialFundChart} from "@/api/home"; import {getResearchFundChart} from "@/api/research-fund"; import {getArticle} from "@/api/article"; @@ -333,7 +333,7 @@ const taskTabList = ref([ color: '#DCCEFA', textColor: '#8600C5', icon: 'home2.png', - num:0, + num: 0, type: 'approved' }, { @@ -520,6 +520,17 @@ onMounted(async () => { helpDocList.value = await getArticleList(2) problemList.value = await getArticleList(3) }) +const handleTodoList = (type) => { + if (type == 1) { + router.push({ + path: '/todolist', + }) + } else if (type == 2){ + router.push({ + path: '/donelist', + }) + } +} const handleGoToArticleDetail = (row) => { router.push({ name: 'Article/detail', @@ -557,10 +568,10 @@ const initMoneyCharts = () => { const getTaskStatistics = () => { getHomeStatistics().then(res => { if (res.code === 1000) { - taskTabList.value[0].num = res.data.stayInitiation||0 - taskTabList.value[1].num = res.data.approvedProject||0 - taskTabList.value[2].num = res.data.implementation||0 - taskTabList.value[3].num = res.data.acceptanceCheck||0 + taskTabList.value[0].num = res.data.stayInitiation || 0 + taskTabList.value[1].num = res.data.approvedProject || 0 + taskTabList.value[2].num = res.data.implementation || 0 + taskTabList.value[3].num = res.data.acceptanceCheck || 0 } else { ElNotification({ title: '提示', diff --git a/src/views/todoList/index.vue b/src/views/todoList/index.vue new file mode 100644 index 0000000..556887b --- /dev/null +++ b/src/views/todoList/index.vue @@ -0,0 +1,144 @@ + + + + +