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({