From ada7ddffdd834ef8ed21e4713e33c3d47217ffb1 Mon Sep 17 00:00:00 2001 From: baiqi Date: Mon, 16 Dec 2024 10:23:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=A7=E8=A1=8C=E7=BB=93?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/testPlanExecuteResultDrawer.vue | 19 +++++++++---------- .../testPlan/detail/executeResultDrawer.vue | 5 ++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/taskCenter/component/testPlanExecuteResultDrawer.vue b/frontend/src/views/taskCenter/component/testPlanExecuteResultDrawer.vue index 5c41442a55..fe0bab972d 100644 --- a/frontend/src/views/taskCenter/component/testPlanExecuteResultDrawer.vue +++ b/frontend/src/views/taskCenter/component/testPlanExecuteResultDrawer.vue @@ -180,7 +180,7 @@ }, { name: t('report.detail.testPlanCaseTotal'), - value: detail.value.caseTotal, + value: detail.value.apiCaseTotal, unit: t('report.detail.number'), icon: 'case_total', }, @@ -324,8 +324,8 @@ ) { const plan = testPlanGroups.value.find((item) => item.value === value); if (plan) { - activePlanCaseTotal.value = plan.caseTotal; - activePlanScenarioTotal.value = plan.scenarioTotal; + activePlanCaseTotal.value = plan.apiCaseTotal; + activePlanScenarioTotal.value = plan.apiScenarioTotal; activeTable.value = activePlanCaseTotal.value > 0 ? 'case' : 'scenario'; nextTick(() => { searchList(); @@ -353,21 +353,20 @@ loading.value = true; const res = await getTestPlanResult(props.id); detail.value = res; - activePlanCaseTotal.value = res.caseTotal; - activePlanScenarioTotal.value = res.scenarioTotal; if (res.children?.length) { testPlanGroups.value = res.children.map((item: any) => ({ value: item.id, label: item.name, - caseTotal: item.caseTotal, - scenarioTotal: item.scenarioTotal, + apiCaseTotal: item.apiCaseTotal, + apiScenarioTotal: item.apiScenarioTotal, })); activePlan.value = res.children[0]?.id; + activePlanCaseTotal.value = res.children[0]?.apiCaseTotal; + activePlanScenarioTotal.value = res.children[0]?.apiScenarioTotal; } else { testPlanGroups.value = []; - activePlanCaseTotal.value = res.children[0]?.caseTotal; - activePlanScenarioTotal.value = res.children[0]?.scenarioTotal; - activeTable.value = activePlanCaseTotal.value > 0 ? 'case' : 'scenario'; + activePlanCaseTotal.value = res.apiCaseTotal; + activePlanScenarioTotal.value = res.apiScenarioTotal; } activeTable.value = activePlanCaseTotal.value > 0 ? 'case' : 'scenario'; nextTick(() => { diff --git a/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue b/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue index 045c89b4c8..bef55835d9 100644 --- a/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue +++ b/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue @@ -356,9 +356,8 @@ activePlanScenarioTotal.value = res.childPlans[0]?.apiScenarioTotal; } else { testPlanGroups.value = []; - activePlanCaseTotal.value = res.childPlans[0]?.apiCaseTotal; - activePlanScenarioTotal.value = res.childPlans[0]?.apiScenarioTotal; - activeTable.value = activePlanCaseTotal.value > 0 ? 'case' : 'scenario'; + activePlanCaseTotal.value = res.apiCaseTotal; + activePlanScenarioTotal.value = res.apiScenarioTotal; } activeTable.value = activePlanCaseTotal.value > 0 ? 'case' : 'scenario'; searchList();