fix(工作台): 修复工作台测试计划卡片更改变量展示字段

This commit is contained in:
xinxin.wu 2024-12-19 15:00:59 +08:00 committed by Craftsman
parent 7211563978
commit 2b52a5f2a4
3 changed files with 7 additions and 3 deletions

View File

@ -57,6 +57,8 @@ export interface WorkTestPlanRageDetail {
prepared: number;
archived: number;
errorCode: number;
passedArchived: number; // 已归档通过状态
notPassedArchived: number; // 已归档未通过状态
}
export interface TimeFormParams {

View File

@ -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,
},
];

View File

@ -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,