2025-04-10 19:56:40 +08:00
|
|
|
|
<template>
|
|
|
|
|
<el-card class="playback-panel" header="轨迹控制台">
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<el-row class="device-info" v-if="currentLog">
|
2025-04-10 19:56:40 +08:00
|
|
|
|
<el-col :span="24" class="info-item">
|
|
|
|
|
<span class="label">时间:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{ currentLog.at | dv}}</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24" class="info-item">
|
|
|
|
|
<span class="label">位置:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{currentLog.longitude | dv}},{{currentLog.latitude | dv}}</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">速度:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{ currentLog.speed }} KM/h</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">电压:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{ currentLog.voltage | dv}} V</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">信号:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{ currentLog.signal | dv}}</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">卫星:</span>
|
2025-04-11 15:35:32 +08:00
|
|
|
|
<span class="value">{{ currentLog.satellites | dv}}</span>
|
2025-04-10 19:56:40 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">状态:</span>
|
|
|
|
|
<span class="value"><dict-tag :options="dict.type.device_status" :value="currentLog.status" size="mini"/></span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">锁状态:</span>
|
|
|
|
|
<span class="value"><dict-tag :options="dict.type.device_lock_status" :value="currentLog.lockStatus" size="mini"/></span>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="info-item">
|
|
|
|
|
<span class="label">电门:</span>
|
|
|
|
|
<span class="value"><dict-tag :options="dict.type.device_quality" :value="currentLog.quality" size="mini"/></span>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<div class="playback-controls">
|
|
|
|
|
<el-slider
|
2025-04-11 15:35:32 +08:00
|
|
|
|
:value="sliderValue"
|
2025-04-10 19:56:40 +08:00
|
|
|
|
:max="maxIndex"
|
|
|
|
|
:show-tooltip="false"
|
|
|
|
|
@input="handleSliderChange">
|
|
|
|
|
</el-slider>
|
|
|
|
|
|
|
|
|
|
<div class="control-buttons">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<el-button size="mini" :icon="isPlaying ? 'el-icon-video-pause' : 'el-icon-video-play'" @click="togglePlay">
|
|
|
|
|
{{ isPlaying ? '暂停' : '播放' }}
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-for="speed in [1, 2, 4, 8]"
|
|
|
|
|
:key="speed"
|
|
|
|
|
size="mini"
|
|
|
|
|
:type="playbackSpeed === speed ? 'primary' : ''"
|
|
|
|
|
@click="setPlaybackSpeed(speed)">
|
|
|
|
|
{{ speed }}x
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-card>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: 'PlaybackPanel',
|
|
|
|
|
dicts: ['device_status', 'device_lock_status', 'device_quality'],
|
|
|
|
|
props: {
|
|
|
|
|
currentLog: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({})
|
|
|
|
|
},
|
|
|
|
|
maxIndex: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0
|
|
|
|
|
},
|
|
|
|
|
isPlaying: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
playbackSpeed: {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 1
|
2025-04-11 15:35:32 +08:00
|
|
|
|
},
|
|
|
|
|
currentIndex: {
|
|
|
|
|
type: Number,
|
|
|
|
|
required: true
|
2025-04-10 19:56:40 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2025-04-11 15:35:32 +08:00
|
|
|
|
computed: {
|
|
|
|
|
sliderValue() {
|
|
|
|
|
return this.currentIndex;
|
2025-04-10 19:56:40 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleSliderChange(index) {
|
|
|
|
|
this.$emit('slider-change', index);
|
|
|
|
|
},
|
|
|
|
|
togglePlay() {
|
|
|
|
|
this.$emit('toggle-play');
|
|
|
|
|
},
|
|
|
|
|
setPlaybackSpeed(speed) {
|
|
|
|
|
this.$emit('speed-change', speed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.playback-panel {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 60px;
|
|
|
|
|
right: 15px;
|
|
|
|
|
transform: none;
|
|
|
|
|
z-index: 100;
|
|
|
|
|
width: 400px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
|
|
|
|
.device-info {
|
|
|
|
|
padding: 8px;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
background-color: #f5f7fa;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
|
|
.info-item {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
|
|
|
|
.label {
|
|
|
|
|
color: #606266;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.value {
|
|
|
|
|
color: #303133;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.playback-controls {
|
|
|
|
|
.el-slider {
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.control-buttons {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
|
|
|
|
.el-button {
|
|
|
|
|
padding: 7px 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|