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/workDetail/index.vue | 191 +++++++++++++++--------------------------------
1 files changed, 60 insertions(+), 131 deletions(-)
diff --git a/src/subPackages/workDetail/index.vue b/src/subPackages/workDetail/index.vue
index cb02317..8adecf1 100644
--- a/src/subPackages/workDetail/index.vue
+++ b/src/subPackages/workDetail/index.vue
@@ -1,139 +1,68 @@
<!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
<template>
- <div class="workDetailContainer">
- <web-view ref="sWebViewRef" :src="`${viewUrl}`" />
- </div>
+ <div class="workDetailContainer">
+ <WebViewPlus
+ ref="sWebViewRef"
+ :src="`${viewUrl}`"
+ @webMessage="onPostMessage"
+ />
+ </div>
</template>
<script setup>
- import { onLoad } from '@dcloudio/uni-app';
- import { useUserStore } from '@/store/index.js'
- const userStore = useUserStore()
- const userInfo = userStore.userInfo
- const sWebViewRef = ref(null);
- const viewUrl = ref(`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}`);
- onLoad( (options) => {
- const eventNum= options.eventNum;
-
- viewUrl.value =`http://192.168.1.157:5173/drone-app-web-view/#/webViewWrapper/workDetail?params=${JSON.stringify(userStore?.userInfo)}&eventNum=${eventNum}`
- });
+import { getWebViewUrl } from "@/utils/index.js";
+import { onLoad } from "@dcloudio/uni-app";
+import { useUserStore } from "@/store/index.js";
+const userStore = useUserStore();
+const userInfo = userStore.userInfo;
+const sWebViewRef = ref(null);
+const viewUrl = ref("");
+onLoad((options) => {
+ const eventNum = options.eventNum;
+ viewUrl.value = getWebViewUrl("/workDetail", {
+ eventNum: eventNum,
+ totalNum: options.totalNum,
+ keyword: options.keyword,
+ aiType: options.aiType,
+ wLJobInfoId: options.wLJobInfoId,
+ status: options.status,
+ current: options.current,
+ });
+});
+
+function onPostMessage(data) {
+ if (data.type === "workback") {
+ // #ifdef MP-WEIXIN
+ if ("fun" in data && data.fun === "add") {
+ uni.setStorageSync("joinParams", {
+ type: "add",
+ });
+ }
+ // #endif
+
+ // #ifndef MP-WEIXIN
+ uni.setStorageSync("joinParams", {
+ type: "add",
+ });
+ uni.switchTab({
+ url: `/pages/work/index?addLog=111`,
+ // url: '/pages/work/index'
+ });
+ // #endif
+ } else if (data.type === "jumpMapNav") {
+ // #ifndef MP-WEIXIN
+ uni.navigateTo({
+ url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
+ });
+ // #endif
+ }
+}
</script>
<style lang="scss" scoped>
- .workDetailContainer {
- padding: 0 10px;
-
- .detailTop {
- .image-container {
- position: relative;
- width: 100%;
- height: 200px;
-
- .detailImage {
- width: 100%;
- height: 100%;
- display: block;
- object-fit: cover
- }
-
- .detailTitle {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- }
-
- .titleText {
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- }
- }
- }
-
- .stepContainer {
- margin-top: 10px;
- display: flex;
- background-color: antiquewhite;
- border-radius: 5px;
- padding: 10px;
-
- .horizontal-step {
- display: flex;
- align-items: center;
- gap: 12px;
-
- .step-title {
- min-width: 60px;
- }
-
- .step-desc {
- display: flex;
- justify-content: space-between;
- gap: 8px;
- // color: #666;
- font-size: 14px;
- }
- }
-
- }
-
-
- .actionButton {
- display: flex;
- justify-content: space-between;
- margin-bottom: 10px;
-
- .btngroups {
- display: flex;
- justify-content: space-between;
-
- .u-button {
- padding: 9px 20px;
- height: 32px;
-
- &:last-child {
- margin-left: 12px;
- margin-right: 12px;
- }
- }
- }
-
- .leftBtn {
- width: 70px;
- height: 32px;
- background-color: #999;
- border-radius: 5px;
- text-align: center;
- line-height: 32px;
- color: #fff;
- cursor: pointer;
- opacity: 0.8;
- }
-
- .disableds {
- background: #999 !important;
- cursor: not-allowed !important;
- pointer-events: none;
- opacity: 0.3 !important;
- }
- }
-
- .workOrderContent {
- margin-top: 15px;
-
- .workOrderContainer {
- div {
- margin-bottom: 10px;
- }
-
- .titketName {
- display: flex;
- align-items: center;
- }
- }
- }
-
- }
-</style>
\ No newline at end of file
+.workDetailContainer {
+ width: 100%;
+ height: 100%;
+ background-size: cover;
+}
+</style>
--
Gitblit v1.9.3