refactor(性能测试): 增加上传资源文件的类型

This commit is contained in:
Captain.B 2021-03-11 13:44:13 +08:00
parent 3392ae6cb3
commit db8e075f9e
1 changed files with 6 additions and 3 deletions

View File

@ -70,7 +70,7 @@
<el-row type="flex" justify="start" align="middle">
<el-upload
style="padding-right: 10px;"
accept=".jar,.csv"
accept=".jar,.csv,.json,.pdf,.jpg,.png,.jpeg,.doc,.docx,.xlsx"
action=""
:limit="fileNumLimit"
multiple
@ -170,7 +170,7 @@ export default {
fileList: [],
tableData: [],
uploadList: [],
metadataIdList:[],
metadataIdList: [],
fileNumLimit: 10,
threadGroups: [],
loadFileVisible: false,
@ -276,7 +276,10 @@ export default {
let self = this;
let file = uploadResources.file;
self.uploadList.push(file);
let type = file.name.substring(file.name.lastIndexOf(".") + 1);
if (type.toLowerCase() !== 'jmx') {
return;
}
let jmxReader = new FileReader();
jmxReader.onload = (event) => {
self.threadGroups = self.threadGroups.concat(findThreadGroup(event.target.result, file.name));