From 2b52a5f2a42ac963eb921c514228dbeda1b54d33 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 19 Dec 2024 15:00:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=B5=8B=E8=AF=95=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=8D=A1=E7=89=87=E6=9B=B4=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/models/workbench/homePage.ts | 2 ++ .../views/workbench/homePage/components/testPlanCount.vue | 7 ++++--- frontend/src/views/workbench/homePage/utils.ts | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/models/workbench/homePage.ts b/frontend/src/models/workbench/homePage.ts index fa69eb357b..b85c423e7b 100644 --- a/frontend/src/models/workbench/homePage.ts +++ b/frontend/src/models/workbench/homePage.ts @@ -57,6 +57,8 @@ export interface WorkTestPlanRageDetail { prepared: number; archived: number; errorCode: number; + passedArchived: number; // 已归档通过状态 + notPassedArchived: number; // 已归档未通过状态 } export interface TimeFormParams { diff --git a/frontend/src/views/workbench/homePage/components/testPlanCount.vue b/frontend/src/views/workbench/homePage/components/testPlanCount.vue index 1b027e83bc..ebc8d27ed7 100644 --- a/frontend/src/views/workbench/homePage/components/testPlanCount.vue +++ b/frontend/src/views/workbench/homePage/components/testPlanCount.vue @@ -162,7 +162,8 @@ projectId: innerProjectIds.value[0], }; const detail: WorkTestPlanRageDetail = await workTestPlanRage(params); - const { passed, notPassed, finished, running, prepared, archived, errorCode } = detail; + const { passed, notPassed, finished, running, prepared, archived, errorCode, passedArchived, notPassedArchived } = + detail; hasPermission.value = errorCode !== 109001; const passRate = passed + notPassed > 0 ? parseFloat(((passed / (passed + notPassed)) * 100).toFixed(2)) : 0; @@ -175,12 +176,12 @@ { name: t('workbench.homePage.havePassed'), count: passed, - archivedPassed: 0, + archivedPassed: passedArchived, }, { name: t('workbench.homePage.notPass'), count: notPassed, - archivedPassed: 0, + archivedPassed: notPassedArchived, }, ]; diff --git a/frontend/src/views/workbench/homePage/utils.ts b/frontend/src/views/workbench/homePage/utils.ts index 4e6a4088f2..0a65550fe8 100644 --- a/frontend/src/views/workbench/homePage/utils.ts +++ b/frontend/src/views/workbench/homePage/utils.ts @@ -661,6 +661,7 @@ export function handleUpdateTabPie( lastCountList = countList.slice(1).map((item, i) => { return { + ...item, value: item.count, label: item.name, name: item.name,