From ae8fc07f249a91d55d07efc5635f1790fd0450a3 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 23 Dec 2021 18:30:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E5=88=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=89=8D=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/testplan/TestPlanList.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue b/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue index 3bbbca9ab2..86eb47c306 100644 --- a/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue +++ b/frontend/src/business/components/api/automation/scenario/testplan/TestPlanList.vue @@ -241,6 +241,13 @@ export default { if (!sign) { return false; } + if (this.environmentType === ENV_TYPE.JSON && (!this.projectEnvMap || this.projectEnvMap.size < 1)) { + this.$warning(this.$t("api_test.environment.select_environment")); + return false; + } else if (this.environmentType === ENV_TYPE.GROUP && !this.envGroupId) { + this.$warning(this.$t("api_test.environment.select_environment")); + return false; + } this.$emit('addTestPlan', this.selection, this.projectEnvMap, this.map, this.environmentType, this.envGroupId); } },