Browse Source

主管任务照片批量上传

zhujindu 4 months ago
parent
commit
1ee0e8ea43

+ 0 - 8
src/components/uploadVTask.vue

@@ -219,14 +219,6 @@ export default {
           this.item.fileInfoList = this.item.fileInfoList.concat(urlArr);
           this.item.fileIdList = this.item.fileIdList.concat(idArr);
           this.$emit('newimgarr');
-          // this.$emit('newimgarr', {
-          //   fileUrl: res.data.url,
-          //   id: res.data.fileId,
-          //   fileType: res.fileType,
-          //   fileName: res.fileName,
-          //   type: this.type,
-          //   index: this.indexImg,
-          // });
         } else {
           this.$toast('上传失败!');
         }

+ 3 - 10
src/views/week/SUPTaskApproval/detailItem.vue

@@ -59,6 +59,7 @@
               :customId="item.customId"
               :summaryId="item.summaryId"
               :allowWriteAgain="false"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -370,16 +371,8 @@ export default {
       this.indeximg = index;
       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);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);

+ 1 - 3
src/views/week/VisitSummaryAdd.vue

@@ -450,10 +450,8 @@ export default {
       this.indeximg = index;
       this.show = true;
     },
-    newimgarr1(val) {
-      console.log(this.collectionItemList);
+    newimgarr1() {
       this.$forceUpdate();
-      console.log(this.collectionItemList);
       // if (
       //   this.collectionItemList[val.index].fileInfoList == null ||
       //   this.collectionItemList[val.index].fileInfoList == undefined

+ 3 - 10
src/views/week/allowWriteAgainSummary.vue

@@ -64,6 +64,7 @@
               :customId="item.customId"
               :summaryId="item.summaryId"
               :allowWriteAgain="item.allowWriteAgain"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -416,16 +417,8 @@ export default {
       this.indeximg = index;
       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);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);

+ 3 - 10
src/views/week/componVisitSummary.vue

@@ -52,6 +52,7 @@
               :indexImg="index"
               :customId="item.customId"
               :summaryId="item.summaryId"
+              :item="item"
               @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
@@ -437,16 +438,8 @@ export default {
       this.indeximg = index;
       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);
+    newimgarr1() {
+      this.$forceUpdate();
     },
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);