From 5e56d88ede25ea6a77fa68ef3574b65f9ad75094 Mon Sep 17 00:00:00 2001 From: zhoulingpo Date: Fri, 26 May 2023 10:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=A8=E6=A0=BC=E5=BA=95=E9=83=A8=E8=B7=9D=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reportProcess/components/reportForm.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/reportProcess/components/reportForm.vue b/src/views/reportProcess/components/reportForm.vue index 474a496..d472429 100644 --- a/src/views/reportProcess/components/reportForm.vue +++ b/src/views/reportProcess/components/reportForm.vue @@ -515,12 +515,20 @@ export default { this.dialogUser = true }, handleRemove(file, fileList) { - this.form.fileList = this.fileList.filter(item=>{ - if(item.id!=file.id){ + debugger + this.fileList = this.fileList.filter(item=>{ + let id=file.response?file.response.data.id:file.id + let ietmid=item.response?item.response.data.id:item.id + if(ietmid!=id){ return item } }) - this.fileList=this.form.fileList + this.form.fileList = this.fileList.map(item=>{ + return { + fileId:item.response?item.response.data.id:item.id, + fileName:item.response?item.response.data.name:item.name + } + }) this.handleCurrentChange(1) }, //用递归方式去除children @@ -591,7 +599,7 @@ export default { const isSize = file.size / 1024 / 1024 < 200; if (!isType) { setTimeout(()=>{ - this.$message.error('仅能上传 pdf|ppt|pptx | xls | xlsx 格式文件'); + this.$message.error('仅能上传 pdf|ppt|pptx | excel 格式文件'); }) }