Commit c7badfc7 authored by xxx's avatar xxx

1

parent 64cde454
...@@ -77,6 +77,7 @@ export default { ...@@ -77,6 +77,7 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res_1.data.content[0].destination; this.carDestination = res_1.data.content[0].destination;
this.dingDanId = res_1.data.content[0].id; this.dingDanId = res_1.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
//启动语音 //启动语音
this.startOrderSrcUrl = newOrder; this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1'); let au = document.getElementById('audio1');
...@@ -88,26 +89,7 @@ export default { ...@@ -88,26 +89,7 @@ export default {
this.btnShow2 = true; this.btnShow2 = true;
this.carDestination = res_1.data.content[0].destination; this.carDestination = res_1.data.content[0].destination;
this.dingDanId = res_1.data.content[0].id; this.dingDanId = res_1.data.content[0].id;
//查询指定目的地围栏以及判断该车是否在围栏里 this.equipmentName = resSon1.data.content[0].equipmentName;
httpGet(screenMapSetUpQuery,{size:9999,name:this.carDestination}).then((resSon2) => {
if(resSon2){
let weilanArr1 = [];
resSon2[this.carDestination].forEach((item,index)=>{
let weilanobj1 = {};
weilanobj1.lat = item.lat;
weilanobj1.lng = item.lon;
weilanArr1.push(weilanobj1);
})
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((resSon3) => {
if(resSon3.code == 200){
let resSon3Obj1 = {};
resSon3Obj1.lat = resSon3.data.location.y;
resSon3Obj1.lng = resSon3.data.location.x;
this.xiecheBtnAble = this.isPointInPolygon(resSon3Obj1,weilanArr1);
}
});
}
});
} }
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
...@@ -150,31 +132,12 @@ export default { ...@@ -150,31 +132,12 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
//启动语音 //启动语音
this.startOrderSrcUrl = newOrder; this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1'); let au = document.getElementById('audio1');
au.currentTime = 0; au.currentTime = 0;
au.play(); au.play();
//查询指定目的地围栏以及判断该车是否在围栏里
httpGet(screenMapSetUpQuery,{size:9999,name:this.carDestination}).then((resSon2) => {
if(resSon2){
let weilanArr1 = [];
resSon2[this.carDestination].forEach((item,index)=>{
let weilanobj1 = {};
weilanobj1.lat = item.lat;
weilanobj1.lng = item.lon;
weilanArr1.push(weilanobj1);
})
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((resSon3) => {
if(resSon3.code == 200){
let resSon3Obj1 = {};
resSon3Obj1.lat = resSon3.data.location.y;
resSon3Obj1.lng = resSon3.data.location.x;
this.xiecheBtnAble = this.isPointInPolygon(resSon3Obj1,weilanArr1);
}
});
}
});
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => { httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => {
...@@ -222,31 +185,12 @@ export default { ...@@ -222,31 +185,12 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
//启动语音 //启动语音
this.startOrderSrcUrl = newOrder; this.startOrderSrcUrl = newOrder;
let au = document.getElementById('audio1'); let au = document.getElementById('audio1');
au.currentTime = 0; au.currentTime = 0;
au.play(); au.play();
//查询指定目的地围栏以及判断该车是否在围栏里
httpGet(screenMapSetUpQuery,{size:9999,name:this.carDestination}).then((resSon2) => {
if(resSon2){
let weilanArr1 = [];
resSon2[this.carDestination].forEach((item,index)=>{
let weilanobj1 = {};
weilanobj1.lat = item.lat;
weilanobj1.lng = item.lon;
weilanArr1.push(weilanobj1);
})
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((resSon3) => {
if(resSon3.code == 200){
let resSon3Obj1 = {};
resSon3Obj1.lat = resSon3.data.location.y;
resSon3Obj1.lng = resSon3.data.location.x;
this.xiecheBtnAble = this.isPointInPolygon(resSon3Obj1,weilanArr1);
}
});
}
});
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => { httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => {
...@@ -298,12 +242,14 @@ export default { ...@@ -298,12 +242,14 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res_1.data.content[0].destination; this.carDestination = res_1.data.content[0].destination;
this.dingDanId = res_1.data.content[0].id; this.dingDanId = res_1.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
}else{ }else{
this.showDe = true; this.showDe = true;
this.btnShow1 = false; this.btnShow1 = false;
this.btnShow2 = true; this.btnShow2 = true;
this.carDestination = res_1.data.content[0].destination; this.carDestination = res_1.data.content[0].destination;
this.dingDanId = res_1.data.content[0].id; this.dingDanId = res_1.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
} }
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
...@@ -346,6 +292,7 @@ export default { ...@@ -346,6 +292,7 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => { httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => {
...@@ -393,6 +340,7 @@ export default { ...@@ -393,6 +340,7 @@ export default {
this.btnShow2 = false; this.btnShow2 = false;
this.carDestination = res.data.content[0].destination; this.carDestination = res.data.content[0].destination;
this.dingDanId = res.data.content[0].id; this.dingDanId = res.data.content[0].id;
this.equipmentName = resSon1.data.content[0].equipmentName;
} }
//获取车辆坐标计算距离并返回给后台 //获取车辆坐标计算距离并返回给后台
httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => { httpGet(carRealTimeLocationQuery2,{name:resSon1.data.content[0].equipmentName}).then((res2) => {
...@@ -485,6 +433,23 @@ export default { ...@@ -485,6 +433,23 @@ export default {
}, },
//卸车 //卸车
finishPaidanFn(){ finishPaidanFn(){
//查询指定目的地围栏以及判断该车是否在围栏里
httpGet(screenMapSetUpQuery,{size:9999,name:this.carDestination}).then((resSon2) => {
if(resSon2){
let weilanArr1 = [];
resSon2[this.carDestination].forEach((item,index)=>{
let weilanobj1 = {};
weilanobj1.lat = item.lat;
weilanobj1.lng = item.lon;
weilanArr1.push(weilanobj1);
})
httpGet(carRealTimeLocationQuery2,{name:this.equipmentName}).then((resSon3) => {
if(resSon3.code == 200){
let resSon3Obj1 = {};
resSon3Obj1.lat = resSon3.data.location.y;
resSon3Obj1.lng = resSon3.data.location.x;
this.xiecheBtnAble = this.isPointInPolygon(resSon3Obj1,weilanArr1);
if(!this.xiecheBtnAble){ if(!this.xiecheBtnAble){
this.$notify({ this.$notify({
title: '未到卸车区域,不可卸车!', title: '未到卸车区域,不可卸车!',
...@@ -517,6 +482,11 @@ export default { ...@@ -517,6 +482,11 @@ export default {
this.oldxy.lng = 0; this.oldxy.lng = 0;
}) })
} }
}
});
}
});
}, },
//获取当前时间 //获取当前时间
currentTime(){ currentTime(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment