fix(性能测试): 修复性能测试csv打开分割没有显示的问题

--bug=1010923 --user=刘瑞斌 【性能测试】开启csv分割后保存,保存没生效 https://www.tapd.cn/55049933/s/1115018
This commit is contained in:
CaptainB 2022-03-08 13:24:26 +08:00 committed by shiziyuan9527
parent ccc2bbd228
commit 0c8d75080b

View File

@ -522,12 +522,7 @@ export default {
} }
}, },
csvFiles() { csvFiles() {
if (this.csvConfig && this.csvFiles) { this.refreshCsv();
this.csvFiles.forEach(f => {
f.csvSplit = this.csvConfig[f.name]?.csvSplit;
f.csvHasHeader = this.csvConfig[f.name]?.csvHasHeader;
});
}
} }
}, },
methods: { methods: {
@ -553,9 +548,18 @@ export default {
this.properties = data.properties || []; this.properties = data.properties || [];
this.systemProperties = data.systemProperties || []; this.systemProperties = data.systemProperties || [];
this.csvConfig = data.csvConfig; this.csvConfig = data.csvConfig;
this.refreshCsv();
} }
}); });
}, },
refreshCsv() {
if (this.csvConfig && this.csvFiles) {
this.csvFiles.forEach(f => {
f.csvSplit = this.csvConfig[f.name]?.csvSplit;
f.csvHasHeader = this.csvConfig[f.name]?.csvHasHeader;
});
}
},
add(dataName) { add(dataName) {
if (dataName === 'domains') { if (dataName === 'domains') {
this[dataName].push({ this[dataName].push({