| | |
| | | // 停止轨迹播放 |
| | | function stopTrackPlay() { |
| | | if (playTimer) { |
| | | clearInterval(playTimer) |
| | | clearTimeout(playTimer) |
| | | playTimer = null |
| | | } |
| | | isPlaying.value = false |
| | |
| | | stopTrackPlay() |
| | | return |
| | | } |
| | | mapRef.value?.clickWeekTime?.(list.value[playIndex], playIndex) |
| | | mapRef.value?.clickWeekTime?.(list.value[playIndex], playIndex, { |
| | | animate: true, |
| | | duration: PLAY_INTERVAL, |
| | | }) |
| | | playIndex += 1 |
| | | if (playIndex >= list.value.length) stopTrackPlay() |
| | | playTimer = setTimeout(() => { |
| | | playTimer = null |
| | | if (playIndex >= list.value.length) { |
| | | stopTrackPlay() |
| | | return |
| | | } |
| | | playNextPoint() |
| | | }, PLAY_INTERVAL) |
| | | } |
| | | |
| | | // 切换轨迹播放状态 |
| | |
| | | return |
| | | } |
| | | if (!list.value.length) return |
| | | playIndex = 0 |
| | | mapRef.value?.clickWeekTime?.(list.value[0], 0) |
| | | if (list.value.length === 1) return |
| | | playIndex = 1 |
| | | isPlaying.value = true |
| | | playNextPoint() |
| | | if (isPlaying.value) playTimer = setInterval(playNextPoint, PLAY_INTERVAL) |
| | | } |
| | | |
| | | // 地图上点击轨迹点后,同步高亮表格对应行,并滚动到该行 |
| | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .left-container { |
| | | min-width: 0; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .right-container { |
| | | position: relative; |
| | | flex-shrink: 0; |
| | | z-index: 1; |
| | | background: #1a1a2a; |
| | | } |
| | | |
| | | :deep(.alarm-row) { |
| | | background: #2b2b4c !important; |
| | | |