fix(接口测试): 修复环境配置复制环境,复制成功后页面关闭的缺陷 (#16828)
--bug=1015758 --user=王孝刚 【接口测试】github#16797,环境配置,点击复制环境,复制成功,但环境配置窗口关闭了 https://www.tapd.cn/55049933/s/1222041 Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
parent
2d2b56767a
commit
fd270db2ba
|
@ -67,7 +67,8 @@ export default {
|
|||
selectEnvironmentId: '',
|
||||
ifCreate: false, //是否是创建环境
|
||||
delDialogVisible: false,
|
||||
currentIndex: -1
|
||||
currentIndex: -1,
|
||||
isCopy: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -103,6 +104,7 @@ export default {
|
|||
},
|
||||
copyEnvironment(environment) {
|
||||
this.ifCreate = false;
|
||||
this.isCopy = true;
|
||||
this.currentEnvironment = environment;
|
||||
if (!environment.id) {
|
||||
this.$warning(this.$t('commons.please_save'));
|
||||
|
@ -116,7 +118,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$refs.environmentEdit._save(newEnvironment);
|
||||
this.environments.push(newEnvironment);
|
||||
this.environments.unshift(newEnvironment);
|
||||
this.$refs.environmentItems.itemSelected(this.environments.length - 1, newEnvironment);
|
||||
},
|
||||
validateEnvironment(environment) {
|
||||
|
@ -179,9 +181,12 @@ export default {
|
|||
},
|
||||
close() {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
if (!this.isCopy) {
|
||||
this.visible = false;
|
||||
}
|
||||
this.$refs.environmentEdit.clearValidate();
|
||||
removeGoBackListener(this.close);
|
||||
this.isCopy = false;
|
||||
},
|
||||
openDelEnv(environment, index) {
|
||||
this.currentEnvironment = environment;
|
||||
|
|
|
@ -72,7 +72,8 @@ export default {
|
|||
selectEnvironmentId: '',
|
||||
ifCreate: false, //是否是创建环境
|
||||
delDialogVisible: false,
|
||||
currentIndex: -1
|
||||
currentIndex: -1,
|
||||
isCopy: false
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -129,6 +130,7 @@ export default {
|
|||
},
|
||||
copyEnvironment(environment) {
|
||||
this.ifCreate = false;
|
||||
this.isCopy = true;
|
||||
//点击复制的时候先选择改行,否则会出现解析错误
|
||||
this.environmentSelected(environment);
|
||||
this.currentEnvironment = environment;
|
||||
|
@ -144,7 +146,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.$refs.environmentEdit._save(newEnvironment);
|
||||
this.environments.push(newEnvironment);
|
||||
this.environments.unshift(newEnvironment);
|
||||
this.$refs.environmentItems.itemSelected(this.environments.length - 1, newEnvironment);
|
||||
},
|
||||
validateEnvironment(environment) {
|
||||
|
@ -210,9 +212,12 @@ export default {
|
|||
},
|
||||
close() {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
if (!this.isCopy) {
|
||||
this.visible = false;
|
||||
}
|
||||
this.$refs.environmentEdit.clearValidate();
|
||||
removeGoBackListener(this.close);
|
||||
this.isCopy = false;
|
||||
},
|
||||
openDelEnv(environment, index) {
|
||||
this.currentEnvironment = environment;
|
||||
|
|
Loading…
Reference in New Issue