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,