From 15115261786e36265d85d36b009ebdc0a78e6b73 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 24 Nov 2023 19:02:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/caseentryDialog.vue | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/views/caseManagement/components/caseentryDialog.vue b/src/views/caseManagement/components/caseentryDialog.vue index 160d63f..bab14cf 100644 --- a/src/views/caseManagement/components/caseentryDialog.vue +++ b/src/views/caseManagement/components/caseentryDialog.vue @@ -783,7 +783,14 @@ export default { }); } }); - this.fileList = this.caseAttachList; + if (this.caseAttachList.length > 0) { + this.caseAttachListArr = this.caseAttachList + } + this.caseAttachList.forEach((item) => { + if (item.annexType == 2) { + this.fileList.push(item) + } + }); this.fileList.forEach((item) => { item["name"] = item.annexName; item["certificatePath"] = item.annexPath; @@ -854,9 +861,9 @@ export default { // 文件上传成功 handlSuccess(res, file) { - this.caseAttachListArr.push({ - annexId: res.data.annexId, - }); + this.caseAttachListArr.push( + res.data, + ); }, // 文件超出个数限制时的钩子 handleExceed(files, fileList) { @@ -870,10 +877,10 @@ export default { return this.$confirm(`确定移除 ${file.name}?`); }, handleRemove(file, fileList) { - (this.caseAttachListArr = []), - fileList.forEach((item) => { - this.caseAttachListArr.push({ annexId: item.response.data.annexId }); - }); + // (this.caseAttachListArr = []), + // fileList.forEach((item) => { + // this.caseAttachListArr.push( item.response.data ); + // }); }, // 取消 cancel() { -- 2.54.0