From fbe00c695aa8bd2aeaa395ea8a4f710f99d651d6 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 20 Dec 2025 11:38:29 +0800
Subject: [PATCH] feat: 批次id

---
 src/subPackages/inProgress/index.vue |   33 +++++++++++++++++++++++++--------
 1 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/src/subPackages/inProgress/index.vue b/src/subPackages/inProgress/index.vue
index a23c9b8..c13c04b 100644
--- a/src/subPackages/inProgress/index.vue
+++ b/src/subPackages/inProgress/index.vue
@@ -1,15 +1,16 @@
 <template>
-  <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/>
+  <WebViewPlus v-if="showComponent" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
 </template>
 
 <script setup>
 import WebViewPlus from "@/components/WebViewPlus.vue";
 import {getWebViewUrl} from "@/utils/index.js";
-import {onLoad} from "@dcloudio/uni-app";
+import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
 
-const wayLineJodInfoId = ref(null)
+const wayLineJobInfoId = ref(null)
+const batchNo = ref(null)
 const viewUrl = ref('')
-
+const showComponent = ref(false)
 function onPostMessage(data) {
   if (data.type === 'back') {
     uni.switchTab({
@@ -17,14 +18,30 @@
     });
   } else if (data.type === 'control') {
     uni.navigateTo({
-      url: `/subPackages/droneConsole/index?wayLineJodInfoId=${wayLineJodInfoId.value}`
+      url: `/subPackages/droneConsole/index?wayLineJobInfoId=${wayLineJobInfoId.value}&dockSn=${data.dockSn}&batchNo=${batchNo.value}`,
     });
   }
 }
 
-onLoad((options) => {
-  wayLineJodInfoId.value = options.wayLineJodInfoId
-  viewUrl.value = getWebViewUrl('/TaskInProgress', {wayLineJodInfoId: wayLineJodInfoId.value})
+onLoad((queryParams) => {
+  wayLineJobInfoId.value = queryParams.wayLineJobInfoId
+  batchNo.value = queryParams.batchNo
+  viewUrl.value = getWebViewUrl('/TaskInProgress', {
+    wayLineJobInfoId: wayLineJobInfoId.value,
+    batchNo: batchNo.value
+  })
+})
+
+onShow(function () {
+  showComponent.value = true
+  // #ifdef APP-PLUS
+  plus.navigator.setFullscreen(false);
+  plus.screen.lockOrientation("portrait-primary");
+  // #endif
+})
+
+onHide(() =>{
+  showComponent.value = false
 })
 </script>
 

--
Gitblit v1.9.3