diff --git a/src/utils/filter.js b/src/utils/filter.js index 2468049..86db3f8 100644 --- a/src/utils/filter.js +++ b/src/utils/filter.js @@ -1,4 +1,4 @@ -import { isEmpty } from '@/utils/index' +import { isEmpty } from '@/utils/index'; const filters = { // 金钱显示,保留两位小数 @@ -21,6 +21,12 @@ const filters = { } return num.toFixed(10); }, + fix8(num) { + if (num == null) { + return num; + } + return num.toFixed(8); + }, dv(data) { return filters.defaultValue(data); } diff --git a/src/views/bst/areaSub/components/AreaMap.vue b/src/views/bst/areaSub/components/AreaMap.vue index 0823fe3..2636e56 100644 --- a/src/views/bst/areaSub/components/AreaMap.vue +++ b/src/views/bst/areaSub/components/AreaMap.vue @@ -28,6 +28,7 @@ @@ -65,6 +65,13 @@ {{ speed }}x + + + + + + + @@ -94,6 +101,10 @@ export default { currentIndex: { type: Number, required: true + }, + locationLogList: { + type: Array, + default: () => [] } }, computed: { @@ -102,6 +113,9 @@ export default { } }, methods: { + formatTooltip(value) { + return this.locationLogList?.[value]?.at; + }, handleSliderChange(index) { this.$emit('slider-change', index); }, @@ -110,7 +124,17 @@ export default { }, setPlaybackSpeed(speed) { this.$emit('speed-change', speed); - } + }, + handlePrev() { + if (this.currentIndex > 0) { + this.$emit('slider-change', this.currentIndex - 1); + } + }, + handleNext() { + if (this.currentIndex < this.maxIndex) { + this.$emit('slider-change', this.currentIndex + 1); + } + }, } } @@ -149,6 +173,13 @@ export default { } .playback-controls { + .time-display { + text-align: center; + margin-bottom: 16px; + font-size: 12px; + color: #606266; + } + .el-slider { margin-bottom: 4px; } @@ -161,6 +192,12 @@ export default { .el-button { padding: 7px 12px; } + + .el-button-group { + .el-button { + margin-left: -1px; + } + } } } } diff --git a/src/views/bst/device/view/components/DeviceLocationLogList.vue b/src/views/bst/device/view/components/DeviceLocationLogList.vue index c102d4e..23d6446 100644 --- a/src/views/bst/device/view/components/DeviceLocationLogList.vue +++ b/src/views/bst/device/view/components/DeviceLocationLogList.vue @@ -47,13 +47,13 @@
- {{ log.longitude.toFixed(8) }}, {{ log.latitude.toFixed(8) }} + {{ log.longitude | fix8 | dv }}, {{ log.latitude | fix8 | dv}} - {{ log.voltage | fix2 }}V + {{ log.voltage | fix2 | dv }}V - {{ log.sn }} + {{ log.sn | dv }}