From ce6e544309cacf5780b538eceb037fe7a5182bca Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 12 Dec 2024 11:30:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E5=8E=86=E5=8F=B2=E8=BF=87=E6=BB=A4=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test-plan/testPlan/detail/executeResultDrawer.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue b/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue index 3181fb319b..045c89b4c8 100644 --- a/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue +++ b/frontend/src/views/test-plan/testPlan/detail/executeResultDrawer.vue @@ -280,8 +280,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(); @@ -339,8 +339,6 @@ ] as Description[], ...res, }; - activePlanCaseTotal.value = res.apiCaseTotal; - activePlanScenarioTotal.value = res.apiScenarioTotal; if (res.childPlans.length) { detail.value.description.push({ label: t('testPlan.testPlanIndex.testPlan'), @@ -350,8 +348,12 @@ testPlanGroups.value = res.childPlans.map((item) => ({ value: item.id, label: item.name, + apiCaseTotal: item.apiCaseTotal, + apiScenarioTotal: item.apiScenarioTotal, })); activePlan.value = res.childPlans[0]?.id; + activePlanCaseTotal.value = res.childPlans[0]?.apiCaseTotal; + activePlanScenarioTotal.value = res.childPlans[0]?.apiScenarioTotal; } else { testPlanGroups.value = []; activePlanCaseTotal.value = res.childPlans[0]?.apiCaseTotal;