Commit 5f11fed4 authored by RuoYi's avatar RuoYi

用户导入添加验证提示

parent b60b5de7
...@@ -546,6 +546,11 @@ export default { ...@@ -546,6 +546,11 @@ export default {
}, },
// 提交上传文件 // 提交上传文件
submitFileForm() { submitFileForm() {
const file = this.$refs.upload.uploadFiles
if (!file || file.length === 0 || !file[0].name.toLowerCase().endsWith('.xls') && !file[0].name.toLowerCase().endsWith('.xlsx')) {
this.$modal.msgError("请选择后缀为 “xls”或“xlsx”的文件。")
return
}
this.$refs.upload.submit() this.$refs.upload.submit()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment