Przeglądaj źródła

新增 ocr单据查看

wzh 3 lat temu
rodzic
commit
cedceae9ea
1 zmienionych plików z 13 dodań i 0 usunięć
  1. 13 0
      src/views/voyage/voyageDetail.vue

+ 13 - 0
src/views/voyage/voyageDetail.vue

@@ -1100,6 +1100,16 @@
             <el-input size="small" v-model="scope.row.weigher"></el-input>
             <el-input size="small" v-model="scope.row.weigher"></el-input>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
+        <el-table-column label="查看" min-width="120" align="center">
+          <template v-slot="scope">
+            <el-image
+              style="height: 40px; width: 60px"
+              fit="contain"
+              :src="scope.row.viewUrl"
+              :preview-src-list="ocrImageList"
+            ></el-image
+          ></template>
+        </el-table-column>
         <!-- <el-table-column label="操作" min-width="120" align="center">
         <!-- <el-table-column label="操作" min-width="120" align="center">
           <template v-slot="scope">
           <template v-slot="scope">
             <el-button
             <el-button
@@ -2024,6 +2034,7 @@ async function deleteOcrRecord(index) {
 let distributePoundForm = ref({});
 let distributePoundForm = ref({});
 async function ocr() {
 async function ocr() {
   ocrLoading.value = true;
   ocrLoading.value = true;
+  ocrImageList.value = [];
   let res = await api.ocr({
   let res = await api.ocr({
     recordIds: recordIds.value,
     recordIds: recordIds.value,
   });
   });
@@ -2031,6 +2042,7 @@ async function ocr() {
   ocrTruckRecordTableData.value = res.data.result;
   ocrTruckRecordTableData.value = res.data.result;
   for (let i of ocrTruckRecordTableData.value) {
   for (let i of ocrTruckRecordTableData.value) {
     if (i.weighTime) i.weighTime = i.weighTime.substring(0, 10);
     if (i.weighTime) i.weighTime = i.weighTime.substring(0, 10);
+    ocrImageList.value.push(i.viewUrl);
   }
   }
 }
 }
 let isCheckAll = ref(false);
 let isCheckAll = ref(false);
@@ -2055,6 +2067,7 @@ function checkItem() {
 }
 }
 
 
 let ocrLoading = ref(false);
 let ocrLoading = ref(false);
+let ocrImageList = ref([]);
 
 
 onMounted(() => {
 onMounted(() => {
   getVoyageDetail();
   getVoyageDetail();