fix(测试计划): 关联接口用例问题#1005504
--bug=1005504 --user=lyh 【github#5051】测试计划>>关联接口测试用例>>跨项目选择接口测试用例,运行环境指定,确定。运行时多个项目的接口运行环境异常 https://www.tapd.cn/55049933/s/1035737
This commit is contained in:
parent
ff1ac93fa3
commit
5c5a834c4f
|
@ -5,7 +5,7 @@
|
|||
@isApiListEnableChange="isApiListEnableChange">
|
||||
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly"
|
||||
@setEnvironment="setEnvironment"/>
|
||||
@setEnvironment="setEnvironment" ref="msEnvironmentSelect"/>
|
||||
|
||||
<el-input :placeholder="$t('commons.search_by_name_or_id')" @blur="initTable" class="search-input" size="small"
|
||||
@keyup.enter.native="initTable" v-model="condition.name"/>
|
||||
|
@ -374,6 +374,13 @@
|
|||
if (this.$refs.apitable) {
|
||||
this.$refs.apitable.clear();
|
||||
}
|
||||
},
|
||||
clearEnvAndSelect() {
|
||||
this.environmentId = "";
|
||||
if (this.$refs.msEnvironmentSelect) {
|
||||
this.$refs.msEnvironmentSelect.environmentId = "";
|
||||
}
|
||||
this.clear();
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
@isApiListEnableChange="isApiListEnableChange">
|
||||
|
||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly"
|
||||
@setEnvironment="setEnvironment"/>
|
||||
@setEnvironment="setEnvironment" ref="msEnvironmentSelect"/>
|
||||
|
||||
<el-input :placeholder="$t('commons.search_by_name_or_id')" @blur="initTable"
|
||||
@keyup.enter.native="initTable" class="search-input" size="small" v-model="condition.name"/>
|
||||
|
@ -241,6 +241,13 @@ export default {
|
|||
this.$refs.table.clear();
|
||||
}
|
||||
},
|
||||
clearEnvAndSelect() {
|
||||
this.environmentId = "";
|
||||
if (this.$refs.msEnvironmentSelect) {
|
||||
this.$refs.msEnvironmentSelect.environmentId = "";
|
||||
}
|
||||
this.clear();
|
||||
},
|
||||
showExecResult(row) {
|
||||
this.visible = false;
|
||||
this.$emit('showExecResult', row);
|
||||
|
|
|
@ -105,6 +105,13 @@
|
|||
}
|
||||
},
|
||||
setProject(projectId) {
|
||||
// 切换项目 清空环境和选中行
|
||||
if (this.$refs.apiList) {
|
||||
this.$refs.apiList.clearEnvAndSelect();
|
||||
}
|
||||
if (this.$refs.apiCaseList) {
|
||||
this.$refs.apiCaseList.clearEnvAndSelect();
|
||||
}
|
||||
this.projectId = projectId;
|
||||
},
|
||||
isApiListEnableChange(data) {
|
||||
|
|
Loading…
Reference in New Issue