From 959e687d5b98702daea19eee6c020eba0ff29c99 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 21 May 2026 09:59:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/FormDiaLog.vue | 2
applications/task-work-order/src/views/orderView/orderManage/orderManage/OrderStepBar.vue | 2
applications/task-work-order/src/views/orderView/orderManage/orderManage/index.vue | 5 +
applications/task-work-order/src/components/VideoPlayDialog.vue | 56 ++++++++++++++++++
applications/task-work-order/src/views/orderView/orderManage/orderManage/outcomeData.vue | 52 ++++++++++++++---
applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue | 36 +++++++++++
6 files changed, 139 insertions(+), 14 deletions(-)
diff --git a/applications/task-work-order/src/components/VideoPlayDialog.vue b/applications/task-work-order/src/components/VideoPlayDialog.vue
new file mode 100644
index 0000000..f6975d5
--- /dev/null
+++ b/applications/task-work-order/src/components/VideoPlayDialog.vue
@@ -0,0 +1,56 @@
+<script setup>
+const props = defineProps({
+ width: {
+ type: String,
+ default: '800'
+ },
+ modelValue: {
+ type: Boolean,
+ default: false
+ },
+ playUrl: {
+ type: String,
+ default: ''
+ },
+ title:{
+ type: String,
+ default: '视频播放'
+ }
+})
+
+const emit = defineEmits(['update:modelValue'])
+const handleClose = () => {
+ emit('update:modelValue', false)
+}
+</script>
+
+<template>
+ <el-dialog
+ class="gd-dialog"
+ :title="props.title"
+ append-to-body
+ v-model="props.modelValue"
+ width="60%"
+ destroy-on-close
+ :close-on-click-modal="false"
+ @close="handleClose"
+ >
+ <video ref="videoRefs" controls preload="auto" :src="props.playUrl">
+ <source :src="props.playUrl" type="video/mp4" />
+ </video>
+ <!-- <el-carousel trigger="click" :autoplay="false" @change="handleCarouselChange">-->
+ <!-- <el-carousel-item v-for="(item, index) in videoList" :key="index">-->
+ <!-- <video ref="videoRefs" controls preload="auto" :src="currentVideoUrl" @play="handleVideoPlay" @ended="handleVideoEnded(index)">-->
+ <!-- <source :src="item.smallUrl" type="video/mp4" />-->
+ <!-- </video>-->
+ <!-- </el-carousel-item>-->
+ <!-- </el-carousel>-->
+ </el-dialog>
+</template>
+
+<style scoped lang="scss">
+video {
+ height: 600px;
+ width: 100%;
+}
+</style>
diff --git a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/FormDiaLog.vue b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/FormDiaLog.vue
index 72d07d0..fca8cc3 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/FormDiaLog.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/FormDiaLog.vue
@@ -314,7 +314,7 @@
if (!coordinates || !coordinates.length) return
routeLoading.value = true
airlineListApi(coordinates).then(res => {
- routeOptions.value = res.data.data || []
+ routeOptions.value = (res.data.data || []).filter(item => item)
}).finally(() => {
routeLoading.value = false
})
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 261f875..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),
@@ -523,10 +538,18 @@
const coordinates = geomAnalysis(geom)
if (!coordinates || !coordinates.length) return
const airRes = await airlineListApi(coordinates)
- routeOptions.value = airRes.data.data || []
+ routeOptions.value = (airRes.data.data || []).filter(item => item)
} catch (e) {
console.error('获取工单详情或航线列表失败', e)
}
+}
+
+// 点击视频
+let VideoShow = ref(false)
+let currentVideo = ref({})
+function videoClick(row) {
+ VideoShow.value = true
+ currentVideo.value = row
}
// 初始化地图实例
@@ -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;
diff --git a/applications/task-work-order/src/views/orderView/orderManage/orderManage/OrderStepBar.vue b/applications/task-work-order/src/views/orderView/orderManage/orderManage/OrderStepBar.vue
index 16f6780..5573ac8 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/orderManage/OrderStepBar.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/orderManage/OrderStepBar.vue
@@ -181,7 +181,7 @@
font-weight: 400;
font-size: 14px;
color: rgba(0,0,0,0.85);
-
+ white-space: nowrap;
}
.child-time {
diff --git a/applications/task-work-order/src/views/orderView/orderManage/orderManage/index.vue b/applications/task-work-order/src/views/orderView/orderManage/orderManage/index.vue
index f9cfff9..d52524c 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/orderManage/index.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/orderManage/index.vue
@@ -80,6 +80,7 @@
<el-table-column label="操作" class-name="operation-btns">
<template v-slot="{ row }">
<el-link type="primary" @click="openFormChange(row)">查看</el-link>
+ <el-link type="primary" @click="routeManagement(row)">航线管理</el-link>
</template>
</el-table-column>
</el-table>
@@ -201,6 +202,10 @@
})
}
+function routeManagement(row) {
+ window.open(`/drone-web/#/route/manager?order-id=${row.id}`)
+}
+
const colors = {
10: '#AE00FF',
11: '#AE00FF',
diff --git a/applications/task-work-order/src/views/orderView/orderManage/orderManage/outcomeData.vue b/applications/task-work-order/src/views/orderView/orderManage/orderManage/outcomeData.vue
index c602d60..b9468b6 100644
--- a/applications/task-work-order/src/views/orderView/orderManage/orderManage/outcomeData.vue
+++ b/applications/task-work-order/src/views/orderView/orderManage/orderManage/outcomeData.vue
@@ -10,7 +10,7 @@
v-model="searchParams.patrolTaskIds"
placeholder="请选择"
clearable
-
+
multiple
@change="handleSearch"
>
@@ -22,7 +22,7 @@
/>
</el-select>
</el-form-item>
-
+
<el-form-item >
<el-button :icon="RefreshRight" @click="resetForm"></el-button>
<el-button :icon="Search" color="#383874" @click="handleSearch"></el-button>
@@ -36,17 +36,21 @@
<el-table class="gd-table" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="46" />
<el-table-column type="index" label="序号" width="80" />
- <el-table-column label="图片" >
+ <el-table-column label="图片/视频" >
<template v-slot="{ row }">
<el-image
- v-if="row.resultUrl"
+ v-if="row.attachmentType ===0 && row.resultUrl"
:src="row.resultUrl"
:preview-src-list="[row.resultUrl]"
fit="cover"
style="width: 80px; height: 80px; border-radius: 4px;"
preview-teleported
/>
- <span v-else>-</span>
+ <div class="video-btn" v-if="row.attachmentType === 1 && row.resultUrl" @click="videoClick(row)">
+ <el-icon :size="30" color="#fff">
+ <VideoPlay />
+ </el-icon>
+ </div>
</template>
</el-table-column>
<el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" />
@@ -72,6 +76,13 @@
</div>
</div>
</div>
+ <VideoPlayDialog
+ ref="videoPlayDialogRef"
+ v-if="VideoShow"
+ v-model="VideoShow"
+ :playUrl="currentVideo.resultUrl"
+ >
+ </VideoPlayDialog>
</template>
<script setup>
@@ -80,6 +91,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { getDictLabel } from '@ztzf/utils'
import dayjs from 'dayjs'
+import VideoPlayDialog from '@/components/VideoPlayDialog.vue'
const props = defineProps({
workOrderId: {
@@ -124,8 +136,8 @@
const res = await gdTaskResultPageApi({
...searchParams.value,
workOrderId: props.workOrderId,
- patrolTaskIds: searchParams.value.patrolTaskIds.length
- ? searchParams.value.patrolTaskIds.join(',')
+ patrolTaskIds: searchParams.value.patrolTaskIds.length
+ ? searchParams.value.patrolTaskIds.join(',')
: ''
})
list.value = res?.data?.data?.records || []
@@ -230,6 +242,14 @@
}
}
+// 点击视频
+let VideoShow = ref(false)
+let currentVideo = ref({})
+function videoClick(row) {
+ VideoShow.value = true
+ currentVideo.value = row
+}
+
// 监听 workOrderId 变化
watch(
() => props.workOrderId,
@@ -254,17 +274,29 @@
display: flex;
flex-direction: column;
overflow: hidden;
-
+
.gd-table-container {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
-
+
.gd-table-content {
flex: 1;
overflow: auto;
}
+ .video-btn {
+ width: 80px;
+ height: 80px;
+ background-color: #9E9E9E;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 4px;
+ cursor: pointer;
+ }
}
+
+
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3