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();