Browse Source

change tracklist

tags/v1.1.0^2
zhangtao 1 year ago
parent
commit
84f8bd48f1
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/views/task-manage/all-task/components/LiveDrawer.vue

+ 2
- 1
src/views/task-manage/all-task/components/LiveDrawer.vue View File

// 两秒钟获取一次数据 // 两秒钟获取一次数据
data.socket = setInterval(() => { data.socket = setInterval(() => {
getTrackData().then(({ trackList }) => { getTrackData().then(({ trackList }) => {
const obj = trackList[0]
const len = trackList.length
const obj = trackList[len - 1]
const coordinate = fromLonLat([obj?.lng, obj?.lat]) const coordinate = fromLonLat([obj?.lng, obj?.lat])
if (data.trackInfo) { if (data.trackInfo) {
data.trackInfo.route.appendCoordinate(coordinate) data.trackInfo.route.appendCoordinate(coordinate)

Loading…
Cancel
Save