Kaynağa Gözat

feature_20260330_拜访连拍速度优化

zhujindu 2 hafta önce
ebeveyn
işleme
470de648c6

+ 3 - 11
src/components/deleteUploadImgTaskPhoto.vue

@@ -96,7 +96,7 @@ export default {
   watch: {
     imgs: {
       handler(val) {
-        this.imgArr = ['wxLocalResource://7622966209743152790'];
+        this.imgArr = val;
       },
       deep: true,
       immediate: true,
@@ -105,20 +105,12 @@ export default {
   data() {
     return {
       url: process.env.VUE_APP_Target1 + process.env.VUE_APP_BASE_API,
-      imgArr: ['wxLocalResource://7622966209743152790'],
+      imgArr: [],
     };
   },
   methods: {
     deleteImg(index) {
       this.imgArr.splice(index, 1);
-      // removePhotoBatch({ fileIdList: fileIdList.split(',') }).then((res) => {
-      //   if (res.code == 200) {
-      //     this.$toast('删除成功!');
-      //     this.$emit('upDataDetail');
-      //   } else {
-      //     this.$toast('删除失败!');
-      //   }
-      // });
     },
     previewsImg(index) {
       ImagePreview({
@@ -127,7 +119,7 @@ export default {
       });
     },
     newimgarr(localIds) {
-      this.imgArr = localIds;
+      this.imgArr = this.imgArr.concat(localIds);
       // this.$emit('upDataDetail');
     },
   },

+ 2 - 0
src/views/deviceWithin/taskPhotoTaking.vue

@@ -42,6 +42,7 @@
                 </template>
               </van-cell>
               <deleteUploadImgTaskPhoto
+                ref="deleteUploadImgTaskPhoto"
                 :imgs="item.fileInfoList"
                 :storeGroupId="storeGroupId"
                 :taskIds="taskIds"
@@ -240,6 +241,7 @@ export default {
         putInCode: '',
         equipmentCode: '',
       };
+      console.log(this.$refs.deleteUploadImgTaskPhoto.imgArr);
       addCollectionAnswerBatch(formData).then((res) => {
         if (res.code == 200) {
           localStorage.setItem('getRequestFlage', 'true');