Commit 8210b60b authored by 耿迪迪's avatar 耿迪迪

车辆信息 轨迹问题修改 gengdidi

parent 413e4894
...@@ -701,8 +701,7 @@ export class EditorMap { ...@@ -701,8 +701,7 @@ export class EditorMap {
}); });
marker.on("moving", (e) => { marker.on("moving", (e) => {
marker.passedPolyline.setPath(e.passedPath); marker.passedPolyline.setPath(e.passedPath);
this.map.setCenter(e.target.getPosition(), true); // this.map.setCenter(e.target.getPosition(), true);
console.log(marker.passedPolyline)
}); });
marker.moveAlong(path , { marker.moveAlong(path , {
......
...@@ -310,10 +310,11 @@ export default { ...@@ -310,10 +310,11 @@ export default {
let param = {}; let param = {};
param.vehicleId = row.vehicleId; param.vehicleId = row.vehicleId;
this.backForm.vehicleId = row.vehicleId; this.backForm.vehicleId = row.vehicleId;
getLastLocation(param).then(res =>{ return getLastLocation(param).then(res =>{
if(res){ if(res){
if(res.data.longitude && res.data.latitude){ if(res.data.longitude && res.data.latitude){
res.data.iconType = 9; res.data.iconType = 9;
res.data.count=1;
this.map.clearbackTrack(param.vehicleId) this.map.clearbackTrack(param.vehicleId)
this.map.addDevice(res.data,MapCar); this.map.addDevice(res.data,MapCar);
this.map.map.panTo([res.data.longitude, res.data.latitude]); this.map.map.panTo([res.data.longitude, res.data.latitude]);
...@@ -386,7 +387,7 @@ export default { ...@@ -386,7 +387,7 @@ export default {
this.getList(); this.getList();
}, },
searchLocations(){ searchLocations(){
this.$refs.backForm.validate((valid) => { this.$refs.backForm.validate(async (valid) => {
if (valid) { if (valid) {
if ( if (
moment(this.backForm.beginTime).valueOf() > moment(this.backForm.beginTime).valueOf() >
...@@ -406,7 +407,12 @@ export default { ...@@ -406,7 +407,12 @@ export default {
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD HH:mm:ss"
); );
} }
if(this.map.allDevice[9][0].getExtData().count>1){
this.map.clearbackTrack();
await this.getVehicleTravel({vehicleId:this.backForm.vehicleId});
}else{
this.map.allDevice[9][0].getExtData().count++
}
getVehicleLocations(this.backForm).then(res =>{ getVehicleLocations(this.backForm).then(res =>{
let paths = []; let paths = [];
if(res.data.length == 1){ if(res.data.length == 1){
...@@ -430,8 +436,12 @@ export default { ...@@ -430,8 +436,12 @@ export default {
}) })
} }
}); });
},
sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
} }
} }
}; };
......
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