fix(测试计划): 关联dubbo接口用例时提示选择运行环境

--bug=1009972 --user=lyh 【测试计划】-关联dubbo接口用例时提示选择运行环境
https://www.tapd.cn/55049933/s/1106951
This commit is contained in:
shiziyuan9527 2022-02-21 18:33:49 +08:00 committed by 刘瑞斌
parent 2f98c9c2d3
commit 4bcde5041d
1 changed files with 10 additions and 6 deletions

View File

@ -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;