Forráskód Böngészése

Merge branch 'feature_20251205_图片识别任务通过条件配置' into release

zhujindu 5 napja
szülő
commit
15f687c591

BIN
src/assets/taskPhotoErr.png


BIN
src/assets/taskPhotoSu.png


+ 71 - 23
src/views/historicalVisit/historicalDetails.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="historicalDetails">
     <!--        顶部条-->
     <van-nav-bar class="navBar" title="拜访任务" left-arrow @click-left="onClickLeft">
       <template #right>
@@ -96,15 +96,17 @@
       <template v-if="list.isSku == '是'">
         <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">SKU图像识别结果</div>
         <div class="card">
-          <div class="info" @click="toSkuRecognize">
+          <div
+            class="info"
+            @click="toSkuRecognize"
+            style="
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+              padding: 3px;
+            ">
             <p
-              style="
-                width: 94%;
-                margin: 0;
-                line-height: 24px;
-                padding: 10px 0;
-                display: inline-block;
-              ">
+              style="flex: 1; margin: 0; line-height: 24px; padding: 10px 0; display: inline-block">
               拍摄的所有产品陈列照识别结果:<span v-if="list.skuTotal" style="color: red"
                 >{{ list.skuTotal }}个</span
               >
@@ -119,20 +121,41 @@
       <div class="card" v-if="list.visitSource != 2">
         <div
           class="info"
-          style="line-height: 44px; font-size: 14px"
+          style="
+            font-size: 14px;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            padding: 3px;
+          "
           v-for="(item, index) in list.sfaTaskList"
           :key="index"
           @click="historiStoreVisit(item, index)">
-          <p
-            style="
-              width: 94%;
-              margin: 0;
-              line-height: 24px;
-              padding: 10px 0;
-              display: inline-block;
-            ">
+          <p style="flex: 1; margin: 0">
             {{ item.taskName }}
           </p>
+
+          <div class="taskPhotoConditionPassed" @click.stop>
+            <el-popover
+              :popper-class="item.taskPhotoConditionPassed == 1 ? 'zpoverSuccess' : 'zpover'"
+              placement="bottom"
+              width="120"
+              trigger="click"
+              :content="
+                item.taskPhotoConditionPassed == 1
+                  ? '陈列奖励案拍照AI识别通过'
+                  : '陈列奖励案拍照AI识别不通过'
+              ">
+              <div class="taskPhotoConditionPassed" slot="reference">
+                <img
+                  v-if="item.taskPhotoConditionPassed == 1"
+                  :src="require('@/assets/taskPhotoSu.png')" />
+                <img
+                  v-if="item.taskPhotoConditionPassed == 0"
+                  :src="require('@/assets/taskPhotoErr.png')" />
+              </div>
+            </el-popover>
+          </div>
           <p class="arrowdetils1">
             <van-icon name="arrow" />
           </p>
@@ -441,6 +464,8 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.historicalDetails {
+}
 .container {
   padding-bottom: 50px;
 }
@@ -485,13 +510,20 @@ export default {
       font-size: 14px;
       margin-top: 9px;
     }
+    .taskPhotoConditionPassed {
+      width: 33px;
+      margin: 0 5px;
+      display: inline-flex;
+      img {
+        width: 33px;
+        height: 25px;
+      }
+    }
     .arrowdetils1 {
       background: #fff;
-      position: absolute;
-      top: 50%;
       color: #444;
-      right: 0;
-      margin-top: -22px;
+      margin: 0;
+      margin-left: 5px;
     }
   }
 }
@@ -505,7 +537,7 @@ export default {
   }
 }
 </style>
-<style>
+<style lang="scss">
 .fontWeit .van-cell__title {
   font-weight: bold;
   font-size: 16px;
@@ -522,4 +554,20 @@ export default {
   border-radius: 6px;
   overflow: hidden;
 }
+.historicalDetails {
+  .card {
+    .el-popover__reference-wrapper {
+      display: flex;
+    }
+  }
+}
+.zpoverSuccess {
+  background-color: #28e978 !important;
+  color: #fff !important;
+  padding: 8px 10px !important;
+  z-index: 1 !important;
+  border-radius: 6px !important;
+  border: 0 !important;
+  box-shadow: none !important;
+}
 </style>

+ 57 - 0
src/views/historicalVisit/hisvistdeils.vue

@@ -269,6 +269,34 @@
         </div>
       </van-form>
     </div>
+    <!-- 识别结果 -->
+    <div class="identifyResult" v-if="taskPhotoRecognitionResult" style="padding: 0 10px">
+      <div style="font-weight: bold; padding: 10px; font-size: 16px">识别结果:</div>
+      <div class="resultContent">
+        <el-table
+          :data="taskPhotoRecognitionResult"
+          border
+          class="table-headermd1"
+          style="width: 100%">
+          <el-table-column label="" type="index" width="50px" align="center" />
+          <el-table-column label="产品" prop="skuProductName" align="center" />
+          <el-table-column label="要求" prop="conditionIdentifyNum" align="center" width="60px">
+          </el-table-column>
+          <el-table-column
+            label="识别排面数"
+            prop="identifyTheNumberOfCards"
+            width="70px"
+            align="center"
+            >meetTheStandard
+            <template slot-scope="scope">
+              <span :style="{ color: scope.row.meetTheStandard == 1 ? '#07c160' : 'red' }">
+                {{ scope.row.identifyTheNumberOfCards }}
+              </span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
     <van-dialog v-model="listShow" title="历史回显" show-cancel-button :showConfirmButton="false">
       <div style="border: 1px solid #eee; margin-top: 18px">
         <div class="itenHhistory" v-for="item in list">
@@ -325,6 +353,7 @@ export default {
       putInCode: '',
       inspectionType: '',
       equipmentCode: '',
+      taskPhotoRecognitionResult: null,
     };
   },
   activated() {
@@ -342,6 +371,7 @@ export default {
     } else {
       this.indexselect = 1;
     }
+    this.taskPhotoRecognitionResult = null;
     this.getPhotoTypeList();
     this.info();
   },
@@ -395,6 +425,8 @@ export default {
       getVisitsDetail({ visitsId: this.visitId }).then((res) => {
         this.toastLoading().clear();
         this.infoData = res.data;
+        this.taskPhotoRecognitionResult =
+          res.data.sfaTaskList[this.$route.query.ids].taskPhotoRecognitionResult;
         var collectionItemLists = res.data.sfaTaskList[this.$route.query.ids].collectionItemList;
         if (res.data.sfaTaskList[this.$route.query.ids].checkUnManage == 'Y') {
           this.checkShow = true;
@@ -665,6 +697,31 @@ export default {
   .z-cells .van-cell {
     padding-bottom: 0;
   }
+  .table-headermd1 {
+    font-size: 14px;
+    text-align: center;
+    position: initial;
+    width: 98% !important;
+    margin: 0 auto;
+    border-right: 0;
+    border-radius: 8px;
+    th {
+      color: #000;
+      font-weight: bold;
+    }
+    td {
+      color: #000;
+    }
+    .el-table__cell {
+      padding: 6px 0 !important;
+      .cell {
+        padding: 0;
+      }
+    }
+  }
+  .table-headermd1 th.el-table__cell {
+    // background-color: #f5f5f5;
+  }
 }
 </style>
 <style>