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