From 33a5911f943478b887203c26988dc4e0dd449220 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 25 Nov 2021 16:28:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=9E=E6=94=BE=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dialog/devicePlayer.vue | 62 ++++++++++++------- 1 file changed, 38 insertions(+), 24 deletions(-) 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)