From 80501686a22bef80b38d8855707db593e97ab29c Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 22 Oct 2025 18:56:02 +0800
Subject: [PATCH] feat:更新代码
---
src/pages/map/index.vue | 14 ++++++++++----
src/pages/user/index.vue | 4 ++++
src/subPackages/taskDetail/addTask/index.vue | 19 +++++++++++++++++--
src/App.vue | 7 +++++++
src/pages/work/index.vue | 6 +++++-
src/pages/inspectionTask/index.vue | 7 ++++++-
6 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index c142132..3eb684d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -38,4 +38,11 @@
/* 每个页面公共css */
@import "uview-plus/index.scss";
@import "@/static/styles/common.scss";
+.uni-tabbar__item:nth-child(4) {
+ .uni-tabbar__bd {
+ .uni-tabbar__icon {
+ width: 60px !important;
+ }
+ }
+}
</style>
diff --git a/src/pages/inspectionTask/index.vue b/src/pages/inspectionTask/index.vue
index 9826f93..cafd9c3 100644
--- a/src/pages/inspectionTask/index.vue
+++ b/src/pages/inspectionTask/index.vue
@@ -7,6 +7,7 @@
import { getWebViewUrl } from "@/utils/index.js";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {onHide, onShow} from "@dcloudio/uni-app";
+import {errorFactory} from "sass-loader/dist/utils.js";
const viewUrl = getWebViewUrl('/inspectionTask')
@@ -28,10 +29,14 @@
isApp.value = true
uni.setTabBarItem({
index: 2, // Tab 的索引(从0开始)
- text: '新建任务',
+ // text: '新建任务',
visible: true,
"pagePath": "subPackages/taskDetail/addTask/index"
});
+ uni.setTabBarItem({
+ index: 3, // Tab
+ visible: false,
+ });
});
onHide(() => {
diff --git a/src/pages/map/index.vue b/src/pages/map/index.vue
index e15117d..49f7e88 100644
--- a/src/pages/map/index.vue
+++ b/src/pages/map/index.vue
@@ -25,12 +25,14 @@
uni.navigateTo({
url: "/subPackages/qrCode/index",
});
- }else if(data.type === "jumpAddWork"){//新建工单
+ } else if(data.type === "jumpAddWork"){//新建任务
+ console.log(data.rowItem, '9999')
+ const encodedData = encodeURIComponent(JSON.stringify(data.rowItem))
+ uni.setStorageSync('webview_params', encodedData)
uni.switchTab({
- url: "/subPackages/taskDetail/addTask/index",
+ url: `/subPackages/taskDetail/addTask/index`,
});
- }
- else if(data.type === 'jumpMapNav'){ //事件导航
+ } else if(data.type === 'jumpMapNav'){ //事件导航
uni.navigateTo({
url:`/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`
});
@@ -46,6 +48,10 @@
index: 2, // Tab 的索引(从0开始)
visible: false,
})
+ uni.setTabBarItem({
+ index: 3, // Tab
+ visible: true,
+ });
})
</script>
diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue
index 1fb3f62..ee2bcf2 100644
--- a/src/pages/user/index.vue
+++ b/src/pages/user/index.vue
@@ -63,6 +63,10 @@
index: 2, // Tab 的索引(从0开始)
visible: false,
})
+ uni.setTabBarItem({
+ index: 3, // Tab
+ visible: true,
+ });
})
// window.addEventListener('message', (event) => {
// console.log('message')
diff --git a/src/pages/work/index.vue b/src/pages/work/index.vue
index ba9ef11..031f261 100644
--- a/src/pages/work/index.vue
+++ b/src/pages/work/index.vue
@@ -28,10 +28,14 @@
onShow(() => {
uni.setTabBarItem({
index: 2, // Tab 的索引(从0开始)
- text: '新建工单',
+ // text: '新建工单',
visible: true,
"pagePath": "subPackages/workDetail/addWork/index"
});
+ uni.setTabBarItem({
+ index: 3, // Tab
+ visible: false,
+ });
isApp.value = true
});
diff --git a/src/subPackages/taskDetail/addTask/index.vue b/src/subPackages/taskDetail/addTask/index.vue
index 5dfea79..6d4aeaa 100644
--- a/src/subPackages/taskDetail/addTask/index.vue
+++ b/src/subPackages/taskDetail/addTask/index.vue
@@ -7,9 +7,12 @@
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
-import {onHide, onShow} from "@dcloudio/uni-app";
+import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
-const viewUrl = ref(getWebViewUrl('/addTask'))
+// const viewUrl = ref(getWebViewUrl('/addTask'))
+const sWebViewRef = ref(null);
+const viewUrl = ref('')
+
function onPostMessage(data) {
if (data.type === 'submitSuccess'){
uni.switchTab({
@@ -17,9 +20,21 @@
});
}
}
+
+// onLoad( (options) => {
+// console.log(options, '8888')
+// const sns = options.device_sn
+//
+// });
+
const isApp = ref(false)
onShow(() => {
isApp.value = true
+ let params = {}
+ const encodedData = uni.getStorageSync('webview_params')
+ params = JSON.parse(decodeURIComponent(encodedData))
+console.log(params, '6666')
+ viewUrl.value = getWebViewUrl('/addTask', params)
});
onHide(() => {
--
Gitblit v1.9.3