历史轨迹更新

master
tangwenkang 2023-11-26 21:50:30 +08:00
parent 45c1a5a1f2
commit 40a711b5ca
2 changed files with 11 additions and 6 deletions

View File

@ -43,3 +43,4 @@ export function insertCar(carInsert) {
data:carInsert
})
}

View File

@ -199,7 +199,7 @@ export default {
equipmentId: String,
},
beforeDestroy() {
this.map && this.map.destroy();//
// this.map && this.map.destroy();//
},
data() {
return {
@ -265,8 +265,7 @@ export default {
};
},
mounted() {
this.initMap()
this.startAnimation()
},
created() {
this.getList()
@ -289,6 +288,8 @@ export default {
isShowAll(){
this.isShow = true
this.isList = false
// this.map.destroy();//
location.reload()
},
insertCar(){
insertCar(this.carInsert).then(res=>{
@ -316,6 +317,8 @@ export default {
realTimeTrajectory(){
this.isShow = false
this.isList = true
this.initMap()
this.startAnimation()
},
/*刷新*/
refreshTable(){
@ -386,7 +389,7 @@ export default {
zoomEnable: true, // true
dragEnable: true, // true
doubleClickZoom: true, // true
zoom: 13, //
zoom: 17, //
center: this.lineArr[0], //
// mapStyle: "amap://styles/darkblue", //
})
@ -418,13 +421,14 @@ export default {
// marker
this.marker.on('moving', (e) => {
console.log('marker动了', e)
this.passedPolyline.setPath(e.passedPath); //
this.map.setCenter(e.target.getPosition(), true) //
});
this.map.setFitView(); //
}).catch(e => {
console.log(e)
})
},
startAnimation () {