| | |
| | | :boundary="false" |
| | | :list="list" |
| | | @point-change="handlePointChange" |
| | | /> |
| | | > |
| | | <template #timeline-prefix> |
| | | <el-icon class="track-play-btn" :size="30" @click.stop="handlePlayClick"> |
| | | <VideoPause v-if="isPlaying" /> |
| | | <VideoPlay v-else /> |
| | | </el-icon> |
| | | </template> |
| | | </CommonCesiumMap> |
| | | </div> |
| | | <div class="right-container"> |
| | | <div class="header"> |
| | |
| | | <div class="val">{{ formData.stayDuration }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="detail-title" style="display: flex; align-items: center"> |
| | | 轨迹点 |
| | | <el-icon class="track-play-btn" :size="26" @click.stop="handlePlayClick"> |
| | | <VideoPause v-if="isPlaying" /> |
| | | <VideoPlay v-else /> |
| | | </el-icon> |
| | | </div> |
| | | <div class="detail-title">轨迹点</div> |
| | | <div class="command-table-container"> |
| | | <div class="command-table-content"> |
| | | <el-table ref="pointTableRef" class="command-table" :data="list" :row-class-name="getRowClassName"> |
| | |
| | | // 停止轨迹播放 |
| | | function stopTrackPlay() { |
| | | if (playTimer) { |
| | | clearInterval(playTimer) |
| | | clearTimeout(playTimer) |
| | | playTimer = null |
| | | } |
| | | isPlaying.value = false |
| | |
| | | |
| | | // 播放下一个轨迹点 |
| | | function playNextPoint() { |
| | | if (!list.value.length) { |
| | | if (!list.value.length || playIndex >= list.value.length) { |
| | | stopTrackPlay() |
| | | return |
| | | } |
| | | if (playIndex >= list.value.length) playIndex = 0 |
| | | mapRef.value?.clickWeekTime?.(list.value[playIndex], playIndex) |
| | | mapRef.value?.clickWeekTime?.(list.value[playIndex], playIndex, { |
| | | animate: true, |
| | | duration: PLAY_INTERVAL, |
| | | }) |
| | | playIndex += 1 |
| | | playTimer = setTimeout(() => { |
| | | playTimer = null |
| | | if (playIndex >= list.value.length) { |
| | | stopTrackPlay() |
| | | return |
| | | } |
| | | playNextPoint() |
| | | }, PLAY_INTERVAL) |
| | | } |
| | | |
| | | // 切换轨迹播放状态 |
| | |
| | | return |
| | | } |
| | | if (!list.value.length) return |
| | | playIndex = selectedPointIndex.value || 0 |
| | | mapRef.value?.clickWeekTime?.(list.value[0], 0) |
| | | if (list.value.length === 1) return |
| | | playIndex = 1 |
| | | isPlaying.value = true |
| | | playNextPoint() |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | .track-play-btn { |
| | | margin-left: 6px; |
| | | color: #ffffff; |
| | | cursor: pointer; |
| | | } |
| | | </style> |