From 0cd267d7d8263a1b70e69096a54722be492c201c Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 24 Apr 2026 16:12:07 +0800
Subject: [PATCH] feat:增加视频播放组件

---
 applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue
index 203326d..4ba9521 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue
@@ -80,12 +80,17 @@
 						<div class="imgBox">
 							<div v-for="item in taskResultList">
 								<el-image
-									v-if="item.resultUrl"
+									v-if="item.attachmentType === 0 && item.resultUrl"
 									:src="item.resultUrl"
 									:preview-src-list="[item.resultUrl]"
 									fit="cover"
 									preview-teleported
 								/>
+								<div class="video-btn" v-if="item.attachmentType === 1 && item.resultUrl" @click="videoClick(item)">
+									<el-icon :size="30" color="#fff">
+										<VideoPlay />
+									</el-icon>
+								</div>
 							</div>
 						</div>
 					</template>
@@ -244,6 +249,14 @@
 			@success="rejectSuccess"
 		/>
 	</el-dialog>
+
+	<VideoPlayDialog
+		ref="videoPlayDialogRef"
+		v-if="VideoShow"
+		v-model="VideoShow"
+		:playUrl="currentVideo.resultUrl"
+	>
+	</VideoPlayDialog>
 </template>
 
 <script setup>
@@ -432,11 +445,13 @@
 	try {
 		const res = await gdTaskResultListApi({ patrolTaskId: formData.value.id })
 		taskResultList.value = res?.data?.data ?? []
+		console.log(taskResultList.value, '8989')
 	} finally {
 	}
 }
 import { ArrowLineMaterialProperty } from '@/utils/cesium/Material'
 import OrderStepBar from '@/views/orderView/orderManage/orderManage/OrderStepBar.vue'
+import VideoPlayDialog from '@/components/VideoPlayDialog.vue'
 let arrowLineMaterialProperty = new ArrowLineMaterialProperty({
 	color: new Cesium.Color(128 / 255, 215 / 255, 255 / 255, 1),
 	directionColor: new Cesium.Color(1, 1, 1, 1),
@@ -529,6 +544,14 @@
 	}
 }
 
+// 点击视频
+let VideoShow = ref(false)
+let currentVideo = ref({})
+function videoClick(row) {
+	VideoShow.value = true
+	currentVideo.value = row
+}
+
 // 初始化地图实例
 function initMap() {
 	if (viewer) return
@@ -575,6 +598,15 @@
 		width: 100%;
 		height: 100%;
 	}
+	.video-btn {
+		width: 100%;
+		height: 100%;
+		background-color: #9E9E9E;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		cursor: pointer;
+	}
 }
 :deep(.el-timeline-item__timestamp) {
 	font-size: 12px;

--
Gitblit v1.9.3