Selaa lähdekoodia

案件申请文件回显

Your Name 2 vuotta sitten
vanhempi
commit
f719561256
1 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa
  1. 17
    0
      src/views/caseManagement/components/caseentryDialog.vue

+ 17
- 0
src/views/caseManagement/components/caseentryDialog.vue Näytä tiedosto

@@ -120,6 +120,7 @@
120 120
                 :action="UploadUrl()"
121 121
                 :on-success="handlSuccess"
122 122
                 :on-remove="handleRemove"
123
+                :on-preview="handlePreview"
123 124
                 :before-remove="beforeRemove"
124 125
                 :data="filedata"
125 126
                 :headers="headers"
@@ -801,6 +802,11 @@ export default {
801 802
                   this.quiltArr.push(item.annexName);
802 803
                 }
803 804
               });
805
+              this.fileList = this.caseAttachList;
806
+              this.fileList.forEach((item)=> {
807
+                item["name"]=item.annexName;
808
+                item["certificatePath"] = item.annexPath;
809
+              })
804 810
             }, 1000);
805 811
           }
806 812
           if (this.flag == "2") {
@@ -842,6 +848,17 @@ export default {
842 848
     UploadUrl() {
843 849
       return window.location.origin + "/API/evidence/upload";
844 850
     },
851
+    handlePreview(file) {
852
+      if (file.certificatePath) {
853
+        window.open(
854
+          window.location.origin + "/API" + file.certificatePath,
855
+          "_blank"
856
+        );
857
+      } else {
858
+        this.$message.warning("暂不支持预览");
859
+      }
860
+},
861
+
845 862
     // 文件上传成功
846 863
     handlSuccess(res, file) {
847 864
       this.caseAttachListArr.push({