fix(性能测试): 修复报告也csv配置没有显示的问题
This commit is contained in:
parent
f641f6f6b7
commit
9aad9aca84
|
@ -2,11 +2,11 @@
|
||||||
<el-tabs>
|
<el-tabs>
|
||||||
<el-tab-pane :label="$t('load_test.pressure_config')">
|
<el-tab-pane :label="$t('load_test.pressure_config')">
|
||||||
<performance-pressure-config :is-read-only="true" :test="test" :report="report" :report-id="reportId"
|
<performance-pressure-config :is-read-only="true" :test="test" :report="report" :report-id="reportId"
|
||||||
:is-share="isShare" :share-id="shareId"/>
|
:is-share="isShare" :share-id="shareId" @fileChange="fileChange"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('load_test.advanced_config')">
|
<el-tab-pane :label="$t('load_test.advanced_config')">
|
||||||
<performance-advanced-config :is-read-only="true" :report-id="reportId" :report="report" :is-share="isShare"
|
<performance-advanced-config :is-read-only="true" :report-id="reportId" :report="report" :is-share="isShare"
|
||||||
:share-id="shareId"/>
|
:share-id="shareId" ref="advancedConfig"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
@ -26,6 +26,22 @@ export default {
|
||||||
report: Object,
|
report: Object,
|
||||||
isShare: Boolean,
|
isShare: Boolean,
|
||||||
shareId: String,
|
shareId: String,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fileChange(threadGroups) {
|
||||||
|
let csvSet = new Set;
|
||||||
|
threadGroups.forEach(tg => {
|
||||||
|
if (tg.csvFiles) {
|
||||||
|
tg.csvFiles.map(item => csvSet.add(item));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let csvFiles = [];
|
||||||
|
for (const f of csvSet) {
|
||||||
|
csvFiles.push({name: f, csvSplit: false, csvHasHeader: true});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.advancedConfig.csvFiles = csvFiles;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue