From bbd220b8fdf32406c574bdbf5f71eb1d5077dcc0 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Mon, 21 Feb 2022 18:33:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=85=B3=E8=81=94dubbo=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E7=A4=BA=E9=80=89=E6=8B=A9=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009972 --user=lyh 【测试计划】-关联dubbo接口用例时提示选择运行环境 https://www.tapd.cn/55049933/s/1106951 --- .../view/comonents/api/TestCaseApiRelevance.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue index c8389a13c2..97d9f8e82c 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestCaseApiRelevance.vue @@ -175,7 +175,8 @@ url = '/api/definition/relevance'; environmentId = this.$refs.apiList.environmentId; selectIds = Array.from(apis).map(row => row.id); - this.postRelevance(url, environmentId, selectIds); + let protocol = this.$refs.apiList.currentProtocol; + this.postRelevance(url, environmentId, selectIds, protocol); }); } else { let params = this.$refs.apiCaseList.getConditions(); @@ -184,17 +185,20 @@ url = '/api/testcase/relevance'; environmentId = this.$refs.apiCaseList.environmentId; selectIds = Array.from(apiCases).map(row => row.id); - this.postRelevance(url, environmentId, selectIds); + let protocol = this.$refs.apiCaseList.currentProtocol; + this.postRelevance(url, environmentId, selectIds, protocol); }); } }, - postRelevance(url, environmentId, selectIds) { + postRelevance(url, environmentId, selectIds, protocol) { let param = {}; - if (!environmentId) { - this.$warning(this.$t('api_test.environment.select_environment')); - return; + if (protocol !== 'DUBBO') { + if (!environmentId) { + this.$warning(this.$t('api_test.environment.select_environment')); + return; + } } param.planId = this.planId; param.selectIds = selectIds;