fix(测试跟踪): 修复测试用例上传附件报错的问题

This commit is contained in:
shiziyuan9527 2020-10-19 14:02:06 +08:00
parent 8a31d89503
commit d1fa9ca32a
2 changed files with 12 additions and 4 deletions

View File

@ -1,7 +1,9 @@
package io.metersphere.commons.constants;
public enum FileType {
JMX(".jmx"), CSV(".csv"), JSON(".json"), PDF(".pdf"), JPG(".jpg"), PNG(".png");
JMX(".jmx"), CSV(".csv"), JSON(".json"), PDF(".pdf"),
JPG(".jpg"), PNG(".png"), JPEG(".jpeg"), DOC(".doc"),
XLSX(".xlsx"), DOCX(".docx");
// 保存后缀
private String suffix;

View File

@ -213,16 +213,17 @@
<el-row style="margin-top: 15px;margin-bottom: 10px">
<el-col :offset="2" :span="20">附件:
<el-upload
accept=".jpg,.jpeg,.png,.xlsx,.doc,.pdf,.docx"
action=""
:show-file-list="false"
:before-upload="beforeUpload"
:http-request="handleUpload"
:on-exceed="handleExceed"
multiple
:limit="3"
:limit="8"
:file-list="fileList">
<el-button icon="el-icon-plus" size="mini"></el-button>
<!-- <span slot="tip" class="el-upload__tip"></span>-->
<span slot="tip" class="el-upload__tip"> 只能上传jpgjpegpngdocxdocpdfxlsx文件 </span>
</el-upload>
</el-col>
</el-row>
@ -488,7 +489,9 @@ export default {
result: ''
}];
this.form.remark = '';
this.form.uploadList = [];
this.uploadList = [];
this.fileList = [];
this.tableData = [];
this.$emit("refresh");
return;
}
@ -628,6 +631,9 @@ export default {
desc: '',
result: ''
}];
this.uploadList = [];
this.fileList = [];
this.tableData = [];
return true;
});
}