fix:调整换电调度页面及对接数据
This commit is contained in:
parent
4bf261df57
commit
13784f269e
@ -0,0 +1,77 @@
|
||||
<!-- components/empty/empty.vue -->
|
||||
<template>
|
||||
<view class="empty-container">
|
||||
<view class="empty-content">
|
||||
<!-- 图标 -->
|
||||
<view class="empty-icon" v-if="showIcon">
|
||||
<image :src="icon" mode="aspectFit" class="empty-image" />
|
||||
</view>
|
||||
|
||||
<!-- 描述 -->
|
||||
<text class="empty-description">{{ description }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import staticIcon from "./static_icon.js"
|
||||
|
||||
const props = defineProps({
|
||||
// 空状态类型:'default' | 'error'
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
// 自定义图标地址
|
||||
icon: {
|
||||
type: String,
|
||||
default: staticIcon.base64Empty
|
||||
},
|
||||
// 描述文案
|
||||
description: {
|
||||
type: String,
|
||||
default: '这里还没有任何内容'
|
||||
},
|
||||
// 是否显示图标
|
||||
showIcon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.empty-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 60rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.empty-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.empty-icon {
|
||||
width: 240rpx;
|
||||
height: 240rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.empty-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-description {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because one or more lines are too long
@ -172,7 +172,7 @@
|
||||
"pages": [{
|
||||
"path": "takeOrders",
|
||||
"style": {
|
||||
"navigationBarTitleText": "调度接单"
|
||||
"navigationBarTitleText": "换电接单"
|
||||
}
|
||||
}]
|
||||
},
|
||||
|
||||
@ -1,60 +1,67 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="content_wrapper">
|
||||
<view
|
||||
<view
|
||||
class="box"
|
||||
v-for="(item,index) of 10"
|
||||
:key="index"
|
||||
v-for="(it,id) of orderList"
|
||||
:key="id"
|
||||
>
|
||||
<!-- 车辆编号 -->
|
||||
<view class="row">
|
||||
<text class="label">车辆编号</text>
|
||||
<view class="value">
|
||||
<text style="margin-right: 30rpx;">100757</text>
|
||||
<text style="margin-right: 30rpx;">{{ it?.bikeCode || '-' }}</text>
|
||||
<uni-icons type="sound" size="25" style="position: relative;top: 6rpx;" color="blue"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 接单原因 -->
|
||||
<view class="row">
|
||||
<text class="label">接单原因</text>
|
||||
<text class="value">23123123123231231231232312312312323123123123231231231232312312312323123123123</text>
|
||||
</view>
|
||||
<!-- 中控品牌 -->
|
||||
<!-- 最新电量 -->
|
||||
<view class="row">
|
||||
<text class="label">中控品牌</text>
|
||||
<text class="value">-</text>
|
||||
<text class="label">最新电量</text>
|
||||
<text class="value">{{ it?.soc || '-' }}</text>
|
||||
</view>
|
||||
<!-- 最后骑行时间 -->
|
||||
<view class="row">
|
||||
<text class="label">最后骑行时间</text>
|
||||
<text class="value">{{ it?.latestTimestamep || '-' }}</text>
|
||||
</view>
|
||||
<!-- 电量刷新时间 -->
|
||||
<view class="row">
|
||||
<text class="label">电量刷新时间</text>
|
||||
<text class="value">{{ it?.refreshTimestamp || '-' }}</text>
|
||||
</view>
|
||||
<!-- 设备位置 -->
|
||||
<view class="row">
|
||||
<text class="label">设备位置</text>
|
||||
<view>
|
||||
<view>查看地图</view>
|
||||
<view style="color: darkgrey;font-size: 28rpx;">110.41,123123.11</view>
|
||||
<view style="color: darkgrey;font-size: 28rpx;">{{ (it?.longitude || '-') + ',' + (it?.latitude || '-')}}</view>
|
||||
</view>
|
||||
<uni-icons type="right" size="20" class="arrows" color="grey"></uni-icons>
|
||||
</view>
|
||||
<!-- 设备位置 -->
|
||||
<view class="row">
|
||||
<text class="label">设备距离</text>
|
||||
<text class="value">100757m</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 删除 -->
|
||||
<uni-icons type="trash" size="25" class="deleteBtn" color="orange"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;height: 100rpx;"></view>
|
||||
<!-- 确认接单按钮 -->
|
||||
<view class="btn_wrapper">
|
||||
<view class="btn_wrapper" v-if="orderList.length > 0" >
|
||||
<button class="btn_style">确认接单</button>
|
||||
</view>
|
||||
</view>
|
||||
<empty-component v-if="orderList.length === 0" description="无可接单数据"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import navigator from '@/utils/navigator.js';
|
||||
import EmptyComponent from '@/components/empty-component/empty-component.vue';
|
||||
|
||||
const orderList = ref([]);
|
||||
|
||||
onLoad((options) => {
|
||||
//TODO: 页面加载可能会获取参数
|
||||
const {changeBatteryArr} = navigator.getParams(options) || [];
|
||||
orderList.value = changeBatteryArr
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -90,7 +97,7 @@ onLoad((options) => {
|
||||
}
|
||||
|
||||
.label{
|
||||
width: 150rpx;
|
||||
width: 200rpx;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
@ -134,5 +141,4 @@ onLoad((options) => {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
@ -25,7 +25,9 @@
|
||||
border-radius: 15px;
|
||||
background-color: #35374dc2;
|
||||
color: white;"
|
||||
@click="navigator.to('/pages/devops/takeOrders/takeOrders')"
|
||||
@click="navigator.to('/pages/devops/takeOrders/takeOrders',{
|
||||
changeBatteryArr,
|
||||
})"
|
||||
>
|
||||
当前范围内可接单车辆
|
||||
<label style="margin-left: 5px;">{{orderCount}}</label>
|
||||
@ -297,6 +299,7 @@
|
||||
})
|
||||
|
||||
const showDD = ref(false);
|
||||
const changeBatteryArr = ref([]) //范围内可换电的车辆
|
||||
const showDD_LX = ref(1); // 1天数 2小时
|
||||
const showDD_LX_Max = ref(7);
|
||||
const dd_count = ref({
|
||||
@ -509,8 +512,7 @@
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
|
||||
|
||||
|
||||
map.getOperation(zoneId, (res) => {
|
||||
uni.hideLoading();
|
||||
if (!res) return;
|
||||
@ -541,7 +543,7 @@
|
||||
arrData,
|
||||
arrCircles,
|
||||
arrPolygons
|
||||
} = res;
|
||||
} = res;
|
||||
mapdata = {
|
||||
...mapdata,
|
||||
regionData: {
|
||||
@ -566,7 +568,7 @@
|
||||
mapdata = {
|
||||
...mapdata,
|
||||
bikeData: {arrData}
|
||||
};
|
||||
};
|
||||
mapData_opt[mapDataIndex] = mapdata;
|
||||
})
|
||||
})
|
||||
@ -670,7 +672,6 @@
|
||||
changeArea(selArea, true);
|
||||
}
|
||||
|
||||
|
||||
//缩放
|
||||
function onZoom(lx) {
|
||||
switch (lx) {
|
||||
@ -718,8 +719,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
//换电
|
||||
function openChangebatteries() {
|
||||
uni.navigateTo({
|
||||
@ -750,7 +749,6 @@
|
||||
showMarker();
|
||||
}
|
||||
|
||||
|
||||
//关闭电量信息
|
||||
function colseBikeInfo() {
|
||||
const {
|
||||
@ -884,11 +882,13 @@
|
||||
case "wx":
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
orderCount.value=oData.ordercnt;
|
||||
markers.value=oData.arrPoints;
|
||||
markers.value=oData.arrPoints;
|
||||
}
|
||||
const {icnt_2,icnt_0,icnt_1}=oData
|
||||
const {icnt_2,icnt_0,icnt_1,changeBattery}=oData;
|
||||
console.log(changeBattery);
|
||||
changeBatteryArr.value=changeBattery;
|
||||
return {icnt_2,icnt_0,icnt_1};
|
||||
}
|
||||
|
||||
@ -899,6 +899,7 @@
|
||||
let showCount=0;
|
||||
let arrPoints=[];
|
||||
let ordercnt=0;
|
||||
let changeBattery = [];
|
||||
arrMakers.map((item,index) => {
|
||||
item = {
|
||||
...item,
|
||||
@ -918,7 +919,10 @@
|
||||
icnt_2++;
|
||||
}
|
||||
if(!(lng<=maxLng&&lng>=minLng&&lat<=maxLat&&lat>=minLat) ||soc>quantityCount.value) return;
|
||||
if(soc<=20) ordercnt++;
|
||||
if(soc<=20) {
|
||||
ordercnt++;
|
||||
changeBattery.push(item)
|
||||
};
|
||||
showCount++;
|
||||
arrPoints.push(map.addMarker_Q(index, item,showCount>maxcnt,lx));
|
||||
});
|
||||
@ -927,7 +931,7 @@
|
||||
arrPoints[i]={...arrPoints[i],joinCluster:true}
|
||||
}
|
||||
}
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,ordercnt,arrPoints};
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,ordercnt,arrPoints,changeBattery};
|
||||
}
|
||||
|
||||
function showMarker_DD(lx,maxcnt){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user