From 648904d076ae6e17892b40675598b1c8dc474277 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 24 Apr 2026 16:21:12 +0800
Subject: [PATCH] Merge branch 'feature/v9.0/9.0.3' into feature/v9.0/9.0.4
---
src/subPackages/taskDetail/execution/index.vue | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/subPackages/taskDetail/execution/index.vue b/src/subPackages/taskDetail/execution/index.vue
index 09234ef..8a11578 100644
--- a/src/subPackages/taskDetail/execution/index.vue
+++ b/src/subPackages/taskDetail/execution/index.vue
@@ -1,6 +1,6 @@
<!-- 已执行 -->
<template>
- <WebViewPlus v-if="isApp" :src="`${viewUrl}`"/>
+ <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
@@ -8,7 +8,9 @@
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
-const viewUrl = ref(getWebViewUrl('/execution'))
+const wayLineJobInfoId = ref(null)
+const viewUrl = ref('')
+// const viewUrl = ref(getWebViewUrl('/execution'))
// function onPostMessage(data) {
// console.log(data, '9999')
@@ -19,13 +21,34 @@
// });
// }
// }
+function onPostMessage(data) {
+ if (data.type === 'back') {
+ uni.switchTab({
+ url: '/pages/inspectionTask/index'
+ });
+ } else if (data.type === 'control') {
+ uni.redirectTo({
+ url: `/pages/inspectionTask/execution/index?wayLineJobInfoId=${wayLineJobInfoId.value}`
+ });
+ } else if(data.type === 'workid') {
+ uni.navigateTo({
+ url: `/subPackages/workDetail/index?eventNum=${data.eventNum}&wLJobInfoId=${data.wLJobInfoId}¤t=${data.current}`
+ });
+ }
+}
+
+onLoad((options) => {
+ wayLineJobInfoId.value = options.wayLineJobInfoId
+ viewUrl.value = getWebViewUrl('/execution', {wayLineJobInfoId: wayLineJobInfoId.value, waylineJobId: options.waylineJobId, batch_no: options.batch_no})
+})
const isApp = ref(false)
onShow(() => {
isApp.value = true
});
onHide(() => {
- isApp.value = false
+ // 如果工单详情返回任务详情,那么tab栏对应的是关联事件一项
+ // isApp.value = false
});
</script>
--
Gitblit v1.9.3