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,38 +433,60 @@ export default { ...@@ -485,38 +433,60 @@ export default {
}, },
//卸车 //卸车
finishPaidanFn(){ finishPaidanFn(){
if(!this.xiecheBtnAble){ //查询指定目的地围栏以及判断该车是否在围栏里
this.$notify({ httpGet(screenMapSetUpQuery,{size:9999,name:this.carDestination}).then((resSon2) => {
title: '未到卸车区域,不可卸车!', if(resSon2){
type: 'warning', let weilanArr1 = [];
duration: 2500 resSon2[this.carDestination].forEach((item,index)=>{
}); let weilanobj1 = {};
}else{ weilanobj1.lat = item.lat;
this.btnShow2 = false; weilanobj1.lng = item.lon;
this.showDe = false; weilanArr1.push(weilanobj1);
this.paidanFlag = 0; })
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => { httpGet(carRealTimeLocationQuery2,{name:this.equipmentName}).then((resSon3) => {
if(res.code == 200){ if(resSon3.code == 200){
putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,workStatus:0,weightStatus:0,oddStatus:1,odo:3}).then((res) => {}); let resSon3Obj1 = {};
} resSon3Obj1.lat = resSon3.data.location.y;
}); resSon3Obj1.lng = resSon3.data.location.x;
httpGet(manualSchedulingQuery,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => { this.xiecheBtnAble = this.isPointInPolygon(resSon3Obj1,weilanArr1);
if(res.code == 200){
if(res.data.totalElements == 0){ if(!this.xiecheBtnAble){
this.$notify({
title: '未到卸车区域,不可卸车!',
type: 'warning',
duration: 2500
});
}else{
this.btnShow2 = false;
this.showDe = false;
this.paidanFlag = 0;
httpGet(vehicleInformationQuery,{number:this.carnumber}).then((res) => {
if(res.code == 200){
putForJson(vehicleInformationUpdate,{id:res.data.content[0].id,workStatus:0,weightStatus:0,oddStatus:1,odo:3}).then((res) => {});
}
});
httpGet(manualSchedulingQuery,{sort:'createTime,desc',size:1,carNo:this.carnumber}).then((res) => {
if(res.code == 200){
if(res.data.totalElements == 0){
}else{
putForJson(manualSchedulingQuery,{id:res.data.content[0].id,status:0}).then((res) => {});
}
}
});
httpDelForJson(dingDanBiaoCaoZuo,[this.dingDanId]).then((res) => {
//this.$parent.zhixinglujing2(false);
});
this.$nextTick(()=>{
this.oldxy.lat = 0;
this.oldxy.lng = 0;
})
}
}else{
putForJson(manualSchedulingQuery,{id:res.data.content[0].id,status:0}).then((res) => {});
} }
} });
}); }
httpDelForJson(dingDanBiaoCaoZuo,[this.dingDanId]).then((res) => { });
//this.$parent.zhixinglujing2(false);
});
this.$nextTick(()=>{
this.oldxy.lat = 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