更新历史轨迹列表数据7
parent
70e510e290
commit
016bd5d71b
|
@ -1,6 +1,7 @@
|
||||||
<script >
|
<script >
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import {deleteRecord, getList, historyMap} from "@/api/table";
|
import {deleteRecord, getList, historyMap} from "@/api/table";
|
||||||
|
import data from "@/views/system/dict/data.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
|
@ -17,27 +18,7 @@ export default {
|
||||||
endTime:null
|
endTime:null
|
||||||
},
|
},
|
||||||
arr:[],
|
arr:[],
|
||||||
lineArr: [
|
lineArr:null
|
||||||
// [116.478935,39.997761],
|
|
||||||
// [116.478939,39.997825],
|
|
||||||
// [116.478912,39.998549],
|
|
||||||
// [116.478912,39.998549],
|
|
||||||
// [116.478998,39.998555],
|
|
||||||
// [116.478998,39.998555],
|
|
||||||
// [116.479282,39.99856],
|
|
||||||
// [116.479658,39.998528],
|
|
||||||
// [116.480151,39.998453],
|
|
||||||
// [116.480784,39.998302],
|
|
||||||
// [116.480784,39.998302],
|
|
||||||
// [116.481149,39.998184],
|
|
||||||
// [116.481573,39.997997],
|
|
||||||
// [116.481863,39.997846],
|
|
||||||
// [116.482072,39.997718],
|
|
||||||
// [116.482362,39.997718],
|
|
||||||
// [116.483633,39.998935],
|
|
||||||
// [116.48367,39.998968],
|
|
||||||
// [116.484648,39.999861]
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -63,16 +44,15 @@ export default {
|
||||||
this.recordCar.startTime = recordCar.startTime
|
this.recordCar.startTime = recordCar.startTime
|
||||||
this.recordCar.endTime = recordCar.endTime
|
this.recordCar.endTime = recordCar.endTime
|
||||||
historyMap(this.recordCar).then(res=>{
|
historyMap(this.recordCar).then(res=>{
|
||||||
console.log(res.data)
|
|
||||||
res.data.forEach(item=>{
|
res.data.forEach(item=>{
|
||||||
this.arr[0] = item.longitude
|
this.arr.push(item.longitude.replace(/"/g, "") +","+item.latitude.replace(/"/g, ""))
|
||||||
this.arr[1] = item.latitude
|
console.log(this.arr)
|
||||||
this.coordinates.map(this.arr);
|
const result = this.arr.map(item => item.trim().replace(/'/g, '').split(','));
|
||||||
this.lineArr.push(this.arr)
|
console.log(result)
|
||||||
|
this.lineArr = result
|
||||||
console.log(this.lineArr)
|
console.log(this.lineArr)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.initMap()
|
this.initMap()
|
||||||
this.startAnimation()
|
this.startAnimation()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue