浏览代码

主管任务照片批量上传

zhujindu 5 月之前
父节点
当前提交
e7ee24e2c8
共有 2 个文件被更改,包括 11 次插入9 次删除
  1. 1 0
      src/components/uploadVTask.vue
  2. 10 9
      src/views/week/VisitSummaryAdd.vue

+ 1 - 0
src/components/uploadVTask.vue

@@ -219,6 +219,7 @@ export default {
           }
           this.item.fileInfoList.concat(urlArr);
           this.item.fileIdList.concat(idArr);
+          that.$emit('newimgarr');
           // that.$emit('newimgarr', {
           //   fileUrl: res.data.url,
           //   id: res.data.fileId,

+ 10 - 9
src/views/week/VisitSummaryAdd.vue

@@ -451,15 +451,16 @@ export default {
       this.show = true;
     },
     newimgarr1(val) {
-      if (
-        this.collectionItemList[val.index].fileInfoList == null ||
-        this.collectionItemList[val.index].fileInfoList == undefined
-      ) {
-        this.collectionItemList[val.index].fileInfoList = [];
-        this.collectionItemList[val.index].fileIdList = [];
-      }
-      this.collectionItemList[val.index].fileInfoList.push(val);
-      this.collectionItemList[val.index].fileIdList.push(val.id);
+      this.$forceUpdate();
+      // if (
+      //   this.collectionItemList[val.index].fileInfoList == null ||
+      //   this.collectionItemList[val.index].fileInfoList == undefined
+      // ) {
+      //   this.collectionItemList[val.index].fileInfoList = [];
+      //   this.collectionItemList[val.index].fileIdList = [];
+      // }
+      // this.collectionItemList[val.index].fileInfoList.push(val);
+      // this.collectionItemList[val.index].fileIdList.push(val.id);
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);