diff --git a/src/views/reportProcess/components/reportForm.vue b/src/views/reportProcess/components/reportForm.vue index 949ffb3..fe37a67 100644 --- a/src/views/reportProcess/components/reportForm.vue +++ b/src/views/reportProcess/components/reportForm.vue @@ -581,7 +581,7 @@ export default { }, // 上传文件前 beforeUploadFile(file) { - this.table_loading=true + let realFileType = file.name.split('.')[file.name.split('.').length - 1]; const isType = ( file.type === fileType.pdf || file.type === fileType.ppt || file.type === fileType.pptx || file.type === fileType.xlsx|| @@ -590,10 +590,18 @@ export default { ); const isSize = file.size / 1024 / 1024 < 200; if (!isType) { - this.$message.error('仅能上传 pdf|ppt|pptx 格式文件'); + setTimeout(()=>{ + this.$message.error('仅能上传 pdf|ppt|pptx 格式文件'); + + }) } if (!isSize) { - this.$message.error('您最大可上传200M文件'); + setTimeout(()=> { + this.$message.error('您最大可上传200M文件'); + }) + } + if(isType && isSize){ + this.table_loading=true } return isType && isSize; },