This commit is contained in:
Sliverber 2024-05-13 18:03:20 +08:00
parent 28085e2538
commit 80f1d27aac
7 changed files with 1501 additions and 622 deletions

View File

@ -122,6 +122,15 @@
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "order/search_device",
"style" :
{
"navigationBarTitleText" : "",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
}
// ... A

View File

@ -19,7 +19,7 @@
<view class="btn1">
车辆扫码
</view>
<view class="btn2">
<view class="btn2" @click="topage()">
车辆搜索
</view>
</view>
@ -163,6 +163,11 @@
},
},
methods: {
topage(){
uni.navigateTo({
url:'/pages_admin/order/search_device'
})
},
allVehicleNum() {
let data = {
powerStart: this.rangeValue[0],
@ -306,7 +311,7 @@
}
})
})
setTimeout(() => {
this.status9.forEach(item => {
this.markers.push({
id: parseFloat(item.mac),
@ -327,7 +332,7 @@
}
})
})
}, 200)
},
getmarks() {
@ -464,7 +469,15 @@
//
this.sn = e.markerId
this.todetail()
for (let i = 0; i < this.listData.length; i++) {
if (this.listData[i].sn == this.sn) {
uni.navigateTo({
url:'/pages_admin/order/device_detail?id='+this.sn
})
}
}
// this.listData
}
@ -489,11 +502,11 @@
},
topage() {
uni.navigateTo({
url: '/page_fix/repair/repair_index'
})
},
// topage() {
// uni.navigateTo({
// url: '/page_fix/repair/repair_index'
// })
// },
getordernum() {
//
this.$u.get('/appVerify/adminOrder/num?adminId=' + 2).then((res) => {

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
<u-navbar title="设备详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='36'></u-navbar>
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
:show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map>
:show-location="true" :markers="markers" :polygons="polyline" ></map>
<view class="info_card">
<view class="info_tit">
设备信息
@ -14,23 +14,22 @@
<view class="info_li">
<view class="half_infoli">
车牌号<input type="text" v-model="searchKeyword" placeholder="" class="input"
placeholder-style="color:#C7CDD3">
车牌号<span>{{deviceInfos.vehicleNum}}</span>
</view>
<view class="half_infoli">
MAC<span>1Km</span>
MAC<span>{{deviceInfos.mac}}</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
SN<span>6分钟</span>
SN<span>{{deviceInfos.sn}}</span>
</view>
<view class="half_infoli">
车辆型号<span>1Km</span>
车辆型号<span>{{deviceInfos.model}}</span>
</view>
</view>
<view class="info_li">
运营区域<span>已完成</span>
运营区域<span>{{deviceInfos.areaName}}</span>
</view>
</view>
@ -39,31 +38,33 @@
<view class="info_li">
<view class="half_infoli">
车辆状态<span>6分钟</span>
车辆状态<span>{{status()}}</span>
</view>
<view class="half_infoli">
续航里程<span>1Km</span>
续航里程<span>{{deviceInfos.remainingMileage}}Km</span>
</view>
</view>
<view class="info_li">
异常原因<span>已完成</span>
<view class="half_infoli">
电池电量<span>{{deviceInfos.remainingPower}}%</span>
</view>
</view>
<!-- <view class="info_li">
异常原因<span>已完成</span>
</view> -->
</view>
<view class="lines"></view>
<!-- <view class="lines"></view>
<view class="cont">
<view class="info_li">
<view class="half_infoli">
电池编号<span>6分钟</span>
</view>
<view class="half_infoli">
GPRS信号<span>1Km</span>
</view>
</view>
<view class="info_li">
电池电量<span>已完成</span>
</view>
</view>
</view> -->
<view class="lines"></view>
<view class="cont">
@ -79,7 +80,7 @@
</view>
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_card" style="margin-top: 20rpx;" v-if="deviceInfos.etOrders.length>0">
<view class="info_tit">
订单信息
</view>
@ -88,30 +89,30 @@
<view class="info_li">
当前用户<span>13365492512</span>
当前用户<span>{{deviceInfos.etOrders[0].phonenumber}}</span>
</view>
<view class="info_li" style="flex-wrap: wrap;display: inline-block;">
当前订单编号<span>2169987651526787</span>
当前订单编号<span>{{deviceInfos.etOrders[0].orderNo}}</span>
</view>
<view class="info_li">
最后定位时间<span>2024-04-25 15:22:36</span>
订单开始时间<span>{{deviceInfos.etOrders[0].createTime}}</span>
</view>
</view>
</view>
<view class="bot_btn">
<view class="btn">
<view class="btn" @click="btn(0)">
开锁
</view>
<view class="btn">
<view class="btn" @click="btn(1)">
关锁
</view>
<view class="btn">
<view class="btn" @click="btn(2)">
车辆禁用
</view>
<view class="btn">
<view class="btn" @click="btn(3)">
车辆解禁
</view>
<view class="btn">
<view class="btn" @click="btn(4)">
响铃寻车
</view>
<view class="btn" @click="tipshow=true" v-if="info.type==1">
@ -121,8 +122,8 @@
换电处理
</view>
</view>
<u-mask :show="show" @click="show = false" :z-index='100' />
<view class="tip_box" v-if="showgj">
<u-mask :show="false" @click="show = false" :z-index='100' />
<view class="tip_box" v-if="false">
<view class="top">
<view class="tip">
修改车牌号
@ -175,72 +176,341 @@
longitude: 116.397128,
isMap: false,
zoomSize: 15,
markers: [{
id: 1,
latitude: 39.90469,
longitude: 116.40717,
title: 'Marker1'
}, {
id: 2,
latitude: 39.90969,
longitude: 116.41217,
title: 'Marker2'
}],
polyline: [{
points: [{
latitude: 39.916527,
longitude: 116.397128
}, {
latitude: 39.926527,
longitude: 116.397128
}, {
latitude: 39.926527,
longitude: 116.407128
}, {
latitude: 39.916527,
longitude: 116.407128
}],
width: 8,
arrowLine: true,
color: '#00AF99'
// strokeWidth: 2,
// strokeColor: '#00AF99',
// fillColor: '#00AF99'
}, ],
polygons: [{
points: [{
latitude: 39.918527,
longitude: 116.400128
},
{
latitude: 39.922527,
longitude: 116.400128
},
{
latitude: 39.924527,
longitude: 116.405128
},
{
latitude: 39.912527,
longitude: 116.402128
}
],
strokeColor: '#00FF00DD', // 使
strokeWidth: 2,
fillColor: '#00FF00DD'
}],
cardId: '001区域'
markers: [],
polyline: [],
polygons: [],
cardId: '001区域',
sn:'',
deviceInfos:{}
}
},
onLoad(e) {
this.sn=e.id
this.deviceInfo()
this.getArea()
this.getParking()
},
methods: {
btn(num){
if(num==0){
this.$u.post('/appVerify/admin/unlocking?sn='+this.sn).then((res) => {
if (res.code === 200) {
// 线
this.deviceInfo()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}else if(num==1){
this.$u.post('/appVerify/admin/lock?sn='+this.sn).then((res) => {
if (res.code === 200) {
// 线
this.deviceInfo()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}else if(num==2){
this.$u.post('/appVerify/device/offline?sn='+this.sn).then((res) => {
if (res.code === 200) {
// 线
this.deviceInfo()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}else if(num==3){
this.$u.post('/appVerify/device/online?sn='+this.sn).then((res) => {
if (res.code === 200) {
// 线
this.deviceInfo()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}else if(num==4){
this.$u.post('/appVerify/device/ring?sn='+this.sn).then((res) => {
if (res.code === 200) {
// 线
this.deviceInfo()
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}
},
status(){
if(this.deviceInfos.onlineStatus==0){
return '离线'
}else{
if(this.deviceInfos.status==0){
return '未上架'
}else if(this.deviceInfos.status==1){
return '待租'
}else if(this.deviceInfos.status==2){
return '预约中'
}else if(this.deviceInfos.status==3){
return '骑行中'
}else if(this.deviceInfos.status==4){
return '临时锁车中'
}else if(this.deviceInfos.status==8){
return '下线'
}
}
},
deviceInfo() {
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
if (res.code === 200) {
this.deviceInfos = res.data
this.latitude= parseFloat(this.deviceInfos.latitude)
this.longitude= parseFloat(this.deviceInfos.longitude )
if (this.deviceInfos.status == 0) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u76wT0QiWdAGJdF4v6AR',
callout: {
content: '未上架', //
color: '#ffffff', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#000000', //
padding: 6, //
display: 'ALWAYS', //
}
})
} else if (this.deviceInfos.status == 1) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u1UD93BU1vfshWFoDwgX',
callout: {
content: '待租' + this.deviceInfos.remainingPower + '%', //
color: '#2679D1', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#D4ECFF', //
padding: 6, //
display: 'ALWAYS', //
}
})
} else if (this.deviceInfos.status == 2) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u1UD93BU1vfshWFoDwgX',
callout: {
content: '预约' + this.deviceInfos.remainingPower + '%', //
color: '#2679D1', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#D4ECFF', //
padding: 6, //
display: 'ALWAYS', //
}
})
} else if (this.deviceInfos.status == 3) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u1UD93BU1vfshWFoDwgX',
callout: {
content: '骑行' + this.deviceInfos.remainingPower + '%', //
color: '#2679D1', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#D4ECFF', //
padding: 6, //
display: 'ALWAYS', //
}
})
} else if (this.deviceInfos.status == 4) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u1UD93BU1vfshWFoDwgX',
callout: {
content: '锁车' + this.deviceInfos.remainingPower + '%', //
color: '#2679D1', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#D4ECFF', //
padding: 6, //
display: 'ALWAYS', //
}
})
} else if (this.deviceInfos.status == 8) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u76wT0QiWdAGJdF4v6AR',
callout: {
content: '下线', //
color: '#ffffff', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#000000', //
padding: 6, //
display: 'ALWAYS', //
}
})
}
if (this.deviceInfos.onlineStatus == 0) {
this.markers.push({
id: parseFloat(this.deviceInfos.sn),
latitude: parseFloat(this.deviceInfos.latitude),
longitude: parseFloat(this.deviceInfos.longitude),
// title: item.deviceName,
width: 40,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u4UKmB47AxOj3YKIaajM',
callout: {
content: '离线', //
color: '#ffffff', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#000000', //
padding: 6, //
display: 'ALWAYS', //
}
})
}
}
})
},
convertBoundaryToPolyline(boundary) {
if (!boundary) return null;
const points = JSON.parse(boundary).map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
const polyline = {
points: points,
fillColor: "#55888840", //
strokeColor: "#22FF00", //
strokeWidth: 2, //
zIndex: 1, //
};
return polyline;
},
convertBoundaryToPolylines(boundaries) {
return boundaries.map(boundary => {
if (!boundary) return null;
let coords;
try {
coords = JSON.parse(boundary);
} catch (error) {
console.error("Error parsing boundary JSON:", error);
return null;
}
if (!Array.isArray(coords)) {
console.error("Parsed boundary is not an array:", coords);
return null;
}
const points = coords.map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
return {
points: points,
fillColor: "#55888840", //
strokeColor: "#558888", //
strokeWidth: 2, //
zIndex: 1, //
};
}).filter(polyline => polyline !== null); // 线
},
getParking() {
//
this.$u.get('/app/parking/list').then((res) => {
if (res.code === 200) {
//
const validBoundaries = res.rows.map(row => row.boundaryStr).filter(boundary =>
typeof boundary === 'string' && boundary.trim() !== '');
const polylines = this.convertBoundaryToPolylines(validBoundaries);
// this.polyline
this.polyline = this.polyline.concat(polylines);
// console.log(this.polyline);
res.rows.forEach(item => {
this.markers.push({
id: parseFloat(item.parkingId),
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
// title: item.deviceName,
width: 20,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u9yz0bKCWKyev0JYpTne',
callout: {
content: item.parkingName, //
color: '#ffffff', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#000000', //
padding: 6, //
display: 'ALWAYS', //
}
})
})
}
}).catch(error => {
console.error("Error fetching parking data:", error);
});
},
getArea() {
//
this.$u.get('/app/area/list').then((res) => {
if (res.code === 200) {
// 线
const polylines = res.rows
.filter(area => area.boundaryStr) // boundary
.map(area => this.convertBoundaryToPolyline(area.boundaryStr));
// 线
this.polyline = polylines;
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
}
}
</script>
<style lang="scss">
page {
overflow-x: hidden;
background-color: #F3F3F3;
}
@ -406,6 +676,7 @@
padding: 26rpx 28rpx;
.info_li {
width: 98%;
display: flex;
flex-wrap: nowrap;
font-weight: 400;
@ -415,7 +686,12 @@
span {
color: #3D3D3D;
}
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
/* 显示省略号 */
line-height: 48rpx;
.half_infoli {

View File

@ -1,9 +1,9 @@
<template>
<view class="page">
<view class="page" v-if="loading">
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='36'></u-navbar>
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
:show-location='true' :polygons='polygons' :markers="markers" :polyline="polyline"></map>
:show-location='true' :markers="markers" :polygons="polyline"> </map>
<view class="info_card">
<view class="info_tit">
基本信息
@ -11,21 +11,21 @@
<view class="lines"></view>
<view class="cont">
<view class="info_li">
订单编号<span>2169987651526787</span>
订单编号<span>{{orderInfo.orderNo}}</span>
</view>
<view class="info_li">
租赁用户<span style="color:#4C97E7 ;">13056449832</span>
租赁用户<span style="color:#4C97E7 ;">{{orderInfo.phonenumber}}</span>
</view>
<view class="info_li">
<view class="half_infoli">
租赁时长<span>6分钟</span>
租赁时长<span>{{orderInfo.duration/60}}分钟</span>
</view>
<view class="half_infoli">
行驶距离<span>1Km</span>
行驶距离<span>{{orderInfo.distance/1000}}Km</span>
</view>
</view>
<view class="info_li">
订单状态<span>已完成</span>
订单状态<span>{{status()}}</span>
</view>
</view>
</view>
@ -38,18 +38,18 @@
<view class="info_li">
<view class="half_infoli">
车牌号<span>6分钟</span>
车牌号<span>{{orderInfo.device.vehicleNum}}</span>
</view>
<view class="half_infoli">
IMIE<span>1Km</span>
SN<span>{{orderInfo.device.sn}}</span>
</view>
</view>
<view class="info_li">
<!-- <view class="half_infoli">
车辆编号<span>{{orderInfo.device.areaName}}</span>
</view> -->
<view class="half_infoli">
车辆编号<span>6分钟</span>
</view>
<view class="half_infoli">
运营区域<span>1Km</span>
运营区域<span>{{orderInfo.device.areaName}}</span>
</view>
</view>
</view>
@ -63,22 +63,22 @@
<view class="cont">
<view class="info_li">
开锁时间<span>2024-04-29 15:22:56</span>
开锁时间<span>{{orderInfo.unlock_time}}</span>
</view>
<view class="info_li">
开锁地点<span>120.5618927.12379</span>
开锁地点<span>{{orderInfo.unlock_time}}</span>
</view>
<view class="info_li">
<!-- <view class="info_li">
锁车时间<span>120.5618927.12379</span>
</view>
<view class="info_li">
锁车地点<span>120.5618927.12379</span>
</view>
<view class="info_li">
</view> -->
<!-- <view class="info_li">
解除时间<span>120.5618927.12379</span>
</view>
</view> -->
<view class="info_li">
关锁时间<span>120.5618927.12379</span>
关锁时间<span>{{}}</span>
</view>
<view class="info_li">
关锁地点<span>120.5618927.12379</span>
@ -88,8 +88,8 @@
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_tit">
费用明细
<view class="money">
结算总费用0.00
<view class="money" v-if="orderInfo.totalFee">
结算总费用{{orderInfo.totalFee}}
</view>
</view>
<view class="lines"></view>
@ -97,28 +97,31 @@
<view class="info_li">
<view class="half_infoli">
租赁费用<span>6分钟</span>
预约费用<span>{{orderInfo.appointmentFee}}</span>
</view>
<view class="half_infoli">
调度费<span>1Km</span>
调度费<span>{{orderInfo.dispatchFee}}</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
管理费<span>6分钟</span>
管理费<span>{{orderInfo.manageFee}}</span>
</view>
<view class="half_infoli">
实收<span>1Km</span>
骑行费用<span>{{orderInfo.ridingFee}}</span>
</view>
</view>
<view class="info_li">
支付方式<span>120.5618927.12379</span>
实收<span>{{orderInfo.totalFee}}</span>
</view>
<view class="info_li">
计费模板<span>120.5618927.12379</span>
支付方式<span>微信支付</span>
</view>
<view class="info_li">
支付时间<span>120.5618927.12379</span>
<view class="info_li" v-if="orderInfo.rule">
计费模板<span>{{orderInfo.rule.name}}</span>
</view>
<view class="info_li" v-if="orderInfo.payTime">
支付时间<span>{{orderInfo.payTime}}</span>
</view>
</view>
@ -165,66 +168,155 @@
longitude: 116.397128,
isMap: false,
zoomSize: 15,
markers: [{
id: 1,
latitude: 39.90469,
longitude: 116.40717,
title: 'Marker1'
}, {
id: 2,
latitude: 39.90969,
longitude: 116.41217,
title: 'Marker2'
}],
polyline: [{
points: [{
latitude: 39.916527,
longitude: 116.397128
}, {
latitude: 39.926527,
longitude: 116.397128
}, {
latitude: 39.926527,
longitude: 116.407128
}, {
latitude: 39.916527,
longitude: 116.407128
}],
width: 8,
arrowLine: true,
color: '#00AF99'
// strokeWidth: 2,
// strokeColor: '#00AF99',
// fillColor: '#00AF99'
}, ],
polygons: [{
points: [{
latitude: 39.918527,
longitude: 116.400128
},
{
latitude: 39.922527,
longitude: 116.400128
},
{
latitude: 39.924527,
longitude: 116.405128
},
{
latitude: 39.912527,
longitude: 116.402128
}
],
strokeColor: '#00FF00DD', // 使
strokeWidth: 2,
fillColor: '#00FF00DD'
}],
cardId: '001区域'
markers: [],
polyline: [],
polygons: [],
cardId: '001区域',
orderId:'',
orderInfo:{},
loading:false,
}
},
onLoad(e) {
this.orderId=e.id
this.getOrderDetail()
this.getArea()
this.getParking()
},
components:{
},
methods: {
convertBoundaryToPolyline(boundary) {
if (!boundary) return null;
const points = JSON.parse(boundary).map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
const polyline = {
points: points,
fillColor: "#55888840", //
strokeColor: "#22FF00", //
strokeWidth: 2, //
zIndex: 1, //
};
return polyline;
},
convertBoundaryToPolylines(boundaries) {
return boundaries.map(boundary => {
if (!boundary) return null;
let coords;
try {
coords = JSON.parse(boundary);
} catch (error) {
console.error("Error parsing boundary JSON:", error);
return null;
}
if (!Array.isArray(coords)) {
console.error("Parsed boundary is not an array:", coords);
return null;
}
const points = coords.map(coord => ({
latitude: coord[1],
longitude: coord[0]
}));
return {
points: points,
fillColor: "#55888840", //
strokeColor: "#558888", //
strokeWidth: 2, //
zIndex: 1, //
};
}).filter(polyline => polyline !== null); // 线
},
getParking() {
//
this.$u.get('/app/parking/list').then((res) => {
if (res.code === 200) {
//
const validBoundaries = res.rows.map(row => row.boundaryStr).filter(boundary =>
typeof boundary === 'string' && boundary.trim() !== '');
const polylines = this.convertBoundaryToPolylines(validBoundaries);
// this.polyline
this.polyline = this.polyline.concat(polylines);
// console.log(this.polyline);
res.rows.forEach(item => {
this.markers.push({
id: parseFloat(item.parkingId),
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
// title: item.deviceName,
width: 20,
height: 40,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u9yz0bKCWKyev0JYpTne',
callout: {
content: item.parkingName, //
color: '#ffffff', //
fontSize: 14, //
borderRadius: 10, //
bgColor: '#000000', //
padding: 6, //
display: 'ALWAYS', //
}
})
})
}
}).catch(error => {
console.error("Error fetching parking data:", error);
});
},
getArea() {
//
this.$u.get('/app/area/list').then((res) => {
if (res.code === 200) {
// 线
const polylines = res.rows
.filter(area => area.boundaryStr) // boundary
.map(area => this.convertBoundaryToPolyline(area.boundaryStr));
// 线
this.polyline = polylines;
// console.log(this.polyline);
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
},
status(){
if(this.orderInfo!=''){
if(this.orderInfo.status==0){
return '预约中'
}else if(this.orderInfo.status==1){
return '取消预约'
}else if(this.orderInfo.status==2){
return '开始骑行'
}else if(this.orderInfo.status==3){
return '骑行结束'
}else if(this.orderInfo.status==4){
return '订单完成'
}
}
},
getOrderDetail(){
this.$u.get('/appVerify/order/'+this.orderId).then((res) => {
if (res.code === 200) {
// 线
this.orderInfo=res.data
this.loading=true
this.latitude= parseFloat(this.orderInfo.device.latitude)
this.longitude= parseFloat(this.orderInfo.device.longitude )
}
}).catch(error => {
console.error("Error fetching area data:", error);
});
}
}
}
</script>

View File

@ -0,0 +1,291 @@
<template>
<view class="page">
<u-navbar title="车辆搜索" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='36'></u-navbar>
<view class="" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;">
<view class="top_box" style="margin-top: 20rpx;">
<view class="left_text">
车辆编号 <view class="iconfont icon-xiangxia1"></view>
</view>
<view class="sear_ipt">
<input type="text"
v-model="searchKeyword"
placeholder="请输入内容"
class="input"
placeholder-style="color:#C7CDD3"
@input="search()">
</view>
</view>
<view class="data_box">
<view class="data_cont " :class="typeindex==0?'act1':''" @click="changeType(0)">
按日期
</view>
<view class="data_cont" :class="typeindex==1?'act1':''" @click="changeType(1)">
按车辆
</view>
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_tit">
2024-04-28
</view>
<view class="lines"></view>
<view class="cont">
<view class="info_li">
<view class="half_infoli">
支付金额<span>0.00</span>
</view>
<view class="half_infoli">
已退款<span>0.00</span>
</view>
</view>
<view class="info_li">
<view class="half_infoli">
手续费<span>0.00</span>
</view>
<view class="half_infoli">
收入<span style="color:#4C97E7 ;">0.00</span>
</view>
</view>
</view>
</view>
<u-picker mode="time" v-model="time1" :params="params" @confirm="confirm1"
:default-time='pickertime'></u-picker>
<u-picker mode="time" v-model="time2" :params="params" @confirm="confirm2"
:default-time='pickertime'></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
time1: false,
time2: false,
lasTime: '00-00',
firsTime: '00-00',
params: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
typeindex:0,
}
},
methods: {
confirm1(e) {
console.log(e, 'eeeeeeee');
this.firsTime = e.year + '-' + e.month + '-' + e.day
},
confirm2(e) {
this.lasTime = e.year + '-' + e.month + '-' + e.day
},
changeType(num){
this.typeindex=num
}
}
}
</script>
<style lang="scss">
page {
background-color: #F6F6F6;
}
.page {
width: 750rpx;
.lines{
width: 748rpx;
height: 22rpx;
background: #F6F6F6;
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.info_card {
background: #FFFFFF;
.info_tit {
display: flex;
flex-wrap: nowrap;
padding: 22rpx 28rpx;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
.money {
margin-left: auto;
font-weight: 500;
font-size: 32rpx;
color: #4C97E7;
}
}
.lines {
width: 750rpx;
height: 2rpx;
border: 2rpx solid #ccc;
}
.cont {
padding: 26rpx 28rpx;
.info_li {
display: flex;
flex-wrap: nowrap;
font-weight: 400;
font-size: 28rpx;
color: #808080;
span {
color: #3D3D3D;
}
line-height: 48rpx;
.half_infoli {
display: flex;
flex-wrap: nowrap;
width: 50%;
font-weight: 400;
font-size: 28rpx;
color: #808080;
span {
color: #3D3D3D;
}
.input{
width: 30%;
}
}
}
}
}
.cont_box {
padding: 14rpx 30rpx;
width: 750rpx;
background: #E2F2FF;
border-radius: 0rpx 0rpx 0rpx 0rpx;
.cont_info {
margin-top: 8rpx;
display: flex;
flex-wrap: nowrap;
.info_li {
width: 50%;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
}
}
.data_box {
width: 672rpx;
margin: 36rpx auto;
display: flex;
flex-wrap: nowrap;
align-items: center;
// justify-content: space-between;
.data_cont {
margin-right: 40rpx;
display: flex;
align-items: center;
justify-content: center;
width: 150rpx;
height: 60rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 10rpx 10rpx 10rpx 10rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
border: 2rpx solid #fff;
}
.act1 {
background: #E2F2FF;
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
color: #4C97E7;
border: 2rpx solid #4C97E7;
}
}
.top_box {
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 28rpx 30rpx;
// padding: 20rpx 0;
margin: 0 auto;
width: 672rpx;
height: 100rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 22rpx 0rpx rgba(0, 0, 0, 0.07);
border-radius: 10rpx 10rpx 10rpx 10rpx;
.left_text {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: 25%;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
.icon-xiangxia1{
font-size: 26rpx;
}
}
.timebox {
width: 75%;
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: 34rpx;
.left_time {
text-align: center;
margin-right: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
.right_time {
text-align: center;
margin-left: 6rpx;
height: 50rpx;
width: 45%;
border: 2rpx solid #ccc;
border-radius: 12rpx;
font-weight: 400;
font-size: 32rpx;
color: #979797;
}
}
}
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<u-navbar title="用户管理" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
<u-navbar title="用户详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='36'></u-navbar>
<view class="userinfo" style="background: #FFFFFF;width: 750rpx;padding-bottom: 36rpx;">