fix(接口定义): 修复新建case,环境保存失败的缺陷

--bug=1021225 --user=王孝刚 【接口测试】新建接口用例,环境保存失败
https://www.tapd.cn/55049933/s/1319278
This commit is contained in:
wxg0103 2022-12-26 14:13:46 +08:00 committed by wxg0103
parent 229c0cc47c
commit 548acc8476
2 changed files with 15 additions and 3 deletions

View File

@ -605,7 +605,7 @@ export default {
if (!hideAlert) {
this.$emit('refresh');
}
this.$emit('refreshCaseList');
this.$emit('refreshCaseList',row.id);
}, (error) => {
this.isSave = false;
});

View File

@ -411,8 +411,20 @@ export default {
refresh() {
this.$emit('refresh');
},
refreshCaseList() {
this.getApiTest(true,true);
refreshCaseList(id) {
return new Promise((resolve) => {
let commonUseEnvironment = this.$store.state.useEnvironment;
this.environment = commonUseEnvironment ? commonUseEnvironment : "";
this.result = this.$get("/api/testcase/findById/" + id, response => {
let apiCase = response.data;
if (apiCase) {
this.formatCase(apiCase);
apiCase.active = true;
this.apiCaseList = [apiCase];
}
resolve();
});
});
},
reLoadCase() {
this.$emit('reLoadCase');