From 2de633725d5e5d843853240933f63220dc4e4cb2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 03 十二月 2025 16:53:57 +0800
Subject: [PATCH] fix: 导体会存在每隔一段距离需要标记的情况,需要通知工人进行标记。

---
 src/pages/routingInspection/detail/indexLS.vue |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/pages/routingInspection/detail/indexLS.vue b/src/pages/routingInspection/detail/indexLS.vue
index d2d46a6..5c35396 100644
--- a/src/pages/routingInspection/detail/indexLS.vue
+++ b/src/pages/routingInspection/detail/indexLS.vue
@@ -303,6 +303,8 @@
       </div>
     </wd-popup>
     <wd-toast />
+    <!-- 鎵爜缁勪欢 -->
+    <Scan ref="scanRef" emit-name="scanLS" />
   </view>
 </template>
 
@@ -314,6 +316,7 @@
 import AttachmentUpload from "../upload.vue";
 import { useUserStore } from "@/store/modules/user";
 import { useScanCode } from "@/composables/useScanCode";
+import Scan from "@/components/scan/index.vue";
 
 // 鏍稿績鐘舵��
 const paramsId = ref("");
@@ -325,6 +328,7 @@
 const tempFiles = ref<any[]>([]);
 const toast = useToast();
 const attachmentRef = ref<any>(null);
+const scanRef = ref(); // 鎵爜缁勪欢寮曠敤
 
 // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅
 const userStore = useUserStore();
@@ -594,12 +598,16 @@
 };
 
 const openScan = () => {
-  console.log("indexLS - 鐐瑰嚮鎵爜鎸夐挳锛堝叏灞�鎵爜妯″紡锛屾棤闇�鎵嬪姩瑙﹀彂锛�");
-  // 鍏ㄥ眬鎵爜妯″紡涓嬶紝纭欢鎵爜浼氳嚜鍔ㄨЕ鍙戯紝鏃犻渶鎵嬪姩璋冪敤
-  uni.showToast({
-    title: "璇蜂娇鐢ㄦ壂鐮佹灙鎵弿",
-    icon: "none",
-  });
+  console.log("indexLS - 鐐瑰嚮鎵爜鎸夐挳锛岃Е鍙戞壂鐮�");
+  // 瑙﹀彂鎵爜
+  if (scanRef.value) {
+    scanRef.value.triggerScan();
+  } else {
+    uni.showToast({
+      title: "鎵爜缁勪欢鏈垵濮嬪寲",
+      icon: "none",
+    });
+  }
 };
 
 // 椤甸潰鏄剧ず鏃剁殑澶勭悊
@@ -615,13 +623,13 @@
     console.log("鈿狅笍 鏈娴嬪埌鎵爜缂撳瓨锛岀敤鎴烽渶瑕佹壂鎻忚澶囦簩缁寸爜");
     // 鍦ㄧ紪杈戞ā寮忎笅鎵嶆彁绀�
     if (isEdit.value) {
-      setTimeout(() => {
-        uni.showToast({
-          title: "璇锋壂鎻忚澶囦簩缁寸爜鍚庡啀淇濆瓨",
-          icon: "none",
-          duration: 2000,
-        });
-      }, 500);
+      // setTimeout(() => {
+      //   uni.showToast({
+      //     title: "璇锋壂鎻忚澶囦簩缁寸爜鍚庡啀淇濆瓨",
+      //     icon: "none",
+      //     duration: 2000,
+      //   });
+      // }, 500);
     }
   }
 });

--
Gitblit v1.9.3