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