浏览代码

文件上传修改识别

Your Name 2 年前
父节点
当前提交
1511526178
共有 1 个文件被更改,包括 15 次插入8 次删除
  1. 15
    8
      src/views/caseManagement/components/caseentryDialog.vue

+ 15
- 8
src/views/caseManagement/components/caseentryDialog.vue 查看文件

783
                 });
783
                 });
784
               }
784
               }
785
             });
785
             });
786
-            this.fileList = this.caseAttachList;
786
+            if (this.caseAttachList.length > 0) {
787
+              this.caseAttachListArr = this.caseAttachList 
788
+            }
789
+            this.caseAttachList.forEach((item) => {
790
+              if (item.annexType == 2) {
791
+                this.fileList.push(item)
792
+              }
793
+            });
787
             this.fileList.forEach((item) => {
794
             this.fileList.forEach((item) => {
788
               item["name"] = item.annexName;
795
               item["name"] = item.annexName;
789
               item["certificatePath"] = item.annexPath;
796
               item["certificatePath"] = item.annexPath;
854
 
861
 
855
     // 文件上传成功
862
     // 文件上传成功
856
     handlSuccess(res, file) {
863
     handlSuccess(res, file) {
857
-      this.caseAttachListArr.push({
858
-        annexId: res.data.annexId,
859
-      });
864
+      this.caseAttachListArr.push(
865
+        res.data,
866
+      );
860
     },
867
     },
861
     // 文件超出个数限制时的钩子
868
     // 文件超出个数限制时的钩子
862
     handleExceed(files, fileList) {
869
     handleExceed(files, fileList) {
870
       return this.$confirm(`确定移除 ${file.name}?`);
877
       return this.$confirm(`确定移除 ${file.name}?`);
871
     },
878
     },
872
     handleRemove(file, fileList) {
879
     handleRemove(file, fileList) {
873
-      (this.caseAttachListArr = []),
874
-        fileList.forEach((item) => {
875
-          this.caseAttachListArr.push({ annexId: item.response.data.annexId });
876
-        });
880
+      // (this.caseAttachListArr = []),
881
+        // fileList.forEach((item) => {
882
+        //   this.caseAttachListArr.push( item.response.data );
883
+        // });
877
     },
884
     },
878
     // 取消
885
     // 取消
879
     cancel() {
886
     cancel() {