This commit is contained in:
Sliverber 2024-07-09 18:02:18 +08:00
parent 2827ba4dcf
commit d51377ba03
3 changed files with 442 additions and 353 deletions

View File

@ -10,16 +10,26 @@
<image src="https://lxnapi.ccttiot.com/bike/img/static/uVcMTydm81zCMhHomXl1" mode="" @tap="topage(6)"> <image src="https://lxnapi.ccttiot.com/bike/img/static/uVcMTydm81zCMhHomXl1" mode="" @tap="topage(6)">
</image> </image>
<view class="txts" v-if="gps.deptId==100"> <view class="txts" v-if="gps.deptId==100">
创享电动车
<!-- {{areaInfo.areaName}} -->
</view> </view>
<view class="txts" v-if="gps.deptId==101"> <view class="txts" v-if="gps.deptId==101">
嵛你出行
</view> </view>
</view> </view>
<view class="" style="width: 100%;height: 50rpx;"> <view class="" style="width: 100%;height: 50rpx;">
</view> </view>
<view class="swiper_tips">
<view class="cont">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u1G7wy5BEuNOY8QVyZcF" mode=""></image>
<view class="scroll-container" ref="scrollContainer">
<text class="scroll-text" ref="scrollText" :style="{ animation: `scroll-text ${duration}s linear ` }">{{ cleanedText() }}</text>
<text class="scroll-text" ref="scrollTextClone">{{ cleanedText() }}</text> <!-- Duplicate the text for seamless scrolling -->
</view>
</view>
<view class="iconfont icon-xiangyou1"></view>
</view>
</view> </view>
@ -665,7 +675,7 @@
style="height: 290rpx;"></image> style="height: 290rpx;"></image>
</view> </view>
<view class="btn_box" style="justify-content: center;"> <view class="btn_box" style="justify-content: center;">
<view class="btn3" @click="maskloading=false" style="width: 600rpx;"> <view class="btn3" @click="closemaske() " style="width: 600rpx;">
继续用车 继续用车
</view> </view>
@ -777,8 +787,8 @@
返回 返回
</view> </view>
<view class="btn3" @click="Binddevice"> <view class="btn3" @click="tryagain() ">
重新连接 重新尝试
</view> </view>
</view> </view>
</view> </view>
@ -837,7 +847,8 @@
<view class="right_cont"> <view class="right_cont">
<view class="right_top"> <view class="right_top">
<view class="right_top_left"> <view class="right_top_left">
<image src=" https://lxnapi.ccttiot.com/bike/img/static/u9pggdTCxcZgUTNsEvXQ" mode=""></image> <image src=" https://lxnapi.ccttiot.com/bike/img/static/u9pggdTCxcZgUTNsEvXQ" mode="">
</image>
{{item.remainingPower}}% {{item.remainingPower}}%
</view> </view>
<view class="right_top_right"> <view class="right_top_right">
@ -968,6 +979,8 @@
buleback: false, buleback: false,
bulepayback: false, bulepayback: false,
bulebindcar: false, bulebindcar: false,
backfalse: 0, backfalse: 0,
statusBarHeight: 0, statusBarHeight: 0,
// //
@ -984,7 +997,8 @@
isInParkingArea: null, isInParkingArea: null,
specificDeviceMarkerId: null, specificDeviceMarkerId: null,
nearbyMarkers:[] nearbyMarkers: [],
duration:0
} }
}, },
watch: { watch: {
@ -993,6 +1007,11 @@
// console.log('userId ', newValue, oldValue); // console.log('userId ', newValue, oldValue);
this.getisInOrder() this.getisInOrder()
}, },
cleanedText() {
this.$nextTick(() => {
this.initScroll();
});
}
}, },
@ -1057,8 +1076,8 @@
}, },
onShow() { onShow() {
this.timestare() this.timestare()
this.backfalse=0 this.backfalse = 0
this.carstause=false this.carstause = false
// //
uni.getBluetoothAdapterState({ uni.getBluetoothAdapterState({
success: function(res) { success: function(res) {
@ -1179,6 +1198,7 @@
} }
}, },
onHide() { onHide() {
// //
if (this.timers) { if (this.timers) {
@ -1231,6 +1251,30 @@
}, },
}, },
methods: { methods: {
cleanedText() {
return this.areaInfo.agreement.replace(/<\/?[^>]+(>|$)/g, "");
},
tryagain() {
if (this.buleclose) {
this.buleclose = false
this.loackdevice()
}
if (this.buleopen) {
this.buleopen = false
this.unloackdevices()
}
if (this.buleback) {
this.buleback = false
this.cheackgps()
}
if (this.bulepayback) {
this.bulepayback = false
this.payback()
}
// bulepayback: false,
// bulebindcar: false,
},
routePlanning(end_lat, end_long) { routePlanning(end_lat, end_long) {
console.log('调用了'); console.log('调用了');
let that = this let that = this
@ -1285,7 +1329,10 @@
} }
}) })
}, },
closemaske() {
this.maskloading = false
this.backfalse = 0
},
onMapTap(event) { onMapTap(event) {
this.showdevice = false this.showdevice = false
@ -1304,11 +1351,11 @@
// this.close() // this.close()
// //
}, },
tapsn(sn){ tapsn(sn) {
const markerExists = this.listData.some(item => item.sn == sn); const markerExists = this.listData.some(item => item.sn == sn);
if (markerExists) { if (markerExists) {
this.sn =sn; this.sn = sn;
this.deviceInfo(0); this.deviceInfo(0);
// Revert the last clicked marker to the default image and zIndex // Revert the last clicked marker to the default image and zIndex
@ -1434,7 +1481,7 @@
} }
return false; return false;
}); });
this.nearbyMarkers=nearbyMarkers this.nearbyMarkers = nearbyMarkers
console.log('Nearby markers within 15 meters:', nearbyMarkers); console.log('Nearby markers within 15 meters:', nearbyMarkers);
}, },
haversineDistance(lat1, lon1, lat2, lon2) { haversineDistance(lat1, lon1, lat2, lon2) {
@ -1450,115 +1497,117 @@
}, },
getmarks() { getmarks() {
let data = { let data = {
areaId: this.areaInfo.areaId areaId: this.areaInfo.areaId
}; };
if (this.areaInfo.areaId) { if (this.areaInfo.areaId) {
this.$u.get(`/app/allVehicleByArea`, data).then((res) => { this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
if (res.code === 200 && res.data != '') { if (res.code === 200 && res.data != '') {
this.listData = res.data; this.listData = res.data;
const newDeviceMarkers = this.listData.map(item => ({ const newDeviceMarkers = this.listData.map(item => ({
id: parseFloat(item.sn), id: parseFloat(item.sn),
latitude: parseFloat(item.latitude), latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude), longitude: parseFloat(item.longitude),
width: 40, width: 40,
height: 28, height: 28,
iconPath: this.defaultMarkerIconPath, iconPath: this.defaultMarkerIconPath,
isDeviceMarker: true // isDeviceMarker: true //
})); }));
// //
const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker || marker.id === parseFloat(this.OrderdeviceInfos.sn)); const preservedMarkers = this.markers.filter(marker => marker.isParkingMarker || marker
.id === parseFloat(this.OrderdeviceInfos.sn));
// markers // markers
let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers]; let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
// //
if (this.lastClickedMarkerId != null) { if (this.lastClickedMarkerId != null) {
updatedMarkers = updatedMarkers.map(marker => { updatedMarkers = updatedMarkers.map(marker => {
if (marker.id === this.lastClickedMarkerId) { if (marker.id === this.lastClickedMarkerId) {
return { return {
...marker, ...marker,
width: 50, width: 50,
height: 35, height: 35,
iconPath: this.clickedMarkerIconPath iconPath: this.clickedMarkerIconPath
}; };
} }
return marker; return marker;
}); });
} }
// 使this.$setVue // 使this.$setVue
this.$set(this, 'markers', updatedMarkers); this.$set(this, 'markers', updatedMarkers);
this.oldMarkers = [...this.markers]; this.oldMarkers = [...this.markers];
} }
}).catch(error => { }).catch(error => {
console.error("Error fetching device data:", error); console.error("Error fetching device data:", error);
}); });
} }
}, },
timestare() { timestare() {
this.timers = setInterval(() => { this.timers = setInterval(() => {
this.getmarks(); this.getmarks();
if (this.orderinfo.sn) { if (this.orderinfo.sn) {
this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => { this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.mac = this.OrderdeviceInfos.mac; this.mac = this.OrderdeviceInfos.mac;
// this.OrderdeviceInfos.onlineStatus = '1'
if (this.OrderdeviceInfos.onlineStatus !== res.data.onlineStatus) {
this.OrderdeviceInfos = res.data;
}
if (this.OrderdeviceInfos.onlineStatus !== res.data.onlineStatus) { if (this.OrderdeviceInfos.status !== res.data.status) {
this.OrderdeviceInfos = res.data; this.getisInOrder();
} }
if (this.OrderdeviceInfos.status !== res.data.status) { const sn = parseFloat(res.data.sn);
this.getisInOrder(); const latitude = parseFloat(res.data.latitude);
} const longitude = parseFloat(res.data.longitude);
const sn = parseFloat(res.data.sn); // marker
const latitude = parseFloat(res.data.latitude); let markerIndex = this.markers.findIndex(marker => marker.id === sn);
const longitude = parseFloat(res.data.longitude);
// marker if (markerIndex !== -1) {
let markerIndex = this.markers.findIndex(marker => marker.id === sn); // marker
this.markers[markerIndex].latitude = latitude;
this.markers[markerIndex].longitude = longitude;
} else {
// marker
const specificDeviceMarker = {
id: sn,
latitude: latitude,
longitude: longitude,
width: 5,
height: 5,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u4D2g8B76trqZLhIiNWN'
};
this.markers.push(specificDeviceMarker);
}
if (markerIndex !== -1) { // markers
// marker this.$set(this, 'markers', [...this.markers]);
this.markers[markerIndex].latitude = latitude;
this.markers[markerIndex].longitude = longitude;
} else {
// marker
const specificDeviceMarker = {
id: sn,
latitude: latitude,
longitude: longitude,
width: 5,
height: 5,
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/u4D2g8B76trqZLhIiNWN'
};
this.markers.push(specificDeviceMarker);
}
// markers } else {
this.$set(this, 'markers', [...this.markers]); //
}
} else { }).catch(error => {
// console.error("Error fetching specific device data:", error);
} });
}).catch(error => { } else {
console.error("Error fetching specific device data:", error); // marker
}); const markerIndex = this.markers.findIndex(marker => marker.id === parseFloat(this
} else { .OrderdeviceInfos.sn));
// marker if (markerIndex !== -1) {
const markerIndex = this.markers.findIndex(marker => marker.id === parseFloat(this.OrderdeviceInfos.sn)); this.markers.splice(markerIndex, 1);
if (markerIndex !== -1) { // markers
this.markers.splice(markerIndex, 1); this.$set(this, 'markers', [...this.markers]);
// markers }
this.$set(this, 'markers', [...this.markers]); }
} }, 3000); // 3
}
}, 3000); // 3
}, },
toggleIconAndCallout() { toggleIconAndCallout() {
this.showIconAndCallout = !this.showIconAndCallout; this.showIconAndCallout = !this.showIconAndCallout;
@ -1692,12 +1741,12 @@
this.seeDetail = false; this.seeDetail = false;
if (res.code === 200) { if (res.code === 200) {
this.opencar() this.opencar()
this.backfalse=0 this.backfalse = 0
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '开锁成功'; this.toploadtxt = '开锁成功';
this.buletxt = '开锁成功'; this.buletxt = '开锁成功';
this.lastClickedMarkerId=null this.lastClickedMarkerId = null
this.mappolyline=[] this.mappolyline = []
setTimeout(() => { setTimeout(() => {
this.maskloading = false; this.maskloading = false;
this.getisInOrder(); this.getisInOrder();
@ -1930,12 +1979,13 @@
that.$u.get('/appVerify/isInParkingArea?', data).then((res) => { that.$u.get('/appVerify/isInParkingArea?', data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
// let parkingReturn = true // let parkingReturn = false
// let isInParkingArea = false // let isInParkingArea = false
let parkingReturn = res.data let parkingReturn = res.data
.parkingReturn /** 强制停车点还车 true:开启false:关闭*/ .parkingReturn /** 强制停车点还车 true:开启false:关闭*/
let isInParkingArea = res.data.isInParkingArea /** 是否在停车区内*/ let isInParkingArea = res.data.isInParkingArea /** 是否在停车区内*/
that.isInParkingArea = res.data.isInParkingArea that.isInParkingArea = res.data
.parkingReturn
if (parkingReturn) { if (parkingReturn) {
// //
if (isInParkingArea) { if (isInParkingArea) {
@ -1958,7 +2008,7 @@
if (res.code === 200) { if (res.code === 200) {
that.reboot() that.reboot()
that.backfalse=0 that.backfalse = 0
that.isbackdevice = false that.isbackdevice = false
// that.close() // that.close()
// that.getisInOrder() // that.getisInOrder()
@ -2014,7 +2064,7 @@
if (res.code === 200) { if (res.code === 200) {
that.reboot() that.reboot()
that.backfalse=0 that.backfalse = 0
that.isbackdevice = false that.isbackdevice = false
that.loadimg = that.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
@ -2137,11 +2187,12 @@
this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo + this.$u.post('/appVerify/device/return?returnType=1&orderNo=' + this.orderinfo.orderNo +
'&isInParkingArea=' + this.isInParkingArea).then(( '&isInParkingArea=' + this.isInParkingArea).then((
res) => { res) => {
// res.code=500
if (res.code === 200) { if (res.code === 200) {
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '还车成功!'; this.toploadtxt = '还车成功!';
this.backfalse=0 this.backfalse = 0
setTimeout(() => { setTimeout(() => {
this.close() this.close()
this.maskloading = false; this.maskloading = false;
@ -2192,7 +2243,7 @@
if (res.code === 200) { if (res.code === 200) {
this.reboot() this.reboot()
this.backfalse=0 this.backfalse = 0
this.isbackdevice = false this.isbackdevice = false
this.loadimg = this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
@ -2246,7 +2297,7 @@
if (res.code === 200) { if (res.code === 200) {
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '还车成功!'; this.toploadtxt = '还车成功!';
this.backfalse=0 this.backfalse = 0
setTimeout(() => { setTimeout(() => {
this.close() this.close()
this.maskloading = false; this.maskloading = false;
@ -2258,147 +2309,20 @@
this.backfalse = this.backfalse + 1 this.backfalse = this.backfalse + 1
this.cheackgps() this.cheackgps()
this.toploadtxt = '还车失败'; // this.toploadtxt = '';
setTimeout(() => { // setTimeout(() => {
this.maskloading = false; // this.maskloading = false;
uni.showToast({ // uni.showToast({
title: res.msg, // title: res.msg,
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}); // });
}, 1000); // }, 1000);
} }
}) })
}, },
onlinebackDevice() {
let that = this
uni.getLocation({
type: 'gcj02',
success: function(lb) {
let data = {
latitude: lb.latitude,
longitude: lb.longitude,
areaId: that.areaInfo.areaId
}
that.$u.get('/appVerify/isInParkingArea?', data).then((res) => {
if (res.code == 200) {
let parkingReturn = res.data.parkingReturn
let isInParkingArea = res.data.isInParkingArea
if (parkingReturn) {
if (isInParkingArea) {
if (that.carstause) {
that.reboot()
that.$u.post(
'/appVerify/device/return?returnType=1&orderNo=' +
that.orderinfo
.orderNo + '&isBluetooth=true' + '&lon=' +
lb
.longitude + '&lat=' + lb.latitude).then((
res) => {
uni.hideLoading()
if (res.code === 200) {
that.close()
that.getisInOrder()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
} else {
uni.showToast({
title: '蓝牙状态异常,请重新链接',
icon: 'none',
duration: 1000
});
setTimeout(() => {
that.isnoline = true
}, 1300)
}
} else {
uni.showToast({
title: '停车点外禁止还车,请行驶至停车区内',
icon: 'none',
duration: 2000
});
}
} else {
if (isInParkingArea) {
if (that.carstause) {
that.reboot()
that.$u.post(
'/appVerify/device/return?returnType=1&orderNo=' +
that.orderinfo
.orderNo + '&isBluetooth=true' + '&lon=' +
lb
.longitude + '&lat=' + lb.latitude).then((
res) => {
uni.hideLoading()
if (res.code === 200) {
that.close()
that.getisInOrder()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
} else {
uni.showToast({
title: '蓝牙状态异常,请重新链接',
icon: 'none',
duration: 1000
});
setTimeout(() => {
that.isnoline = true
}, 1300)
}
} else {
that.isbackdevice = true
}
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
},
fail: function(error) {
// uni.showToast({
// title: '使',
// icon: 'none',
// duration: 2000
// });
// that.getmarks()
//
}
})
},
// //
checkBeforeUnlock() { checkBeforeUnlock() {
if (!this.freeInfo.ruleId) { if (!this.freeInfo.ruleId) {
@ -2454,8 +2378,8 @@
if (res.code === 200) { if (res.code === 200) {
this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; this.loadimg = 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '开锁成功'; this.toploadtxt = '开锁成功';
this.lastClickedMarkerId=null this.lastClickedMarkerId = null
this.mappolyline=[] this.mappolyline = []
setTimeout(() => { setTimeout(() => {
this.maskloading = false; this.maskloading = false;
this.getisInOrder(); this.getisInOrder();
@ -2721,7 +2645,7 @@
.orderNo).then((res) => { .orderNo).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.backfalse=0 this.backfalse = 0
this.loadimg = this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '开锁成功'; this.toploadtxt = '开锁成功';
@ -2785,7 +2709,7 @@
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
that.buletxt = '解锁成功'; that.buletxt = '解锁成功';
that.toploadtxt = '解锁成功' that.toploadtxt = '解锁成功'
that.backfalse=0 that.backfalse = 0
setTimeout(() => { setTimeout(() => {
that.maskloading = false; that.maskloading = false;
that.getisInOrder(); that.getisInOrder();
@ -2853,7 +2777,7 @@
if (res.code === 200) { if (res.code === 200) {
// this.getisInOrder() // this.getisInOrder()
this.backfalse=0 this.backfalse = 0
this.loadimg = this.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
this.toploadtxt = '锁车成功'; this.toploadtxt = '锁车成功';
@ -2918,7 +2842,7 @@
// console.log('线'); // console.log('线');
// that.getisInOrder() // that.getisInOrder()
that.buleclose = false that.buleclose = false
that.backfalse=0 that.backfalse = 0
that.loadimg = that.loadimg =
'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z'; 'https://lxnapi.ccttiot.com/bike/img/static/upNvRa9ZQMyiwxLliF5z';
that.buletxt = '锁车成功'; that.buletxt = '锁车成功';
@ -3229,7 +3153,7 @@
this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => { this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.OrderdeviceInfos = res.data this.OrderdeviceInfos = res.data
// this.OrderdeviceInfos.onlineStatus = '0' // this.OrderdeviceInfos.onlineStatus = '1'
this.mac = this.OrderdeviceInfos.mac this.mac = this.OrderdeviceInfos.mac
if (this.OrderdeviceInfos.onlineStatus == 0 && this.orderinfo.status != 3) { if (this.OrderdeviceInfos.onlineStatus == 0 && this.orderinfo.status != 3) {
@ -4285,6 +4209,14 @@
// .map(area => this.convertBoundaryToPolyline(area.boundaryStr)); // .map(area => this.convertBoundaryToPolyline(area.boundaryStr));
// 线 // 线
this.areaInfo = res.data this.areaInfo = res.data
setTimeout(()=>{
let abb=this.cleanedText()
console.log(abb.length,'cleanedTextcleanedTextcleanedText');
//
this.duration =abb.length*0.3; // 50 px/s
},200)
this.polyline.push(polylines) this.polyline.push(polylines)
console.log(); console.log();
// console.log(this.areaInfo, 'areaInfoareaInfo'); // console.log(this.areaInfo, 'areaInfoareaInfo');
@ -4916,7 +4848,8 @@
.page { .page {
width: 750rpx; width: 750rpx;
.fixdivce{
.fixdivce {
padding: 12rpx 22rpx 12rpx 22rpx; padding: 12rpx 22rpx 12rpx 22rpx;
position: fixed; position: fixed;
left: 0; left: 0;
@ -4925,58 +4858,69 @@
height: 460rpx; height: 460rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 0 40rpx 40rpx 0; border-radius: 0 40rpx 40rpx 0;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0,0,0,0.3); box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.3);
.scrollable-content { .scrollable-content {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
.divce_li:last-child{
.divce_li:last-child {
border-bottom: 1rpx solid #fff; border-bottom: 1rpx solid #fff;
} }
.divce_li{
.divce_li {
padding: 10rpx 0; padding: 10rpx 0;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
border-bottom: 1rpx solid #D8D8D8; border-bottom: 1rpx solid #D8D8D8;
.left_img{
image{ .left_img {
image {
width: 44rpx; width: 44rpx;
height: 70rpx; height: 70rpx;
} }
} }
.right_cont{
.right_cont {
margin-left: 20rpx; margin-left: 20rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #3D3D3D; color: #3D3D3D;
.right_top{
.right_top {
width: 100%; width: 100%;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
.right_top_left{
.right_top_left {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
image{
image {
margin-right: 6rpx; margin-right: 6rpx;
width: 12rpx; width: 12rpx;
height: 26rpx; height: 26rpx;
} }
} }
.right_top_right{
.right_top_right {
margin-left: auto; margin-left: auto;
} }
} }
.right_bot{
.right_bot {
margin-top: 8rpx; margin-top: 8rpx;
} }
} }
} }
} }
} }
.maskload { .maskload {
position: fixed; position: fixed;
@ -5122,8 +5066,8 @@
position: fixed; position: fixed;
z-index: 10; z-index: 10;
// background:#fff; // background:#fff;
// background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 70%, transparent); // background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 70%, transparent);
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.5) 75%, transparent 100%); // background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.5) 75%, transparent 100%);
// background: linear-gradient( 180deg, #FFFFFF 58%, rgba(255,255,255,0) 52%); // background: linear-gradient( 180deg, #FFFFFF 58%, rgba(255,255,255,0) 52%);
.navBar { .navBar {
@ -5159,6 +5103,64 @@
} }
} }
.swiper_tips {
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 18rpx 24rpx;
margin: 0 auto;
width: 688rpx;
height: 72rpx;
background: #3D3D3D;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.3);
border-radius: 53rpx 53rpx 53rpx 53rpx;
.cont {
width: 80%;
display: flex;
flex-wrap: nowrap;
align-items: center;
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
image {
width: 36rpx;
height: 36rpx;
margin-right: 32rpx;
}
.scroll-container {
overflow: hidden;
width: calc(100% - 68rpx);
/* Adjusting width to fit within container */
display: flex;
.scroll-text {
white-space: nowrap;
display: inline-block;
// animation: scroll-text 40s linear infinite;
}
}
}
.icon-xiangyou1 {
margin-left: auto;
color: #fff;
font-size: 30rpx;
}
}
@keyframes scroll-text {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-100%);
}
}
} }
.my-location { .my-location {
@ -5168,7 +5170,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
right: 30rpx; right: 30rpx;
top: 220rpx; top: 400rpx;
// background-color: #fff; // background-color: #fff;
border-radius: 50%; border-radius: 50%;
width: 82rpx; width: 82rpx;
@ -5187,7 +5189,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
right: 30rpx; right: 30rpx;
top: 300rpx; top: 480rpx;
// background-color: #fff; // background-color: #fff;
border-radius: 50%; border-radius: 50%;
width: 82rpx; width: 82rpx;
@ -5808,6 +5810,7 @@
border-radius: 50rpx 50rpx 0 0; border-radius: 50rpx 50rpx 0 0;
// padding-left: 8rpx; // padding-left: 8rpx;
padding-left: 10rpx; padding-left: 10rpx;
.infoss { .infoss {
// margin-top: 20rpx; // margin-top: 20rpx;

View File

@ -98,6 +98,14 @@
{{deviceNum.offlineNum}} {{deviceNum.offlineNum}}
</view> </view>
</view> </view>
<view class="cont" @click="changeidx(0)">
<view class="text" :class="statusidx==0?'act1':''">
仓库中
</view>
<view class="text" :class="statusidx==0?'act1':''">
{{deviceNum.offlineNum}}
</view>
</view>
<!-- <view class="cont"> <!-- <view class="cont">
<view class="text"> <view class="text">
调度设备 调度设备
@ -165,18 +173,19 @@
// this.getareaid() // this.getareaid()
if (uni.getStorageSync('adminAreaid')) {
this.areaId = uni.getStorageSync('adminAreaid')
this.getArea()
this.allVehicleNum()
}
this.getmarks()
this.allVehicleNum()
// this.getmarks(); // this.getmarks();
}, },
onLoad() { onLoad() {
if (uni.getStorageSync('adminAreaid')) {
this.areaId = uni.getStorageSync('adminAreaid')
this.getArea()
}
let that = this let that = this
uni.getLocation({ uni.getLocation({
@ -396,7 +405,7 @@
// this.areaInfo = res.data // this.areaInfo = res.data
const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr) const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
this.polyline.push(polylines) this.polyline.push(polylines)
this.getmarks()
setTimeout(()=>{ setTimeout(()=>{
this.getParking() this.getParking()
},500) },500)

View File

@ -90,11 +90,11 @@
<view class="half_info_li"> <view class="half_info_li">
租赁用户{{item.phonenumber}} 租赁用户{{item.phonenumber}}
</view> </view>
<view class="half_info_li" v-if="item.vehicleNum"> <view class="half_info_li" v-if="item.realName">
车牌号{{item.vehicleNum}} 用户姓名{{item.realName}}
</view> </view>
<view class="half_info_li" v-else> <view class="half_info_li" v-else>
车牌号-- 用户姓名--
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
@ -110,14 +110,24 @@
<view class="half_info_li"> <view class="half_info_li">
订单费用{{item.totalFee}} 订单费用{{item.totalFee}}
</view> </view>
<view class="half_info_li" v-if="item.status==4"> <view class="half_info_li">
有无退款<span v-if="item.etRefund==null"></span> 有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span> <span v-else style="color: red;"></span>
</view> </view>
</view> </view>
<view class="info_li">
<view class="half_info_li">
开始时间{{formatDate(item.createTime)}}
</view>
<view class="half_info_li" v-if="item.vehicleNum">
车牌号{{item.vehicleNum}}
</view>
<view class="half_info_li" v-else>
车牌号--
</view>
</view>
<view class="info_li" v-if="item.unlock_time"> <view class="info_li" v-if="item.unlock_time">
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }} 开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
</view> </view>
@ -175,11 +185,11 @@
<view class="half_info_li"> <view class="half_info_li">
租赁用户{{item.phonenumber}} 租赁用户{{item.phonenumber}}
</view> </view>
<view class="half_info_li" v-if="item.vehicleNum"> <view class="half_info_li" v-if="item.realName">
车牌号{{item.vehicleNum}} 用户姓名{{item.realName}}
</view> </view>
<view class="half_info_li" v-else> <view class="half_info_li" v-else>
车牌号-- 用户姓名--
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
@ -192,7 +202,26 @@
</view> </view>
<view class="info_li"> <view class="info_li">
订单费用{{item.totalFee}} <view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" >
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
开始时间{{formatDate(item.createTime)}}
</view>
<view class="half_info_li" v-if="item.vehicleNum">
车牌号{{item.vehicleNum}}
</view>
<view class="half_info_li" v-else>
车牌号--
</view>
</view> </view>
<view class="info_li" v-if="item.unlock_time"> <view class="info_li" v-if="item.unlock_time">
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }} 开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
@ -249,11 +278,11 @@
<view class="half_info_li"> <view class="half_info_li">
租赁用户{{item.phonenumber}} 租赁用户{{item.phonenumber}}
</view> </view>
<view class="half_info_li" v-if="item.vehicleNum"> <view class="half_info_li" v-if="item.realName">
车牌号{{item.vehicleNum}} 用户姓名{{item.realName}}
</view> </view>
<view class="half_info_li" v-else> <view class="half_info_li" v-else>
车牌号-- 用户姓名--
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
@ -265,7 +294,26 @@
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
订单费用{{item.totalFee}} <view class="half_info_li">
订单费用{{item.totalFee}}
</view>
<view class="half_info_li" >
有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span>
</view>
</view>
<view class="info_li">
<view class="half_info_li">
开始时间{{formatDate(item.createTime)}}
</view>
<view class="half_info_li" v-if="item.vehicleNum">
车牌号{{item.vehicleNum}}
</view>
<view class="half_info_li" v-else>
车牌号--
</view>
</view> </view>
<view class="info_li" v-if="item.unlock_time"> <view class="info_li" v-if="item.unlock_time">
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }} 开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
@ -323,11 +371,11 @@
<view class="half_info_li"> <view class="half_info_li">
租赁用户{{item.phonenumber}} 租赁用户{{item.phonenumber}}
</view> </view>
<view class="half_info_li" v-if="item.vehicleNum"> <view class="half_info_li" v-if="item.realName">
车牌号{{item.vehicleNum}} 用户姓名{{item.realName}}
</view> </view>
<view class="half_info_li" v-else> <view class="half_info_li" v-else>
车牌号-- 用户姓名--
</view> </view>
</view> </view>
<view class="info_li"> <view class="info_li">
@ -342,13 +390,24 @@
<view class="half_info_li"> <view class="half_info_li">
订单费用{{item.totalFee}} 订单费用{{item.totalFee}}
</view> </view>
<view class="half_info_li" v-if="item.status==4"> <view class="half_info_li" >
有无退款<span v-if="item.etRefund==null"></span> 有无退款<span v-if="item.etRefund==null"></span>
<span v-else style="color: red;"></span> <span v-else style="color: red;"></span>
</view> </view>
</view> </view>
<view class="info_li">
<view class="half_info_li">
开始时间{{formatDate(item.createTime)}}
</view>
<view class="half_info_li" v-if="item.vehicleNum">
车牌号{{item.vehicleNum}}
</view>
<view class="half_info_li" v-else>
车牌号--
</view>
</view>
<view class="info_li" v-if="item.unlock_time"> <view class="info_li" v-if="item.unlock_time">
开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }} 开关时间{{item.unlock_time}} {{ item.return_time ? item.return_time : '--' }}
</view> </view>
@ -611,6 +670,22 @@
}, },
methods: { methods: {
formatDate(value) {
if (!value) return '';
let date = new Date(value);
let month = date.getMonth() + 1; // 01
let day = date.getDate();
let hours = date.getHours();
let minutes = date.getMinutes();
//
month = month < 10 ? '0' + month : month;
day = day < 10 ? '0' + day : day;
hours = hours < 10 ? '0' + hours : hours;
minutes = minutes < 10 ? '0' + minutes : minutes;
return `${month}-${day} ${hours}:${minutes}`;
},
searchconfirm(e) { searchconfirm(e) {
// console.log(e,'eeeeeeeeee'); // console.log(e,'eeeeeeeeee');
this.typeidx = e[0].value this.typeidx = e[0].value
@ -1163,9 +1238,11 @@
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;
.half_info_li:first-child{
width: 60%;
}
.half_info_li { .half_info_li {
width: 50%; width: 40%;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #808080; color: #808080;