From b055b398478b510ee604b82c317c7cd929c72852 Mon Sep 17 00:00:00 2001
From: 刘淇 <290219706@qq.com>
Date: Wed, 19 Aug 2026 14:50:38 +0800
Subject: [PATCH] 地图导航
---
pages-sub/problem/work-order-manage/index.vue | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/pages-sub/problem/work-order-manage/index.vue b/pages-sub/problem/work-order-manage/index.vue
index d424777..50afcdd 100644
--- a/pages-sub/problem/work-order-manage/index.vue
+++ b/pages-sub/problem/work-order-manage/index.vue
@@ -74,7 +74,7 @@
工单编号:
{{ item.orderNo || '-' }}
-
+
工单位置:
{{ item.lonLatAddress || '-' }}
@@ -144,7 +144,7 @@
工单编号:
{{ item.orderNo || '-' }}
-
+
工单位置:
{{ item.lonLatAddress || '-' }}
@@ -351,6 +351,34 @@ const acceptImgs = useUploadImgs({
fieldName: 'acceptImgs' // 自定义字段名,区分回退图片
})
+// 打开地图导航
+const openMapNav = (item) => {
+ // 校验经纬度
+ // if (!item.lat || !item.lon) {
+ // uni.showToast({ title: "该工单无经纬度,无法导航", icon: "none" });
+ // return;
+ // }
+ // const latitude = Number(item.lat);
+ // const longitude = Number(item.lon);
+ // const addressName = item.lonLatAddress || "工单位置";
+
+ // uni.openLocation({
+ // latitude,
+ // longitude,
+ // name: addressName, // 终点名称
+ // address: addressName, // 地址描述
+ // scale: 16, // 地图缩放级别
+ // success: () => {
+ // // 唤起地图选择弹窗成功,用户可以选择高德/百度地图进行导航
+ // },
+ // fail: (err) => {
+ // console.error("打开地图失败", err);
+ // uni.showToast({ title: "打开地图失败", icon: "none" });
+ // }
+ // });
+};
+
+
// 分页查询列表
const queryList = async (pageNo, pageSize) => {
try {
--
libgit2 0.21.4