更新历史轨迹
parent
fe812456ca
commit
22be268e77
|
@ -4,6 +4,7 @@
|
|||
<div id="container" ></div>
|
||||
<el-button type="primary" @click="isShowAll">返回</el-button>
|
||||
</div>
|
||||
<p v-for="(msg, index) in carMsg" :key="index">{{msg}}</p>
|
||||
|
||||
<div v-show="!isList">
|
||||
<el-form :model="form" ref="myForm">
|
||||
|
@ -203,6 +204,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
vinId:null,
|
||||
carList:[],
|
||||
total:0,
|
||||
form:{
|
||||
|
@ -244,6 +246,8 @@ export default {
|
|||
marker: null,
|
||||
lineArr: [],
|
||||
vin:null,
|
||||
carMsg:[],
|
||||
vehicle:null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -253,12 +257,13 @@ export default {
|
|||
this.getList()
|
||||
this.listCarType()
|
||||
this.listFence()
|
||||
this.vehicle = setInterval(this.listRealTime,1000)
|
||||
},
|
||||
methods: {
|
||||
// 在这里执行后台拉取数据的操作
|
||||
listRealTime(){
|
||||
listRealTime(this.vin).then(res=>{
|
||||
|
||||
this.carMsg.push(res.data)
|
||||
})
|
||||
},
|
||||
/*重置表单*/
|
||||
|
@ -305,6 +310,7 @@ export default {
|
|||
},
|
||||
/*地图展示*/
|
||||
realTimeTrajectory(carVin){
|
||||
this.vinId = carVin
|
||||
this.vin = carVin
|
||||
realTime(this.vin).then(res=>{
|
||||
if(res.code !== 200){
|
||||
|
@ -315,6 +321,7 @@ export default {
|
|||
this.isShow = false
|
||||
this.isList = true
|
||||
this.initMap()
|
||||
alert(this.vinId)
|
||||
this.startAnimation()
|
||||
},
|
||||
/*刷新*/
|
||||
|
|
Loading…
Reference in New Issue