From 67c9090827963abe5d8c0c89ef41ffaa67017ccf Mon Sep 17 00:00:00 2001 From: bestlee Date: Mon, 21 Sep 2026 16:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/api/statistics.ts | 8 + src/views/changeStatistics/index.vue | 3 +- src/views/details/closeDoc/index.vue | 12 +- src/views/details/index/index.vue | 10 +- src/views/home/index.vue | 756 +++++++++++++++------------ src/views/home/modules/FlowRing.vue | 19 - src/views/my/myTask/index.vue | 2 +- 7 files changed, 448 insertions(+), 362 deletions(-) delete mode 100644 src/views/home/modules/FlowRing.vue diff --git a/src/service/api/statistics.ts b/src/service/api/statistics.ts index fec938a..ec05c66 100644 --- a/src/service/api/statistics.ts +++ b/src/service/api/statistics.ts @@ -1,6 +1,14 @@ // 数据统计 import { request } from '../request'; +// 首页 +export function homeApi() { + return request({ + url: `/api/workbench`, + method: 'get', + }); +} + // 本部门变更统计 export function departmentStatisticsApi(params: {from: string | null, to: string | null}) { return request({ diff --git a/src/views/changeStatistics/index.vue b/src/views/changeStatistics/index.vue index 726695b..be46545 100644 --- a/src/views/changeStatistics/index.vue +++ b/src/views/changeStatistics/index.vue @@ -82,7 +82,6 @@ const getData = async () => { to: formatTimestamp(to.value,'yyyy-MM-dd') || null }); if(!error){ - console.log(data); deptStatistics.value = data; } loading.value = false; @@ -206,7 +205,7 @@ onMounted(() => { />

-

优于全厂均值 8.2 天

+

优于全厂均值 {{deptStatistics?.kpis?.plant_avg_approval_days || 0}} 天

diff --git a/src/views/details/closeDoc/index.vue b/src/views/details/closeDoc/index.vue index 5d48521..1531ee6 100644 --- a/src/views/details/closeDoc/index.vue +++ b/src/views/details/closeDoc/index.vue @@ -16,6 +16,8 @@ const { routerPushByKey } = useRouterPush(); const route = useRoute(); const loading = ref(false); +// 返回键 +const backKey = ref(''); // 当前变更详情 const currentInfo = ref(null); // 当前变更id @@ -64,7 +66,7 @@ const list = ref([ // 返回 const back = () => { - routerPushByKey('my_mytask'); + routerPushByKey(backKey.value as any); }; // 上传文件 @@ -242,9 +244,13 @@ const getFileList = async () => { } } -onMounted(async () => { +onMounted(() => { useDate.value = new Date().getTime(); - if(route.query && route.query.id){ + console.log(route.query) + if(route.query){ + if(route.query.key){ + backKey.value = route.query.key.toString(); + } if(route.query.id){ currentId.value = Number(route.query.id); getFileList(); diff --git a/src/views/details/index/index.vue b/src/views/details/index/index.vue index c857a56..1b87021 100644 --- a/src/views/details/index/index.vue +++ b/src/views/details/index/index.vue @@ -374,8 +374,11 @@ const getConfig = async () => { loading.value = false; } -onMounted(async () => { - if(route.query && route.query.id){ +onMounted(() => { + if(route.query){ + if(route.query.key){ + backKey.value = route.query.key.toString(); + } if(route.query.id){ currentId.value = Number(route.query.id); getConfig(); @@ -383,9 +386,6 @@ onMounted(async () => { if(route.query.status){ currentStatus.value = route.query.status.toString(); } - if(route.query.key){ - backKey.value = route.query.key.toString(); - } } }) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 3c74adb..f3476e7 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,361 +1,453 @@ diff --git a/src/views/home/modules/FlowRing.vue b/src/views/home/modules/FlowRing.vue deleted file mode 100644 index 76c4e05..0000000 --- a/src/views/home/modules/FlowRing.vue +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/src/views/my/myTask/index.vue b/src/views/my/myTask/index.vue index 3f4e69b..699a52c 100644 --- a/src/views/my/myTask/index.vue +++ b/src/views/my/myTask/index.vue @@ -83,7 +83,7 @@ const openDetail = (c: any,type:string = '') => { // 打开资料关闭 const openDocClose = (c: any) => { currentRow.value = c; - routerPushByKey("details_closedoc",{ query: { id: c?.change_id?.toString() } }); + routerPushByKey("details_closedoc",{ query: { id: c?.change_id?.toString(),key:'my_mytask' } }); }; // 打开处置申请 const openDisposal = (c: any,) => {