Jelajahi Sumber

图像识别

zhujindu 1 tahun lalu
induk
melakukan
b1044b22dc
2 mengubah file dengan 10 tambahan dan 4 penghapusan
  1. 7 3
      src/components/imageAIVerifyErr.vue
  2. 3 1
      src/components/uploadVNormal.vue

+ 7 - 3
src/components/imageAIVerifyErr.vue

@@ -127,8 +127,11 @@ export default {
       if (npkpiData.checkInfo) {
         // 照片合格并且没有作弊
         if (npkpiData.checkInfo.qualifiedState == 1 && npkpiData.checkInfo.cheatState == 0) {
-          this.close();
-          this.$emit('normalFlow', { data: this.imageAIVerifyData });
+          // this.close();
+          // this.$emit('normalFlow', { data: this.imageAIVerifyData });
+          // recognizeType 识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别)
+          let isUpdate = npkpiData.recognizeType == 1 ? 'isUpdate' : null;
+          this.confirmUpload(isUpdate);
         } else {
           // 失败次数增加超过三次特殊处理
           store.dispatch('setShotsNum', this.shotsNum + 1);
@@ -148,7 +151,8 @@ export default {
       this.$emit('close');
       this.$emit('uploadImgFun');
     },
-    // 仍要上传
+    // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过
+    // isUpdate:是否更新店招照片,只有门店店招需要更新
     confirmUpload(isUpdate) {
       this.$emit('close');
       this.$emit('confirmUpload', {

+ 3 - 1
src/components/uploadVNormal.vue

@@ -323,6 +323,7 @@ export default {
       this.progressFlag = false;
       this.percentage = 0;
     },
+    // 仍要上传
     confirmUpload(res) {
       if (this.photoIdentifyType) {
         var form = {
@@ -337,8 +338,9 @@ export default {
           secondCollectionId: this.secondCollectionId, //	Long	第二级采集项id,取当前采集项的字段就行
           putInCode: this.putInCode, //	String	当前任务对应的投放编号
           deviceCode: this.deviceCode, //	String	当前任务对应的设备编号
-          url: res.data.url, //	String	当前拍摄图片的url
           collectionItemId: this.collectionId,
+          url: res.data.url, //	String	当前拍摄图片的url
+          businessId: res.data.businessId, // 当前拍摄图片id
         };
         if (res.isUpdate) form.isUpdate = 'true';
         addPhotoToDB(form).then(() => {});