Commit f36d4aea authored by xxx's avatar xxx

1

parent 463f9c77
......@@ -40,8 +40,6 @@ export default {
toJavaCoordinates:[],
weilanName:[],
areaColorData:[],
carNumber:'',
shebeiName:'',
allCarInforData:[],
defaultjd:117.12111,
defaultwd:36.679,
......@@ -89,16 +87,7 @@ export default {
methods: {
//获取车辆设备名和车牌号
getCarInforFn(carnumber,equipmentName){
this.carNumber = carnumber;
this.shebeiName = equipmentName;
// httpGet(vehicleInformationQuery,{size:9999}).then((res) => {
// if(res.code == 200){
// this.allCarInforData = res.data.content;
// this.getCoordinate();
// }
// });
getCarInforFn(){
//获取车辆类型
httpGet(apiCarClassQuery,{size:9999}).then((res) => {
......
......@@ -36,10 +36,6 @@
</div>
</div>
<!-- 点击地图车辆时展示的车辆详情信息,注释掉就可以,暂时用不到 -->
<!-- <div class="smallWindowStyle" @click="smallWinFn()">
<span class="el-icon-star-on"></span>
</div> -->
<div class="roadblockStyle" @click="failureDe1Fn()">
<img src="../../assets/images/truckTuPian/luzhang.png" height="17">
<span>路障申报</span>
......@@ -94,7 +90,7 @@ import carInformation from './components/carInformation/index.vue' //车辆信
import personalCenter from './components/personalCenter/index.vue' //个人中心
import smallWindow from './components/smallWindow/index.vue' //小窗口车辆信息
import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图
import ElectricQuantity from '../../components/electricity/index.vue' //地图
import ElectricQuantity from '../../components/electricity/index.vue' //电池组件
export default {
components: {
......@@ -119,9 +115,11 @@ export default {
personalName:'',
zongTimer1:null,
zongTimer2:null,
zongTimer3:null,
currentTime:'',
selectFunction:0,
carnumber:'',
equipmentName:'',
userName1:'',
carclass:'',
daizhangCar:[],
......@@ -139,6 +137,11 @@ export default {
this.zongTimer1 = setInterval(() => {
this.setNowTimes();
}, 1000)
this.zongTimer3 = setInterval(() => {
if(this.equipmentName){
this.getCarLoaction();
}
}, 3000)
this.zongTimer2 = setInterval(() => {
//判断车辆类型
if(this.carclass == '铲车'){
......@@ -206,6 +209,7 @@ export default {
if(res1.data.totalElements == 0){
return
}else{
this.equipmentName = res1.data.content[0].equipmentName;
//修改车辆状态为在线
putForJson(vehicleInformationUpdate,{id:res1.data.content[0].id,odo:3}).then((res2) => {});
this.carclass = res1.data.content[0].carclass;
......@@ -252,6 +256,23 @@ export default {
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(){
if(this.orderReceiving){
......@@ -527,6 +548,9 @@ export default {
if(this.zongTimer2) {
clearInterval(this.zongTimer2);
}
if(this.zongTimer3) {
clearInterval(this.zongTimer3);
}
}
}
</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