mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(项目设置): 环境通用配置筛选后保存有误
--bug=1031537 --user=宋昌昌 【项目设置】github#26995,项目设置-->项目环境-->操作【编辑】环境-->根据变量名称搜索之后保存,点【确认】所有变量都以搜索之后数据保存,没有搜索到的数据都被清空。 https://www.tapd.cn/55049933/s/1424731
This commit is contained in:
parent
0bf50b30df
commit
fda0ce7f47
@ -350,9 +350,6 @@ 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);
|
||||
}
|
||||
});
|
||||
|
@ -113,6 +113,7 @@
|
||||
size="mini"
|
||||
v-if="scope.row.type !== 'CSV'"
|
||||
:placeholder="valueText(scope.row)"
|
||||
@change="changeVariableVal(scope.row)"
|
||||
:disabled="scope.row.type === 'COUNTER' || scope.row.type === 'RANDOM'"/>
|
||||
<csv-file-upload :parameter="scope.row" v-if="scope.row.type === 'CSV'"/>
|
||||
</template>
|
||||
@ -323,6 +324,13 @@ export default {
|
||||
data.type = 'STRING';
|
||||
}
|
||||
},
|
||||
changeVariableVal(data) {
|
||||
this.items.forEach(item => {
|
||||
if (item.name === data.name) {
|
||||
item.value = data.value;
|
||||
}
|
||||
})
|
||||
},
|
||||
valueText(data) {
|
||||
switch (data.type) {
|
||||
case 'LIST':
|
||||
@ -594,6 +602,7 @@ export default {
|
||||
}
|
||||
});
|
||||
this.allData = this.items;
|
||||
this.sortParameters();
|
||||
this.queryPage();
|
||||
}
|
||||
},
|
||||
|
@ -350,9 +350,6 @@ 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
Block a user