fix(性能测试): 修复报告也csv配置没有显示的问题
This commit is contained in:
parent
f641f6f6b7
commit
9aad9aca84
|
@ -2,11 +2,11 @@
|
|||
<el-tabs>
|
||||
<el-tab-pane :label="$t('load_test.pressure_config')">
|
||||
<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 :label="$t('load_test.advanced_config')">
|
||||
<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-tabs>
|
||||
</template>
|
||||
|
@ -26,6 +26,22 @@ export default {
|
|||
report: Object,
|
||||
isShare: Boolean,
|
||||
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>
|
||||
|
|
Loading…
Reference in New Issue