Commit f36d4aea authored by xxx's avatar xxx

1

parent 463f9c77
...@@ -40,8 +40,6 @@ export default { ...@@ -40,8 +40,6 @@ export default {
toJavaCoordinates:[], toJavaCoordinates:[],
weilanName:[], weilanName:[],
areaColorData:[], areaColorData:[],
carNumber:'',
shebeiName:'',
allCarInforData:[], allCarInforData:[],
defaultjd:117.12111, defaultjd:117.12111,
defaultwd:36.679, defaultwd:36.679,
...@@ -89,16 +87,7 @@ export default { ...@@ -89,16 +87,7 @@ export default {
methods: { methods: {
//获取车辆设备名和车牌号 //获取车辆设备名和车牌号
getCarInforFn(carnumber,equipmentName){ getCarInforFn(){
this.carNumber = carnumber;
this.shebeiName = equipmentName;
// httpGet(vehicleInformationQuery,{size:9999}).then((res) => {
// if(res.code == 200){
// this.allCarInforData = res.data.content;
// this.getCoordinate();
// }
// });
//获取车辆类型 //获取车辆类型
httpGet(apiCarClassQuery,{size:9999}).then((res) => { httpGet(apiCarClassQuery,{size:9999}).then((res) => {
......
...@@ -36,10 +36,6 @@ ...@@ -36,10 +36,6 @@
</div> </div>
</div> </div>
<!-- 点击地图车辆时展示的车辆详情信息,注释掉就可以,暂时用不到 -->
<!-- <div class="smallWindowStyle" @click="smallWinFn()">
<span class="el-icon-star-on"></span>
</div> -->
<div class="roadblockStyle" @click="failureDe1Fn()"> <div class="roadblockStyle" @click="failureDe1Fn()">
<img src="../../assets/images/truckTuPian/luzhang.png" height="17"> <img src="../../assets/images/truckTuPian/luzhang.png" height="17">
<span>路障申报</span> <span>路障申报</span>
...@@ -94,7 +90,7 @@ import carInformation from './components/carInformation/index.vue' //车辆信 ...@@ -94,7 +90,7 @@ import carInformation from './components/carInformation/index.vue' //车辆信
import personalCenter from './components/personalCenter/index.vue' //个人中心 import personalCenter from './components/personalCenter/index.vue' //个人中心
import smallWindow from './components/smallWindow/index.vue' //小窗口车辆信息 import smallWindow from './components/smallWindow/index.vue' //小窗口车辆信息
import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图 import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图
import ElectricQuantity from '../../components/electricity/index.vue' //地图 import ElectricQuantity from '../../components/electricity/index.vue' //电池组件
export default { export default {
components: { components: {
...@@ -119,9 +115,11 @@ export default { ...@@ -119,9 +115,11 @@ export default {
personalName:'', personalName:'',
zongTimer1:null, zongTimer1:null,
zongTimer2:null, zongTimer2:null,
zongTimer3:null,
currentTime:'', currentTime:'',
selectFunction:0, selectFunction:0,
carnumber:'', carnumber:'',
equipmentName:'',
userName1:'', userName1:'',
carclass:'', carclass:'',
daizhangCar:[], daizhangCar:[],
...@@ -139,6 +137,11 @@ export default { ...@@ -139,6 +137,11 @@ export default {
this.zongTimer1 = setInterval(() => { this.zongTimer1 = setInterval(() => {
this.setNowTimes(); this.setNowTimes();
}, 1000) }, 1000)
this.zongTimer3 = setInterval(() => {
if(this.equipmentName){
this.getCarLoaction();
}
}, 3000)
this.zongTimer2 = setInterval(() => { this.zongTimer2 = setInterval(() => {
//判断车辆类型 //判断车辆类型
if(this.carclass == '铲车'){ if(this.carclass == '铲车'){
...@@ -206,6 +209,7 @@ export default { ...@@ -206,6 +209,7 @@ export default {
if(res1.data.totalElements == 0){ if(res1.data.totalElements == 0){
return return
}else{ }else{
this.equipmentName = res1.data.content[0].equipmentName;
//修改车辆状态为在线 //修改车辆状态为在线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:3}).then((res2) => {}); putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:3}).then((res2) => {});
this.carclass = res1.data.content[0].carclass; this.carclass = res1.data.content[0].carclass;
...@@ -252,6 +256,23 @@ export default { ...@@ -252,6 +256,23 @@ export default {
that.batteryEnegy = parseInt(battery.level * 100); that.batteryEnegy = parseInt(battery.level * 100);
}); });
}, },
//获取该车位置并上传到后端
getCarLoaction(){
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
//locationSuccess 获取成功的话
function(position) {
console.log(position.coords.longitude)//弹出经度测试
console.log(position.coords.latitude)
},
//locationError 获取失败的话
function(error) {
var errorType = ['您拒绝共享位置信息', '获取不到位置信息', '获取位置信息超时'];
console.log(errorType[error.code - 1]);
}
);
}
},
//接受派单 //接受派单
IntelligentDisFn(){ IntelligentDisFn(){
if(this.orderReceiving){ if(this.orderReceiving){
...@@ -527,6 +548,9 @@ export default { ...@@ -527,6 +548,9 @@ export default {
if(this.zongTimer2) { if(this.zongTimer2) {
clearInterval(this.zongTimer2); clearInterval(this.zongTimer2);
} }
if(this.zongTimer3) {
clearInterval(this.zongTimer3);
}
} }
} }
</script> </script>
......
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