地图调度
This commit is contained in:
parent
c66366cf1a
commit
4bf261df57
@ -109,7 +109,7 @@
|
||||
|
||||
.divBottomBack {
|
||||
border-radius: 5px;
|
||||
background: #fffffff2;
|
||||
background: #ffffffe0;
|
||||
padding: 10px 0px;
|
||||
border: 1px solid #80808061;
|
||||
}
|
||||
|
||||
@ -76,11 +76,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="divLowerRight">
|
||||
<div v-show="selRight.lx=='hd'" @click="changeBatteries">
|
||||
<div v-show="selRight.lx=='hd'" @click="openChangebatteries">
|
||||
<uni-icons type="scan" :color="iconcolor" :size="iconsize" />
|
||||
<div>换电</div>
|
||||
</div>
|
||||
<div v-show="selRight.lx=='dd'" @click="changeBatteries">
|
||||
<div v-show="selRight.lx=='dd'" @click="openVehicledispatch">
|
||||
<uni-icons type="scan" :color="iconcolor" :size="iconsize" />
|
||||
<div>调度</div>
|
||||
</div>
|
||||
@ -103,7 +103,7 @@
|
||||
</uni-col>
|
||||
<uni-col :span="8">
|
||||
<div class="divQuantity">
|
||||
<div class="divQuantityCount" :style="{color:color_middle}">{{q_cnt2}}</div>
|
||||
<div class="divQuantityCount" :style="{color:color_middle}">{{q_cnt1}}</div>
|
||||
<div>
|
||||
<label>
|
||||
<uni-icons custom-prefix="iconfont" type="icon-ebikedianliang1"
|
||||
@ -115,7 +115,7 @@
|
||||
</uni-col>
|
||||
<uni-col :span="8">
|
||||
<div class="divQuantity">
|
||||
<div class="divQuantityCount" :style="{color:color_high}">{{q_cnt}}</div>
|
||||
<div class="divQuantityCount" :style="{color:color_high}">{{q_cnt2}}</div>
|
||||
<div>
|
||||
<label><uni-icons custom-prefix="iconfont" type="icon-ebikedianliang2"
|
||||
:color="color_high" :size="iconsize" />
|
||||
@ -145,7 +145,7 @@
|
||||
<div class="divFlex">
|
||||
<div>
|
||||
<div class="divCount">
|
||||
{{dd_count.sxjg}}
|
||||
{{orderCount}}
|
||||
</div>
|
||||
<div class="divCountLabel">
|
||||
筛选结果
|
||||
@ -281,9 +281,9 @@
|
||||
const color_middle = "#F29710"; //中电量
|
||||
const color_high = "#3DB71A"; //高电量
|
||||
const quantityColor = ref(color_high);
|
||||
const q_cnt = ref(0);
|
||||
const q_cnt0 = ref(0);
|
||||
const q_cnt2 = ref(0);
|
||||
const q_cnt0 = ref(0);
|
||||
const q_cnt1 = ref(0);
|
||||
const showQC = ref(true);
|
||||
const showBikeInfo = ref(false);
|
||||
const dataBikeInfo = ref({
|
||||
@ -333,7 +333,7 @@
|
||||
}
|
||||
} = e;
|
||||
dd_selvalue.value = value;
|
||||
showModelMessage("该功能暂未实现!");
|
||||
showMarker();
|
||||
}
|
||||
|
||||
//调度查询类型
|
||||
@ -344,8 +344,11 @@
|
||||
lx = 2;
|
||||
max = 120;
|
||||
}
|
||||
|
||||
dd_selvalue.value =dd_selvalue.value ==showDD_LX_Max.value?max:dd_selvalue.value ;
|
||||
showDD_LX.value = lx;
|
||||
showDD_LX_Max.value = max;
|
||||
showMarker();
|
||||
}
|
||||
|
||||
//加载后
|
||||
@ -555,30 +558,16 @@
|
||||
map.getBikeData(arrRegionID, (res) => {
|
||||
const {
|
||||
arrData
|
||||
/* ,arrPoints,
|
||||
icnt_2,
|
||||
icnt_0,
|
||||
icnt_1 */
|
||||
} = res;
|
||||
|
||||
arrMakers = arrData;
|
||||
const{icnt_2,
|
||||
icnt_0,
|
||||
icnt_1}=showMarker();
|
||||
q_cnt.value = icnt_2;
|
||||
q_cnt0.value = icnt_0;
|
||||
q_cnt2.value = icnt_1;
|
||||
const countData=showMarker();
|
||||
showCountData(countData);
|
||||
mapdata = {
|
||||
...mapdata,
|
||||
bikeData: {
|
||||
arrData,
|
||||
icnt_2,
|
||||
icnt_0,
|
||||
icnt_1
|
||||
}
|
||||
bikeData: {arrData}
|
||||
};
|
||||
mapData_opt[mapDataIndex] = mapdata;
|
||||
//loadMapBikeData(showBike.value, mapdata);
|
||||
})
|
||||
})
|
||||
|
||||
@ -586,17 +575,34 @@
|
||||
|
||||
//地图数据
|
||||
function loadMapData(data) {
|
||||
const{bikeData:{arrData,icnt_2,
|
||||
icnt_0,
|
||||
icnt_1 }}=data;
|
||||
const{bikeData:{arrData}}=data;
|
||||
arrMakers = arrData;
|
||||
q_cnt.value = icnt_2;
|
||||
q_cnt0.value = icnt_0;
|
||||
q_cnt2.value = icnt_1;
|
||||
showMarker();
|
||||
const countData=showMarker();
|
||||
showCountData(countData);
|
||||
loadMapBikeData(showBike.value, data);
|
||||
loadMapRegionData(showRegion.value, data);
|
||||
}
|
||||
|
||||
function showCountData(data){
|
||||
const{icnt_2,
|
||||
icnt_0,
|
||||
icnt_1}=data;
|
||||
const{lx}=selRight.value;
|
||||
switch(lx){
|
||||
case "hd":
|
||||
q_cnt0.value = icnt_0;
|
||||
q_cnt1.value = icnt_1;
|
||||
q_cnt2.value = icnt_2;
|
||||
break;
|
||||
case "dd":
|
||||
dd_count.value.ccyyq=icnt_1;
|
||||
dd_count.value.bztcq=icnt_2;
|
||||
break;
|
||||
case "wx":
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//显示隐藏车辆
|
||||
function showBikeData() {
|
||||
@ -715,7 +721,7 @@
|
||||
|
||||
|
||||
//换电
|
||||
function changeBatteries() {
|
||||
function openChangebatteries() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/devops/changebatteries/changebatteries"
|
||||
})
|
||||
@ -739,6 +745,9 @@
|
||||
showBikeInfo.value = false;
|
||||
break;
|
||||
}
|
||||
dataBikeInfo.value={};
|
||||
polylines.value=[];
|
||||
showMarker();
|
||||
}
|
||||
|
||||
|
||||
@ -857,9 +866,6 @@
|
||||
}
|
||||
|
||||
function showMarker(){
|
||||
// let icnt_2 = 0;
|
||||
// let icnt_0 = 0;
|
||||
// let icnt_1 = 0;
|
||||
let oData={};
|
||||
if(arrMakers.length==0){
|
||||
orderCount.value=0;
|
||||
@ -873,68 +879,16 @@
|
||||
oData=showMarker_HD(lx,maxcnt);
|
||||
break;
|
||||
case "dd":
|
||||
|
||||
oData=showMarker_DD(lx,maxcnt);
|
||||
break;
|
||||
case "wx":
|
||||
break;
|
||||
}
|
||||
/* let showCount=0;
|
||||
let arrPoints=[];
|
||||
let ordercnt=0;
|
||||
const maxcnt=100;
|
||||
arrMakers.map((item,index) => {
|
||||
item = {
|
||||
...item,
|
||||
soc: item.soc || 0
|
||||
}
|
||||
const {
|
||||
bikeId,
|
||||
longitude:lng,
|
||||
latitude:lat,
|
||||
soc
|
||||
} = item;
|
||||
if (soc <= 20) {
|
||||
icnt_0++;
|
||||
} else if (soc <= 60) {
|
||||
icnt_1++;
|
||||
} else {
|
||||
icnt_2++;
|
||||
}
|
||||
if(!(lng<=maxLng&&lng>=minLng&&lat<=maxLat&&lat>=minLat)) {
|
||||
switch(lx){
|
||||
case "hd":
|
||||
if(soc>quantityCount.value) return;
|
||||
break;
|
||||
case "dd":
|
||||
|
||||
break;
|
||||
case "wx":
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch(lx){
|
||||
case "hd":
|
||||
if(soc<=20) ordercnt++;
|
||||
break;
|
||||
case "dd":
|
||||
|
||||
break;
|
||||
case "wx":
|
||||
break;
|
||||
}
|
||||
|
||||
showCount++;
|
||||
arrPoints.push(map.addMarker_Q(index, item,showCount>maxcnt,lx));
|
||||
});
|
||||
if(showCount>maxcnt){
|
||||
for(let i=0;i<=maxcnt;i++){
|
||||
arrPoints[i]={...arrPoints[i],joinCluster:true}
|
||||
}
|
||||
} */
|
||||
|
||||
orderCount.value=oData.ordercnt;
|
||||
markers.value=oData.arrPoints;
|
||||
}
|
||||
const {icnt_2,icnt_0,icnt_1,showCount,orderCount,arrPoints}=oData
|
||||
const {icnt_2,icnt_0,icnt_1}=oData
|
||||
return {icnt_2,icnt_0,icnt_1};
|
||||
}
|
||||
|
||||
@ -968,8 +922,12 @@
|
||||
showCount++;
|
||||
arrPoints.push(map.addMarker_Q(index, item,showCount>maxcnt,lx));
|
||||
});
|
||||
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,orderCount,arrPoints};
|
||||
if(showCount>maxcnt){
|
||||
for(let i=0;i<arrPoints.length;i++){
|
||||
arrPoints[i]={...arrPoints[i],joinCluster:true}
|
||||
}
|
||||
}
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,ordercnt,arrPoints};
|
||||
}
|
||||
|
||||
function showMarker_DD(lx,maxcnt){
|
||||
@ -1000,14 +958,24 @@
|
||||
if(!(lng<=maxLng&&lng>=minLng&&lat<=maxLat&&lat>=minLat) ) return;
|
||||
let cnt=dd_selvalue.value;
|
||||
if(showDD_LX.value=="1") cnt=cnt*24;
|
||||
if(intervalTime<=cont) ordercnt++;
|
||||
if(intervalTime>cnt) return;
|
||||
showCount++;
|
||||
arrPoints.push(map.addMarker_Q(index, item,showCount>maxcnt,lx));
|
||||
});
|
||||
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,orderCount,arrPoints};
|
||||
if(showCount>maxcnt){
|
||||
for(let i=0;i<arrPoints.length;i++){
|
||||
arrPoints[i]={...arrPoints[i],joinCluster:true}
|
||||
}
|
||||
}
|
||||
return {icnt_2,icnt_0,icnt_1,showCount,ordercnt,arrPoints};
|
||||
}
|
||||
|
||||
//调度
|
||||
function openVehicledispatch(){
|
||||
uni.navigateTo({
|
||||
url:"/pages/warehouse/vehicledispatch/vehicledispatch"
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@ -461,7 +461,8 @@ export function addMarker_Q(id, data, joinCluster, lx) {
|
||||
latitude,
|
||||
soc,
|
||||
inOperation,
|
||||
inParking
|
||||
inParking,
|
||||
intervalTime
|
||||
} = data;
|
||||
let icon = "";
|
||||
let lbContent = "";
|
||||
@ -478,10 +479,10 @@ export function addMarker_Q(id, data, joinCluster, lx) {
|
||||
case "dd":
|
||||
icon = "bike_0.png";
|
||||
if(inOperation){
|
||||
lbContent="超区";
|
||||
lbContent="超";
|
||||
}
|
||||
else if(inParking){
|
||||
lbContent="违停";
|
||||
lbContent=`${intervalTime}H`;
|
||||
}
|
||||
break;
|
||||
case "wx":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user