fix(接口测试): 修复修改环境通用配置参数值不生效的缺陷
--bug=1029593 --user=王孝刚 【接口测试】github#26430,接口测试-选择环境配置,修改通用配置里的参数值后没有生效 https://www.tapd.cn/55049933/s/1410282
This commit is contained in:
parent
98b52d0c32
commit
e84d8c93c1
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form :model="commonConfig" :rules="rules" ref="commonConfig" :disabled="isReadOnly" label-width="30px">
|
||||
<ms-api-scenario-variables :show-copy="false" :items="commonConfig.variables" :is-read-only="isReadOnly"/>
|
||||
<ms-api-scenario-variables :show-copy="false" :items="commonConfig.variables" :is-read-only="isReadOnly" ref="apiScenario"/>
|
||||
<el-form-item>
|
||||
<el-switch v-model="commonConfig.enableHost" active-text="Hosts"/>
|
||||
<el-tooltip class="hostItem" effect="dark" :content="$t('api_test.home_page.host_config')" placement="right">
|
||||
|
@ -70,6 +70,11 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
mergeData() {
|
||||
if (this.$refs.apiScenario) {
|
||||
this.commonConfig.variables = this.$refs['apiScenario'].allData;
|
||||
}
|
||||
},
|
||||
validate() {
|
||||
let isValidate = false;
|
||||
this.$refs['commonConfig'].validate((valid) => {
|
||||
|
|
|
@ -350,6 +350,9 @@ export default {
|
|||
save() {
|
||||
this.$refs['environment'].validate((valid) => {
|
||||
if (valid && this.$refs.commonConfig.validate() && this.$refs.httpConfig.validate()) {
|
||||
if (this.$refs.commonConfig) {
|
||||
this.$refs.commonConfig.mergeData();
|
||||
}
|
||||
this._save(this.environment);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -350,6 +350,9 @@ export default {
|
|||
save() {
|
||||
this.$refs['environment'].validate((valid) => {
|
||||
if (valid && this.$refs.commonConfig.validate() && this.$refs.httpConfig.validate()) {
|
||||
if (this.$refs.commonConfig) {
|
||||
this.$refs.commonConfig.mergeData();
|
||||
}
|
||||
this._save(this.environment);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue