zhujindu 9 месяцев назад
Родитель
Сommit
31e9ff83b3
2 измененных файлов с 56 добавлено и 33 удалено
  1. 40 10
      src/views/AIImage/AIImageDetail.vue
  2. 16 23
      src/views/AIImage/list.vue

+ 40 - 10
src/views/AIImage/AIImageDetail.vue

@@ -26,7 +26,7 @@
       </div>
       <div class="item">
         <div class="label">拍摄类型:</div>
-        <div class="value">{{ data.identifyType }}</div>
+        <div class="value">{{ data.identifyType | filterType }}</div>
       </div>
       <div class="item">
         <div class="label">识别结果:</div>
@@ -50,7 +50,7 @@
         </div>
         <van-radio-group v-model="AIResult">
           <van-radio name="1">正确</van-radio>
-          <van-radio name="2">不正确</van-radio>
+          <van-radio name="0">不正确</van-radio>
         </van-radio-group>
       </div>
       <div class="cause">
@@ -71,13 +71,13 @@
 </template>
 <script>
 import { ImagePreview } from 'vant';
-import { getPhotoApproveDetail } from '@/api/AIImage';
+import { getPhotoApproveDetail, savePhotoApprove } from '@/api/AIImage';
 export default {
   name: 'AIImageDetail',
   data() {
     return {
       data: {},
-      storeId: null,
+      photoApproveId: null,
       AIResult: '1',
       causeTitle: '',
       causeMessage: '',
@@ -96,17 +96,41 @@ export default {
       immediate: true,
     },
   },
-  mounted() {
-    this.storeId = this.$route.query.storeId;
+  filters: {
+    filterType(val) {
+      if (val == 1) {
+        return '店招内容识别';
+      } else if (val == 2) {
+        return '门店代码识别';
+      } else if (val == 3) {
+        return '调色机识别';
+      } else if (val == 4) {
+        return '更换店招';
+      }
+    },
+  },
+  activated() {
+    this.photoApproveId = this.$route.query.photoApproveId;
     this.getDeytail();
   },
+  mounted() {},
   methods: {
     getDeytail() {
       this.toastLoading(0, '加载中...', true);
-      getPhotoApproveDetail({ photoApproveId: this.storeId }).then((res) => {
+      getPhotoApproveDetail({ photoApproveId: this.photoApproveId }).then((res) => {
         this.toastLoading().clear();
-        if (res.coede == 200) {
+        if (res.code == 200) {
           this.data = res.data;
+          this.$dialog
+            .confirm({
+              title: '系统提示',
+              message:
+                res.data.approveTime +
+                '时间已反馈该店拜访照异常原因及解决方案,此次拜访照仍异常,请及时跟进',
+              confirmButtonText: '确定',
+              showCancelButton: false,
+            })
+            .then(() => {});
         }
       });
     },
@@ -119,11 +143,17 @@ export default {
         return;
       }
       savePhotoApprove({
-        photo_approve_id: this.storeId, //	long	主键
+        photoApproveId: this.photoApproveId, //	long	主键
         resultCorrect: this.AIResult, //	string	AI识别是否正确: 1 正确 0不正确
         reasonsSolutions: this.AIResult == '1' ? this.causeMessage : '', //	string	原因及解决方案
         feedbackError: this.AIResult == '2' ? this.causeMessage : '', //	string	反馈AI识别不正确
-      }).then((res) => {});
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$toast('提交成功');
+        } else {
+          this.$toast('提交失败');
+        }
+      });
     },
   },
 };

+ 16 - 23
src/views/AIImage/list.vue

@@ -37,7 +37,8 @@
           </div>
           <div class="item">
             <div class="label">拍摄类型:</div>
-            <div class="value">{{ item.identifyType }}</div>
+            <!-- 1:店招内容识别,2:门店代码识别,3:调色机识别,4:更换店招 -->
+            <div class="value">{{ item.identifyType | filterType }}</div>
           </div>
           <div class="item">
             <div class="label">识别结果:</div>
@@ -61,6 +62,19 @@ export default {
       isLoading: false,
     };
   },
+  filters: {
+    filterType(val) {
+      if (val == 1) {
+        return '店招内容识别';
+      } else if (val == 2) {
+        return '门店代码识别';
+      } else if (val == 3) {
+        return '调色机识别';
+      } else if (val == 4) {
+        return '更换店招';
+      }
+    },
+  },
   activated() {
     this.getList();
   },
@@ -80,27 +94,6 @@ export default {
         this.isLoading = false;
         if (res.code == 200) {
           this.listData = res.rows;
-          this.listData = [
-            {
-              storeName: '和兴建材',
-              storeCode: '123456',
-              storeCategoryName: '铂金店',
-              addressLine:
-                '河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东河南省新乡市长葛县中心小学东20米路东',
-              visitUserNickName: '都雷闪',
-              approveTime: '2025-02-0614:41:53',
-              storeId: 882005,
-            },
-            {
-              storeName: '和兴建材',
-              storeCode: '123456',
-              storeCategoryName: '铂金店',
-              addressLine: '河南省新乡市长葛县中心小学东20米路东',
-              visitUserNickName: '都雷闪',
-              approveTime: '2025-02-0614:41:53',
-              storeId: 882005,
-            },
-          ];
         }
       }, 1000);
     },
@@ -109,7 +102,7 @@ export default {
       this.$router.push({
         path: '/AIImageDetail',
         query: {
-          storeId: item.storeId,
+          photoApproveId: item.photoApproveId,
         },
       });
     },