Преглед изворни кода

Merge branch 'hhl' of SH-Arbitrate/Arbitrate-Frontend into dev

hhlxayunmei пре 2 година
родитељ
комит
9e3fcf5892
1 измењених фајлова са 17 додато и 0 уклоњено
  1. 17
    0
      src/views/caseManagement/components/caseentryDialog.vue

+ 17
- 0
src/views/caseManagement/components/caseentryDialog.vue Прегледај датотеку

120
                 :action="UploadUrl()"
120
                 :action="UploadUrl()"
121
                 :on-success="handlSuccess"
121
                 :on-success="handlSuccess"
122
                 :on-remove="handleRemove"
122
                 :on-remove="handleRemove"
123
+                :on-preview="handlePreview"
123
                 :before-remove="beforeRemove"
124
                 :before-remove="beforeRemove"
124
                 :data="filedata"
125
                 :data="filedata"
125
                 :headers="headers"
126
                 :headers="headers"
801
                   this.quiltArr.push(item.annexName);
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
             }, 1000);
810
             }, 1000);
805
           }
811
           }
806
           if (this.flag == "2") {
812
           if (this.flag == "2") {
842
     UploadUrl() {
848
     UploadUrl() {
843
       return window.location.origin + "/API/evidence/upload";
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
     handlSuccess(res, file) {
863
     handlSuccess(res, file) {
847
       this.caseAttachListArr.push({
864
       this.caseAttachListArr.push({