|
@@ -424,6 +424,8 @@
|
|
|
:file-list="fileForm.standardFileUrl"
|
|
|
:on-change="uploadImportData"
|
|
|
accept=".pdf, application/pdf"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :limit="1"
|
|
|
>
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
<div slot="tip" class="el-upload__tip">允许文件格式.pdf</div>
|
|
@@ -813,6 +815,9 @@ import { getStore, setStore } from "@/util/store";
|
|
|
this.fileForm.standardFileUrl = this.fileForm.files.map(file => ({
|
|
|
name: file.name,
|
|
|
}));
|
|
|
+ },
|
|
|
+ handleExceed(files, fileList) {
|
|
|
+ this.$message.warning(`当前限制只能上传一个文件,您已选择了 ${files.length + fileList.length} 个文件,请重新选择!`);
|
|
|
},
|
|
|
async addFileRoleForm(){
|
|
|
const isValid = await this.$refs.fileFormRef.validate()
|