无人机管理后台前端(已迁走)
chenyao
2025-11-28 cf55e57ac8e892c321cc9eeb79e14b39e7d80e82
src/views/job/components/DeviceJobDetails.vue
@@ -113,9 +113,11 @@
                  ref="fullscreenVideo"
                  class="fullscreen-video"
                  :src="currentVideoUrl"
                  :style="{ width: pxToRem(1600), height: '80vh' }"
                    :style="{ width: pxToRem(1567), height: '80vh' }"
                  controls
                  autoplay
                    preload="auto"
                    @play="handleVideoPlay"
                    @ended="handleVideoEnded"
               ></video>
            </div>
         </el-dialog>
@@ -169,6 +171,24 @@
const VideoShow = ref(false)
const showAll = ref(false) // 是否展示全部
let loadingData
const fullscreenVideo = ref(null)
// 视频播放事件处理
const handleVideoPlay = (event) => {
  if (event.target.playbackRate !== 0.75) {
    event.target.playbackRate = 0.75
  }
}
const handleVideoEnded = index => {
  // 获取当前视频
  const video = fullscreenVideo.value
  // 重置视频播放时间为 0
  video.currentTime = 0
  // 重新加载视频
  video.load()
}
// 原图
const yuanImages = ref([])
function convertVideoUrlToThumbnail(videoUrl) {
@@ -188,8 +208,9 @@
   { name: '所属部门', value: '', field: 'dept_name' },
   { name: '任务时间', value: '', field: 'cycle_time_value' },
   { name: '关联算法', value: '', field: 'ai_type_str' },
   { name: '任务描述', value: '', field: 'remark' },
  { name: '自定义识别区', value: '', field: 'enable_custom_area' },
  { name: '创建人', value: '', field: 'creator_name' },
  { name: '任务描述', value: '', field: 'remark' },
   // { name: '任务执行次数', value: '', field: 'job_num' },
])
// 机巢状态
@@ -201,6 +222,7 @@
   industry_type_str: null,
   area_code: null,
   ai_type_str: null,
  enable_custom_area:null,
   begin_time: null,
   end_time: null,
   device_names: null,
@@ -292,7 +314,7 @@
// 播放
const videoRef = ref(null);
const currentVideoIndex = ref(-1)
const fullscreenVideo = ref(null)
const enterFullScreen = (index) => {
   currentVideoIndex.value = index
   VideoShow.value = true