diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index 73363babb0..a028ee01d0 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -1639,10 +1639,6 @@ public class TestPlanService { return true; } - if (planTestPlanUiScenarioCaseService.haveUiCase(planId)) { - return true; - } - return planTestPlanLoadCaseService.haveExecCase(planId); } diff --git a/test-track/frontend/src/business/plan/common/TestPlanRunModeWithEnv.vue b/test-track/frontend/src/business/plan/common/TestPlanRunModeWithEnv.vue index 99044566fd..2eccaae681 100644 --- a/test-track/frontend/src/business/plan/common/TestPlanRunModeWithEnv.vue +++ b/test-track/frontend/src/business/plan/common/TestPlanRunModeWithEnv.vue @@ -58,7 +58,7 @@
+ :plan-id="currentPlanId" :show-save="true" :have-u-i-case="haveUICase" :have-other-exec-case="haveOtherExecCase"/> { testPlanHaveExecCase(row.id) .then(async res => { - const haveExecCase = res.data; - if (haveExecCase) { + this.haveOtherExecCase = res.data; + //因为ui没有资源池,这里必须分离两个变量 + if (this.haveOtherExecCase || this.haveUICase) { this.$refs.runMode.open('API', row.runModeConfig); } else { this.$router.push('/track/plan/view/' + row.id);