Jelajahi Sumber

图像识别

zhujindu 1 tahun lalu
induk
melakukan
58f3f9077b

+ 7 - 60
src/components/imageAIVerifyErr.vue

@@ -9,8 +9,6 @@
       :close-on-click-modal="false"
       custom-class="AIVerifyErrdialog">
       <div class="AIVerifyErrMask">
-        <!-- <van-popup v-model="vanPopup" @close="close" :close-on-click-overlay="false"> -->
-        <!-- <div class="title"></div> -->
         <div class="contentAIVerify">
           <div class="AIVerify">{{ contentMessage }}</div>
           <div class="uploadImgAIVerify" @click="uploadImg" v-if="shopSignChange != 1">
@@ -20,9 +18,11 @@
             </div>
           </div>
         </div>
-        <div class="uploadBtnAIVerify" v-if="shotsNum >= 3 && shopSignChange != 1">
-          <div class="tipsAIVerify" @click="openTips">
-            <van-icon name="question-o" />上传后会有何影响
+        <div class="uploadBtnAIVerify">
+          <div class="tipsAIVerify">
+            <!-- <div class="tipsAIVerify" @click="openTips"> -->
+            <!-- <van-icon name="question-o" />上传后会有何影响 -->
+            <van-icon name="question-o" />不规范的照片上传后会更换本店标准店招,未来每次拜访时校验。
           </div>
           <div class="confirmUploadAIVerify" @click="confirmUpload">仍要上传</div>
         </div>
@@ -60,61 +60,8 @@
           <div>若历史照片拍摄不规范,请选择<span style="color: #81b337">更新门店照</span></div>
           <div>本次拜访店招会作为本店标准店招,未来每次拜访时校验</div>
         </div>
-        <!-- </van-popup> -->
       </div>
     </el-dialog>
-    <!-- <div class="AIVerifyErrMask">
-      <van-popup v-model="vanPopup" @close="close" :close-on-click-overlay="false">
-      <div class="title">图像识别结果</div>
-      <div class="content">
-        <div class="AIVerify">{{ contentMessage }}</div>
-        <div class="uploadImg" @click="uploadImg" v-if="shopSignChange != 1">
-          <div class="label"><span class="van-f-red">*</span>重新拍照上传</div>
-          <div class="icon">
-            <van-icon class="photo photos" name="photograph" size="22px" color="#969696" />
-          </div>
-        </div>
-      </div>
-      <div class="uploadBtnAIVerify" v-if="shotsNum >= 3 && shopSignChange != 1">
-        <div class="tipsAIVerify"><van-icon name="question-o" @click="openTips" />上传后会有何影响</div>
-        <div class="confirmUpload" @click="confirmUpload">仍要上传</div>
-      </div>
-      <div class="uploadBtnAIVerify" v-if="shopSignChange == 1">
-        <div class="confirmUpload" @click="uploadImg">重新拍照</div>
-        <div class="changeImageAIVerify" @click="confirmUpload">更换门店照</div>
-      </div>
-      <div class="historyImageAIVerify" v-if="shopSignChange == 1">
-        <div class="initImage imageItemAIVerify" v-if="imageAIVerifyData.createStoreUrl">
-          <img
-            :src="imageAIVerifyData.createStoreUrl"
-            width="100px"
-            height="100px"
-            @click="previewsImg(imageAIVerifyData.createStoreUrl)" />
-          <span>建店时店招</span>
-        </div>
-        <div class="newestImage imageItemAIVerify" v-if="imageAIVerifyData.lastVisitUrl">
-          <img
-            :src="imageAIVerifyData.lastVisitUrl"
-            width="100px"
-            height="100px"
-            @click="previewsImg(imageAIVerifyData.lastVisitUrl)" />
-          <span>上次拜访店招</span>
-        </div>
-        <div class="presentImage imageItemAIVerify" v-if="imageAIVerifyData.url">
-          <img
-            :src="imageAIVerifyData.url"
-            width="100px"
-            height="100px"
-            @click="previewsImg(imageAIVerifyData.url)" />
-          <span>本次拜访店招</span>
-        </div>
-      </div>
-      <div class="tipsRemarkAIVerify" v-if="shopSignChange == 1">
-        <p>若历史照片拍摄不规范,请选择<span style="color: #81b337">更新门店照</span></p>
-        <p>本次拜访店招会作为本店标准店招,未来每次拜访时校验</p>
-      </div>
-      </van-popup>
-    </div> -->
   </div>
 </template>
 <script>
@@ -310,8 +257,8 @@ export default {
     }
     .tipsAIVerify {
       font-size: 14px;
-      color: #e7e734;
-      white-space: nowrap;
+      color: red;
+      /* white-space: nowrap; */
     }
     .confirmUploadAIVerify {
       background-color: red;

+ 15 - 0
src/components/uploadVNormal.vue

@@ -9,7 +9,9 @@
         type="circle"
         :percentage="percentage"
         :show-text="true"
+        width="110"
         :format="format"></el-progress>
+      <!-- <div class="progressClose" @progressClose="progressClose">取消</div> -->
     </div>
     <imageAIVerifyErr
       v-if="imageAIVerifyFlag"
@@ -354,6 +356,8 @@ export default {
           this.normalFlow(res);
         });
     },
+    // 取消图片上传
+    progressClose() {},
   },
 };
 </script>
@@ -398,6 +402,17 @@ export default {
     justify-content: center;
     align-items: center;
     z-index: 99999999;
+    .progressClose {
+      width: 60px;
+      text-align: center;
+      background: #67c23a;
+      color: #fff;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 5px;
+      margin-top: 5px;
+      font-size: 12px;
+    }
   }
 }
 #allmap {

+ 49 - 69
src/views/deviceWithin/addStoreVisit.vue

@@ -3822,54 +3822,39 @@ export default {
     },
     newimgarr1(val) {
       this.show = false;
+      //是否开启图匠识别,(1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招)
+      //  拍摄店招时只允许上传一张
+      let photoIdentifyType = val.photoIdentifyType;
       if (this.pType == 'D') {
-        if (
+        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 == null
-        ) {
-          this.collectionItemList[this.indeximg].collectionOptionList[
-            this.childIndex1
-          ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-            this.childIndex3
-          ].collectionOptionList[this.childIndex4].collectionItems[this.childIndex5].fileInfoList =
-            [];
+            .collectionItems[this.childIndex5].fileInfoList;
+        if (fileInfoList == null) {
+          fileInfoList = [];
+        }
+        if (photoIdentifyType == 1) {
+          fileInfoList = [val];
+        } else {
+          fileInfoList.push(val);
         }
-        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);
       }
       if (this.pType == 'E') {
-        if (
+        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 == null
-        ) {
-          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 =
-            [];
+            .collectionItems[this.childIndex7].fileInfoList;
+        if (fileInfoList == null) {
+          fileInfoList = [];
+        }
+        if (photoIdentifyType == 1) {
+          fileInfoList = [val];
+        } else {
+          fileInfoList.push(val);
         }
-        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);
       }
       if (this.pType == 'A' || this.pType == 'B') {
         var child = false;
@@ -3888,54 +3873,49 @@ export default {
           }
         }
         if (child) {
+          let fileInfoList =
+            this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
+              this.childIndex
+            ].fileInfoList;
           for (
             let childi = 0;
             childi < this.collectionItemList[this.indeximg].collectionOptionList.length;
             childi++
           ) {
-            if (
-              this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
-                this.childIndex
-              ].fileInfoList == null ||
-              this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
-                this.childIndex
-              ].fileInfoList == undefined
-            ) {
-              this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
-                this.childIndex
-              ].fileInfoList = [];
+            if (fileInfoList == null || fileInfoList == undefined) {
+              fileInfoList = [];
+            }
+            if (photoIdentifyType == 1) {
+              fileInfoList = [val];
+            } else {
+              fileInfoList.push(val);
             }
-            this.collectionItemList[this.indeximg].collectionOptionList[childi].collectionItems[
-              this.childIndex
-            ].fileInfoList.push(val);
           }
         } else {
-          if (
-            this.collectionItemList[this.indeximg].fileInfoList == null ||
-            this.collectionItemList[this.indeximg].fileInfoList == undefined
-          ) {
-            this.collectionItemList[this.indeximg].fileInfoList = [];
+          let fileInfoList = this.collectionItemList[this.indeximg].fileInfoList;
+          if (fileInfoList == null || fileInfoList == undefined) {
+            fileInfoList = [];
+          }
+          if (photoIdentifyType == 1) {
+            fileInfoList = [val];
+          } else {
+            fileInfoList.push(val);
           }
-          this.collectionItemList[this.indeximg].fileInfoList.push(val);
         }
       }
       if (this.pType == 'C') {
-        if (
+        let fileInfoList =
           this.collectionItemList[this.indeximg].collectionOptionList[this.childIndex1]
             .collectionItems[this.childIndex].collectionOptionList[this.childIndex2]
-            .collectionItems[this.childIndex3].fileInfoList == null
-        ) {
-          this.collectionItemList[this.indeximg].collectionOptionList[
-            this.childIndex1
-          ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-            this.childIndex3
-          ].fileInfoList = [];
+            .collectionItems[this.childIndex3].fileInfoList;
+        if (fileInfoList == null) {
+          fileInfoList = [];
+        }
+        if (photoIdentifyType == 1) {
+          fileInfoList = [val];
+        } else {
+          fileInfoList.push(val);
         }
-        this.collectionItemList[this.indeximg].collectionOptionList[
-          this.childIndex1
-        ].collectionItems[this.childIndex].collectionOptionList[this.childIndex2].collectionItems[
-          this.childIndex3
-        ].fileInfoList.push(val);
       }
     },
     zSelectVal(value) {