From f719561256575908249dd1375a09e1525f8a4ccd Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Sep 2023 22:55:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=88=E4=BB=B6=E7=94=B3=E8=AF=B7=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/caseentryDialog.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/views/caseManagement/components/caseentryDialog.vue b/src/views/caseManagement/components/caseentryDialog.vue index 26b806c..a2a85f7 100644 --- a/src/views/caseManagement/components/caseentryDialog.vue +++ b/src/views/caseManagement/components/caseentryDialog.vue @@ -120,6 +120,7 @@ :action="UploadUrl()" :on-success="handlSuccess" :on-remove="handleRemove" + :on-preview="handlePreview" :before-remove="beforeRemove" :data="filedata" :headers="headers" @@ -801,6 +802,11 @@ export default { this.quiltArr.push(item.annexName); } }); + this.fileList = this.caseAttachList; + this.fileList.forEach((item)=> { + item["name"]=item.annexName; + item["certificatePath"] = item.annexPath; + }) }, 1000); } if (this.flag == "2") { @@ -842,6 +848,17 @@ export default { UploadUrl() { return window.location.origin + "/API/evidence/upload"; }, + handlePreview(file) { + if (file.certificatePath) { + window.open( + window.location.origin + "/API" + file.certificatePath, + "_blank" + ); + } else { + this.$message.warning("暂不支持预览"); + } +}, + // 文件上传成功 handlSuccess(res, file) { this.caseAttachListArr.push({