From 7c646474f310e4abb69c633d3bc22baa87541deb Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 25 Nov 2025 19:10:39 +0800
Subject: [PATCH] feat:历史任务详情视频调整

---
 src/views/job/components/DeviceJobDetails.vue |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/src/views/job/components/DeviceJobDetails.vue b/src/views/job/components/DeviceJobDetails.vue
index 43fd53d..f712736 100644
--- a/src/views/job/components/DeviceJobDetails.vue
+++ b/src/views/job/components/DeviceJobDetails.vue
@@ -115,7 +115,9 @@
 						:src="currentVideoUrl"
 						:style="{ width: pxToRem(1567), height: '80vh' }"
 						controls
-
+            preload="auto"
+            @play="handleVideoPlay"
+            @ended="handleVideoEnded(index)"
 					></video>
 				</div>
 			</el-dialog>
@@ -169,6 +171,23 @@
 const VideoShow = ref(false)
 const showAll = ref(false) // 是否展示全部
 let loadingData
+// 视频播放事件处理
+const handleVideoPlay = (event) => {
+  if (event.target.playbackRate !== 0.75) {
+    event.target.playbackRate = 0.75
+
+  }
+}
+const handleVideoEnded = index => {
+  // 获取当前视频
+  const video = videoRefs.value[index]
+
+  // 重置视频播放时间为 0
+  video.currentTime = 0
+
+  // 重新加载视频
+  video.load()
+}
 // 原图
 const yuanImages = ref([])
 function convertVideoUrlToThumbnail(videoUrl) {

--
Gitblit v1.9.3