From cdc0e26d5ca5a8573a9b704606687de8a22a92a1 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Thu, 25 May 2023 17:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8A=A0=E8=BD=BD=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reportProcess/components/reportForm.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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; },