From 9738ebf09280ceb2e573e1826bdf60ee527176cd Mon Sep 17 00:00:00 2001
From: Sliverber <2622874537@qq.com>
Date: Fri, 5 Jul 2024 18:04:15 +0800
Subject: [PATCH] 11
---
manifest.json | 9 +-
pages/index/index.vue | 15 ++--
pages_admin/order/device_detail.vue | 6 +-
pages_admin/order/order_detail.vue | 130 +++++++++++++++++++---------
pages_admin/order/search_device.vue | 2 +
pages_admin/worke/worke_income.vue | 4 +-
pages_admin/worke/worke_user.vue | 4 +-
7 files changed, 112 insertions(+), 58 deletions(-)
diff --git a/manifest.json b/manifest.json
index 18eaddc..da040ab 100644
--- a/manifest.json
+++ b/manifest.json
@@ -64,7 +64,14 @@
"desc" : "你的位置信息将用来查看附近车辆"
}
},
- "requiredPrivateInfos" : [ "getLocation", "chooseAddress", "chooseLocation" ]
+ "requiredPrivateInfos" : [
+ "startLocationUpdate",
+ "startLocationUpdateBackground",
+ "onLocationChange",
+ "getLocation",
+ "chooseAddress",
+ "chooseLocation"
+ ]
},
"mp-alipay" : {
"usingComponents" : true
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 191d082..f3979bf 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -1311,7 +1311,7 @@
this.freeInfo = {}
this.freeListIndex = 0
this.mappolyline = []
- this.lastClickedMarkerId=null
+ // this.lastClickedMarkerId=null
// const {
// latitude,
// longitude
@@ -1366,6 +1366,7 @@
}
},
onMarkerTap(e) {
+
this.showdevice = false;
this.deviceIndex = 0;
this.type = 0;
@@ -1396,7 +1397,7 @@
return marker;
});
}
-
+ this.lastClickedMarkerId = e.markerId;
// Update the clicked marker's image and zIndex
this.markers = this.markers.map(marker => {
if (marker.id === e.markerId) {
@@ -1412,7 +1413,7 @@
});
// Store the ID of the currently clicked marker
- this.lastClickedMarkerId = e.markerId;
+
// Get the latitude and longitude of the clicked marker
const clickedMarker = this.markers.find(marker => marker.id === e.markerId);
@@ -1424,7 +1425,7 @@
console.log(`Clicked marker location - Latitude: ${latitude}, Longitude: ${longitude}`);
this.routePlanning(latitude, longitude)
// Find nearby markers
- this.getNearbyMarkers(latitude, longitude);
+ // this.getNearbyMarkers(latitude, longitude);
}
// console.log(this.markers, 'Updated markers');
@@ -1488,11 +1489,11 @@
// 更新markers数组,避免删除已识别的重要标记
let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
-
+ // console.log(this.lastClickedMarkerId,'this.lastClickedMarkerIdthis.lastClickedMarkerId');
// 确保点击的标记保持其图标
- if (this.lastClickedMarkerId !== null) {
+ if (this.lastClickedMarkerId != null) {
updatedMarkers = updatedMarkers.map(marker => {
- if (marker.id == this.lastClickedMarkerId) {
+ if (marker.id === this.lastClickedMarkerId) {
return {
...marker,
width: 50,
diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue
index 85e4e4a..673e10f 100644
--- a/pages_admin/order/device_detail.vue
+++ b/pages_admin/order/device_detail.vue
@@ -1380,7 +1380,7 @@
}
.page {
- padding-bottom: 250rpx;
+ padding-bottom: 400rpx;
width: 750rpx;
.maskloadpage {
@@ -1709,8 +1709,8 @@
.lines {
width: 750rpx;
- height: 2rpx;
- border: 2rpx solid #ccc;
+ // height: 2rpx;
+ border-bottom: 2rpx solid #E7E7E7;
}
.cont {
diff --git a/pages_admin/order/order_detail.vue b/pages_admin/order/order_detail.vue
index b5d095d..3caffcb 100644
--- a/pages_admin/order/order_detail.vue
+++ b/pages_admin/order/order_detail.vue
@@ -3,7 +3,8 @@