From 7c9ade3d6835a14675099d2f48d2c5f7338835ab Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 20 Dec 2025 14:20:30 +0800
Subject: [PATCH] feat:小程序端,任务、工单新建调整
---
src/pages.json | 3 ++-
src/subPackages/taskDetail/addTask/index.vue | 1 +
src/pages/work/index.vue | 19 ++++++++++++++++++-
src/pages/inspectionTask/index.vue | 16 ++++++++++++++++
4 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/src/pages.json b/src/pages.json
index ff2c1c6..9cd978c 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -65,7 +65,8 @@
{
"path": "taskDetail/addTask/index",
"style": {
- "navigationBarTitleText": "新建任务"
+ "navigationBarTitleText": "新建任务",
+ "navigationStyle": "custom"
}
},
{
diff --git a/src/pages/inspectionTask/index.vue b/src/pages/inspectionTask/index.vue
index 7be966d..be56b1d 100644
--- a/src/pages/inspectionTask/index.vue
+++ b/src/pages/inspectionTask/index.vue
@@ -19,10 +19,21 @@
const updateKey = ref(0);
const sxListKey = ref(0);
const viewUrl = computed(() => {
+ // #ifdef MP-WEIXIN
return getWebViewUrl("/inspectionTask", {
updateKey: updateKey.value,
sxListKey: sxListKey.value,
+ showAddBtn: 1,
});
+ // #endif
+
+ // #ifndef MP-WEIXIN
+ return getWebViewUrl("/inspectionTask", {
+ updateKey: updateKey.value,
+ sxListKey: sxListKey.value,
+ showAddBtn: 0,
+ });
+ // #endif
});
watch(
@@ -49,6 +60,11 @@
}
// #endif
}
+
+ if (data.type === "addTask") {
+ // #ifdef MP-WEIXIN
+ // #endif
+ }
}
const isApp = ref(false);
onShow(() => {
diff --git a/src/pages/work/index.vue b/src/pages/work/index.vue
index 942ecdd..a8e4a93 100644
--- a/src/pages/work/index.vue
+++ b/src/pages/work/index.vue
@@ -2,7 +2,7 @@
* @Author : yuan
* @Date : 2025-12-18 10:06:30
* @LastEditors : yuan
- * @LastEditTime : 2025-12-20 11:37:09
+ * @LastEditTime : 2025-12-20 14:18:42
* @FilePath : \src\pages\work\index.vue
* @Description :
* Copyright 2025 OBKoro1, All Rights Reserved.
@@ -28,12 +28,28 @@
// const viewUrl = getWebViewUrl('/work', {})
const updateKey = ref(0);
const viewUrl = computed(() => {
+ // #ifdef MP-WEIXIN
return getWebViewUrl("/work", {
updateKey: updateKey.value,
+ showAddBtn: 1,
});
+ // #endif
+
+ // #ifndef MP-WEIXIN
+ return getWebViewUrl("/work", {
+ updateKey: updateKey.value,
+ showAddBtn: 0,
+ });
+ // #endif
});
function onPostMessage(data) {
+ // #ifdef MP-WEIXIN
+ if (data.type === "addWork") {
+ }
+ // #endif
+
+ // #ifndef MP-WEIXIN
if (data.type === "jumpMapNav") {
uni.navigateTo({
url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
@@ -47,6 +63,7 @@
url: `/subPackages/workDetail/photoMagnify/index?eventNum=${data.eventNum}`,
});
}
+ // #endif
}
const isApp = ref(false);
onShow(() => {
diff --git a/src/subPackages/taskDetail/addTask/index.vue b/src/subPackages/taskDetail/addTask/index.vue
index 08cec2b..b679b3e 100644
--- a/src/subPackages/taskDetail/addTask/index.vue
+++ b/src/subPackages/taskDetail/addTask/index.vue
@@ -52,6 +52,7 @@
console.error(e);
}
}
+
viewUrl.value = getWebViewUrl("/addTask", params);
});
--
Gitblit v1.9.3