Kaynağa Gözat

Merge branch 'feature_20250811_拜访拍照任务连拍' into uat(dev)

# Conflicts:
#	src/components/uploadVNormal.vue
zhujindu 5 ay önce
ebeveyn
işleme
250d755b11

+ 12 - 36
src/components/uploadVNormal.vue

@@ -127,10 +127,15 @@ export default {
       default: '0',
     },
     photoIdentifyType: {
-      // 图匠识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招,6:陈列SKU图片识别)
+      // 图匠识别目的(1:店招内容识别(不能连拍和多选),3:调色机识别(不能连拍和多选),6:陈列SKU图片识别(不需要图匠实时识别))
       type: String,
       default: '',
     },
+    continuousShoot: {
+      // 是否允许连拍/相册多选 1:允许;0:不允许
+      type: String,
+      default: '0',
+    },
   },
   computed: {
     ...mapState({
@@ -170,40 +175,6 @@ export default {
           if (res.url && res.url.indexOf('http') != -1) {
             this.fileUrl = res.url;
             this.uploadImagev();
-            // var form = {
-            //   fileUrl: res.url,
-            //   collectionItemId: this.collectionId,
-            //   objectType: this.objectType,
-            //   storeGroupId: this.storeGroupId,
-            //   taskId: this.taskId,
-            //   visitsId: localStorage.getItem('visitId'),
-            //   visitModel: this.visitModel,
-            //   visitSource: '1',
-            //   locationRemark: '',
-            //   parentCollectionId: this.parentCollectionId || '',
-            //   secondCollectionId: this.secondCollectionId || '',
-            //   firstCollectionId: this.firstCollectionId || '',
-            //   fourthCollectionId: this.fourthCollectionId || '',
-            //   thirdCollectionId: this.thirdCollectionId || '',
-            //   deviceCode: this.deviceCode, //设备编号
-            //   putInCode: this.putInCode, //投放编号
-            // };
-            // this.controller = null;
-            // // 需要图匠校验的添加参数和loading
-            // if (this.photoIdentifyType) {
-            //   form.photoIdentifyType = this.photoIdentifyType;
-            //   this.progress();
-            //   this.controller = new AbortController(); //取消请求
-            // } else {
-            //   this.toastLoading(0, '上传中...', true);
-            // }
-            // addH5Photo(form, this.controller ? this.controller.signal : null)
-            //   .then((res) => {
-            //     this.requestThen(res);
-            //   })
-            //   .catch((error) => {
-            //     this.requestCatch(error);
-            //   });
           }
         })
         .catch((err) => {
@@ -290,8 +261,13 @@ export default {
               });
               console.log(that.pictureSource);
               let sourceType = that.pictureSource == '1' ? ['album', 'camera'] : ['camera'];
+              let count = 1;
+              // 1:店招内容识别(不能连拍和多选),3:调色机识别(不能连拍和多选)
+              if (this.photoIdentifyType != 1 && this.photoIdentifyType != 3) {
+                count = this.continuousShoot == '1' ? 5 : 1; //是否允许连拍/相册多选 最多5张
+              }
               wx.chooseImage({
-                count: 1,
+                count: count,
                 sizeType: ['original'],
                 sourceType: sourceType,
                 mode: 'single',

+ 3 - 0
src/views/deviceWithin/addStoreVisit.vue

@@ -2926,6 +2926,7 @@
             @typeshow="typeshow"
             :photoIdentifyType="photoIdentifyType"
             :pictureSource="pictureSource"
+            :continuousShoot="continuousShoot"
             ref="uploadVNormal"></upload-img>
         </template>
       </van-cell>
@@ -3145,6 +3146,7 @@ export default {
       minDate: new Date(1945, 0, 1),
       maxDate: new Date(),
       currentDate: new Date(1945, 0, 1),
+      continuousShoot: '0',
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -4277,6 +4279,7 @@ export default {
       this.thirdCollectionId = val.thirdCollectionId;
       this.fourthCollectionId = val.fourthCollectionId;
       this.pictureSource = val.pictureSource; //是否允许从相册选择图片
+      this.continuousShoot = val.continuousShoot; //是否允许连拍/相册多选
       this.indeximg = index;
       this.childIndex = childIndex;
       this.childIndex1 = childIndex1;