diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue index feba0813..74c14c81 100644 --- a/web_src/src/components/dialog/devicePlayer.vue +++ b/web_src/src/components/dialog/devicePlayer.vue @@ -39,30 +39,34 @@ -
- 录像控制 - - - - - - 倍速 - - - 0.25倍速 - 0.5倍速 - 1倍速 - 2倍速 - 4倍速 - - - -
- -
- {{Math.floor(seekTime * sliderTime / 100000)}}秒 - -
+
+
+ 录像控制 + + + + + + 倍速 + + + 0.25倍速 + 0.5倍速 + 1倍速 + 2倍速 + 4倍速 + + + + +
+
+ {{showTimeText}} + +
+
+ + @@ -235,6 +239,8 @@ export default { tracksNotLoaded: false, sliderTime: 0, seekTime: 0, + recordStartTime: 0, + showTimeText: "00:00:00", }; }, methods: { @@ -460,7 +466,10 @@ export default { let that = this; let startTime = row.startTime + this.recordStartTime = row.startTime + this.showTimeText = row.startTime.split(" ")[1] let endtime = row.endTime + this.sliderTime = 0; this.seekTime = new Date(endtime).getTime() - new Date(startTime).getTime(); console.log(this.seekTime) if (that.streamId != "") { @@ -638,6 +647,11 @@ export default { console.log('前端控制:seek '); console.log(this.seekTime); console.log(this.sliderTime); + let showTime = new Date(new Date(this.recordStartTime).getTime() + this.seekTime * val / 100) + let hour = showTime.getHours(); + let minutes = showTime.getMinutes(); + let seconds = showTime.getSeconds(); + this.showTimeText = (hour < 10?("0" + hour):hour) + ":" + (minutes<10?("0" + minutes):minutes) + ":" + (seconds<10?("0" + seconds):seconds) this.$axios({ method: 'get', url: `/api/playback/seek/${this.streamId }/` + Math.floor(this.seekTime * val / 100000)