fix(性能测试): 修复批量添加监控项有问题的缺陷

--bug=1025344 --user=王孝刚 [性能测试] github
#235781.20.21-lts版本,性能测试批量添加监控项有问题。
https://www.tapd.cn/55049933/s/1362022
This commit is contained in:
wxg0103 2023-04-12 20:04:12 +08:00 committed by 刘瑞斌
parent fc3bdb491d
commit 47dcd0d8a3
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,7 @@
import MsDialogFooter from "metersphere-frontend/src/components/MsDialogFooter";
import MonitorKeyValue from "./MonitorKeyValue";
import {KeyValue} from "metersphere-frontend/src/model/ScenarioModel";
export default {
name: "EditMonitor",
@ -92,6 +93,9 @@ export default {
}
this.form = copy;
}
if (this.monitorList.length === 0) {
this.monitorList.push(new KeyValue({enable: true}));
}
if (index !== '' && index !== undefined) {
this.index = index;
}
@ -99,6 +103,7 @@ export default {
closeFunc() {
this.form = {};
this.dialogVisible = false;
this.monitorList = [];
},
update() {
this.$refs.monitorForm.validate(valid => {