Jelajahi Sumber

feature_20250811_拜访拍照任务连拍

zhujindu 3 bulan lalu
induk
melakukan
9a80cafa9d
2 mengubah file dengan 44 tambahan dan 36 penghapusan
  1. 13 4
      src/components/uploadVNormal.vue
  2. 31 32
      src/views/deviceWithin/addStoreVisit.vue

+ 13 - 4
src/components/uploadVNormal.vue

@@ -401,7 +401,7 @@ export default {
           // 重置loaidng状态
           this.resetProgress();
           this.imageAIVerifyFlag = true;
-          this.imageAIVerifyData = res.data;
+          this.imageAIVerifyData = res.data[0];
         } else {
           // 正常流程
           // 图像识别白名单用户弹出框提示
@@ -428,10 +428,19 @@ export default {
     // 正常流程
     normalFlow(res) {
       this.$toast('上传成功!');
+      let fileInfoList = [];
+      res.data.forEach((val) => {
+        fileInfoList.push({
+          fileUrl: val.url,
+          id: val.fileId,
+          type: 2,
+        });
+      });
       this.$emit('newimgarr', {
-        fileUrl: res.data.url,
-        id: res.data.fileId,
-        type: 2,
+        fileInfoList: fileInfoList,
+        // fileUrl: res.data.url,
+        // id: res.data.fileId,
+        // type: 2,
         photoIdentifyType: this.photoIdentifyType,
       });
     },

+ 31 - 32
src/views/deviceWithin/addStoreVisit.vue

@@ -4293,8 +4293,7 @@ export default {
       this.show = true;
     },
     newimgarr1(val) {
-      //是否开启图匠识别,(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
-      //  拍摄店招时只允许上传一张
+      //  店招识别只允许上传一张
       let photoIdentifyType = val.photoIdentifyType;
       this.show = false;
       if (this.pType == 'D') {
@@ -4317,15 +4316,14 @@ export default {
           ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
             this.childIndex3
           ].collectionOptionList[this.childIndex4].collectionItems[this.childIndex5].fileInfoList =
-            [val];
+            val.fileInfoList;
         } else {
-          this.collectionItemList[this.indeximg].collectionOptionList[
-            this.childIndex1
-          ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-            this.childIndex3
-          ].collectionOptionList[this.childIndex4].collectionItems[
-            this.childIndex5
-          ].fileInfoList.push(val);
+          let fileInfoList =
+            this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
+              .collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
+              .collectionItems[this.childIndex3].collectionOptionList[this.childIndex4]
+              .collectionItems[this.childIndex5].fileInfoList;
+          fileInfoList = fileInfoList.concat(val.fileInfoList);
         }
       }
       if (this.pType == 'E') {
@@ -4353,17 +4351,15 @@ export default {
           ].collectionOptionList[this.childIndex4].collectionItems[
             this.childIndex5
           ].collectionOptionList[this.childIndex6].collectionItems[this.childIndex7].fileInfoList =
-            [val];
+            val.fileInfoList;
         } else {
-          this.collectionItemList[this.indeximg].collectionOptionList[
-            this.childIndex1
-          ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-            this.childIndex3
-          ].collectionOptionList[this.childIndex4].collectionItems[
-            this.childIndex5
-          ].collectionOptionList[this.childIndex6].collectionItems[
-            this.childIndex7
-          ].fileInfoList.push(val);
+          let fileInfoList =
+            this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
+              .collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
+              .collectionItems[this.childIndex3].collectionOptionList[this.childIndex4]
+              .collectionItems[this.childIndex5].collectionOptionList[this.childIndex6]
+              .collectionItems[this.childIndex7].fileInfoList;
+          fileInfoList = fileInfoList.concat(val.fileInfoList);
         }
       }
       if (this.pType == 'A' || this.pType == 'B') {
@@ -4405,11 +4401,13 @@ export default {
             if (photoIdentifyType == 1) {
               this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
                 this.childIndex
-              ].fileInfoList = [val];
+              ].fileInfoList = val.fileInfoList;
             } else {
-              this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
-                this.childIndex
-              ].fileInfoList.push(val);
+              let fileInfoList =
+                this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
+                  this.childIndex
+                ].fileInfoList;
+              fileInfoList = fileInfoList.concat(val.fileInfoList);
             }
           }
         } else {
@@ -4420,13 +4418,14 @@ export default {
             this.collectionItemList[this.indeximg].fileInfoList = [];
           }
           if (photoIdentifyType == 1) {
-            this.collectionItemList[this.indeximg].fileInfoList = [val];
+            this.collectionItemList[this.indeximg].fileInfoList = val.fileInfoList;
             console.log(
               'fileInfoList222=' +
                 JSON.stringify(this.collectionItemList[this.indeximg].fileInfoList)
             );
           } else {
-            this.collectionItemList[this.indeximg].fileInfoList.push(val);
+            let fileInfoList = this.collectionItemList[this.indeximg].fileInfoList;
+            fileInfoList = fileInfoList.concat(val.fileInfoList);
           }
         }
       }
@@ -4447,13 +4446,13 @@ export default {
             this.childIndex1
           ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
             this.childIndex3
-          ].fileInfoList = [val];
+          ].fileInfoList = val.fileInfoList;
         } else {
-          this.collectionItemList[this.indeximg].collectionOptionList[
-            this.childIndex1
-          ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-            this.childIndex3
-          ].fileInfoList.push(val);
+          let fileInfoList =
+            this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
+              .collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
+              .collectionItems[this.childIndex3].fileInfoList;
+          fileInfoList = fileInfoList.concat(val.fileInfoList);
         }
       }
       this.$forceUpdate();