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 @@ + :show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline" :enable-building="true" + > @@ -41,7 +42,7 @@ 行驶距离:{{orderInfo.distance/1000}}Km - + @@ -76,7 +77,7 @@ - + 费用明细 @@ -97,8 +98,8 @@ - - 停车点外调度费:{{orderInfo.manageFee}} + + 停车点外调度费:{{orderInfo.manageFee}} 骑行费用:{{orderInfo.ridingFee}} @@ -157,29 +158,29 @@ - 开锁时间:{{item.createTime}} + 开锁时间:{{ displayAmount(item.createTime)}} - 开锁地点: {{item.address}} + 开锁地点: {{ displayAmount(item.address)}} - 临时锁车时间:{{item.createTime}} + 临时锁车时间:{{ displayAmount(item.createTime)}} - 临时锁车地点:{{item.address}} + 临时锁车地点:{{ displayAmount(item.address)}} - 解除时间:{{item.createTime}} + 解除时间:{{ displayAmount(item.createTime)}} - + - 关锁时间:{{item.createTime}} + 关锁时间:{{ displayAmount(item.createTime)}} - 关锁地点:{{item.address}} + 关锁地点:{{displayAmount(item.address)}} - + - + - + 退款 @@ -204,7 +205,7 @@ 退款 - + 运营区外调度费 @@ -295,22 +296,64 @@ orderInfo: {}, loading: false, showtk: false, - show:false + show: false, + _mapContext: null } }, + created() { + this._mapContext = uni.createMapContext("map", this); //map为map组件id + }, + mounted() { + // this.onRegionChange(); + }, onLoad(e) { this.orderId = e.id this.getOrderDetail() + + + // this.getParking() }, + // onReady() { + // // 确保地图组件已加载完成 + // console.log(this._mapContext, 'this._mapContext'); + + // this._mapContext.addGroundOverlay({ + // id: 11, + // src: `https://lxnapi.ccttiot.com/bike/img/static/uXRz2sbToNsqckQQjnLo`, // 手绘地图素材路径 + // bounds: { + // southwest: { // 左下角 GPS + // longitude: 116.392133, + // latitude: 39.912931, + // }, + // northeast: { // 右上角 GPS + // longitude: 116.402022, + // latitude: 39.923246, + // }, + // }, + // // visible: true, + // zIndex: 1000, + // success: (res) => { + // console.log("显示成功", res); + // }, + // fail: (e) => { + // console.log("显示失败", e); + // }, + // }); + + // // this.getParking(); + // }, components: { }, methods: { - backfee(){ + displayAmount(amount) { + return amount ? amount : '--'; + }, + backfee() { this.show = true this.showtk = true }, @@ -353,10 +396,10 @@ // 过滤掉所有气泡显示的标记 this.$set(this, 'markers', this.markers.filter(marker => !marker.isCalloutVisible)); } - + }, - - + + callPhone() { uni.makePhoneCall({ phoneNumber: this.orderInfo.phonenumber @@ -598,12 +641,12 @@ appointmentFee: this.orderInfo.appointmentFee, reason: this.orderInfo.reason } - + this.$u.put('/appVerify/order/refund', data).then((res) => { if (res.code === 200) { // 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构 this.show = false - + this.showtk = false this.getOrderDetail() } else { @@ -682,7 +725,7 @@ .page { padding-bottom: 200rpx; width: 750rpx; - + .tip_box { position: fixed; left: 72rpx; @@ -693,23 +736,23 @@ border-radius: 30rpx 30rpx 30rpx 30rpx; z-index: 110; padding-bottom: 100rpx; - + .top { padding: 52rpx 38rpx 42rpx 36rpx; - + .ipt_box { margin-top: 22rpx; display: flex; flex-wrap: nowrap; align-items: center; - + .text { width: 350rpx; font-weight: 400; font-size: 32rpx; color: #3D3D3D; } - + .ipt { padding: 10rpx 18rpx; display: flex; @@ -720,13 +763,13 @@ height: 64rpx; border-radius: 0rpx 0rpx 0rpx 0rpx; border: 2rpx solid #979797; - + .input { width: 80%; } } } - + .tip { width: 100%; text-align: center; @@ -734,7 +777,7 @@ font-size: 32rpx; color: #3D3D3D; } - + .txt { margin-top: 32rpx; width: 100%; @@ -744,17 +787,17 @@ color: #3D3D3D; } } - + .bots { position: absolute; - + width: 610rpx; // border-top: 2rpx solid #D8D8D8; display: flex; flex-wrap: nowrap; // height: 100%; bottom: -20rpx; - + .bot_left { border-radius: 0rpx 0rpx 0rpx 30rpx; width: 50%; @@ -767,7 +810,7 @@ color: #3D3D3D; background: #EEEEEE; } - + .bot_right { border-radius: 0rpx 0rpx 30rpx 0rpx; width: 50%; @@ -781,18 +824,19 @@ font-weight: 500; font-size: 32rpx; // color: #4C97E7; - + } - + } } - - + + .map { position: relative; width: 750rpx; height: 752rpx; + .park { position: absolute; display: flex; @@ -805,7 +849,7 @@ width: 82rpx; height: 82rpx; z-index: 10; - + .img { width: 82rpx; height: 82rpx; @@ -834,8 +878,8 @@ .lines { width: 750rpx; - height: 2rpx; - border: 2rpx solid #ccc; + // height: 2rpx; + border-bottom: 2rpx solid #E7E7E7; } .cont { diff --git a/pages_admin/order/search_device.vue b/pages_admin/order/search_device.vue index 73851b9..aba989f 100644 --- a/pages_admin/order/search_device.vue +++ b/pages_admin/order/search_device.vue @@ -324,5 +324,7 @@ } } } + + } \ No newline at end of file diff --git a/pages_admin/worke/worke_income.vue b/pages_admin/worke/worke_income.vue index 3101858..912a30c 100644 --- a/pages_admin/worke/worke_income.vue +++ b/pages_admin/worke/worke_income.vue @@ -298,8 +298,8 @@ .lines { width: 750rpx; - height: 2rpx; - border: 2rpx solid #ccc; + // height: 2rpx; + border-bottom: 2rpx solid #E7E7E7; } .cont { diff --git a/pages_admin/worke/worke_user.vue b/pages_admin/worke/worke_user.vue index e242fb9..512cb89 100644 --- a/pages_admin/worke/worke_user.vue +++ b/pages_admin/worke/worke_user.vue @@ -167,8 +167,8 @@ .lines { width: 750rpx; - height: 2rpx; - border: 2rpx solid #ccc; + // height: 2rpx; + border-bottom: 2rpx solid #E7E7E7; } .cont {