更新实时轨迹2
parent
f3d20ec9d6
commit
4e8bb66df8
|
@ -253,8 +253,18 @@ export default {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.listCarType()
|
this.listCarType()
|
||||||
this.listFence()
|
this.listFence()
|
||||||
|
this.realMsg()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
realMsg(){
|
||||||
|
setInterval(() => {
|
||||||
|
// 在这里执行后台拉取数据的操作
|
||||||
|
listRealTime(this.vin).then(res=>{
|
||||||
|
this.lineArr.push(res.longitude.replace(/"/g, "") +","+res.latitude.replace(/"/g, ""))
|
||||||
|
})
|
||||||
|
}, 1000); // 每秒执行一次操作
|
||||||
|
},
|
||||||
|
|
||||||
/*重置表单*/
|
/*重置表单*/
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.form = { // 这里将form对象重置为空对象或者你定义的初始值
|
this.form = { // 这里将form对象重置为空对象或者你定义的初始值
|
||||||
|
@ -308,12 +318,6 @@ export default {
|
||||||
this.isList = true
|
this.isList = true
|
||||||
this.initMap()
|
this.initMap()
|
||||||
this.startAnimation()
|
this.startAnimation()
|
||||||
setInterval(() => {
|
|
||||||
// 在这里执行后台拉取数据的操作
|
|
||||||
listRealTime(this.vin).then(res=>{
|
|
||||||
this.lineArr.push(res.longitude.replace(/"/g, "") +","+res.latitude.replace(/"/g, ""))
|
|
||||||
})
|
|
||||||
}, 1000); // 每秒执行一次操作
|
|
||||||
},
|
},
|
||||||
/*刷新*/
|
/*刷新*/
|
||||||
refreshTable(){
|
refreshTable(){
|
||||||
|
|
Loading…
Reference in New Issue