forked from drone/command-center-dashboard

罗广辉
2025-04-15 2888173145d91e465a25bea276acaa41f9a7b124
src/views/TaskManage/TaskIntermediateContent/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -9,14 +9,15 @@
      :destroy-on-close="true"
   >
      <div class="content-container" v-if="isShow">
         <TaskDetailsHead/>
         <!-- 视频直播 -->
         <div class="video-container">
            <LiveVideo :videoUrl="currentLiveUrl" />
         </div>
         <!-- 展示地图 -->
         <RealTimeMap />
         <RealTimeMap class="realTimeMap" />
      </div>
      <ControlPanel/>
      <ControlPanel v-if="deviceOsdInfo?.data?.sn" />
   </el-dialog>
</template>
@@ -31,6 +32,8 @@
import { useConnectWebSocket } from '@/utils/websocket/connect-websocket'
import { EBizCode } from '@/utils/staticData/enums'
import ControlPanel from '@/views/TaskManage/TaskIntermediateContent/CurrentTaskDetails/ControlPanel.vue'
import { KeyCode } from '@/hooks/controlDrone/useManualControl'
import TaskDetailsHead from '@/views/TaskManage/TaskIntermediateContent/CurrentTaskDetails/TaskDetailsHead.vue'
const isShow = defineModel('show')
const props = defineProps({
@@ -43,7 +46,8 @@
let taskDetails = ref({})
const currentLiveUrl = ref('')
const machineNestUrl = ref('')
const dockLiveUrl = ref('')
const droneLiveUrl = ref('')
provide('taskDetails', taskDetails)
const deviceOsdInfo = ref({})
@@ -52,17 +56,17 @@
// 机巢直播
const getDeviceLiveUrl = async () => {
   if (machineNestUrl.value) return machineNestUrl.value
   const res = await liveStart(taskDetails.value.device_sns[0],'')
   const res = await liveStart(taskDetails.value.device_sns[0], '')
   machineNestUrl.value = res.data.data.rtcs_url
   return machineNestUrl.value
}
// 无人机直播
const getDockLiveUrl = async dockSn => {
   if (dockLiveUrl.value) return dockLiveUrl.value
   const res = await liveStart(dockSn,'')
   dockLiveUrl.value = res.data.data.rtcs_url
   return dockLiveUrl.value
   if (droneLiveUrl.value) return droneLiveUrl.value
   const res = await liveStart(dockSn, '')
   droneLiveUrl.value = res.data.data.rtcs_url
   return droneLiveUrl.value
}
// 设置当前直播地址
@@ -125,20 +129,60 @@
})
</script>
<style lang="scss" scoped>
<style lang="scss">
.current-task-details {
   display: flex;
   justify-content: space-between;
   .content-container {
      display: flex;
      // gap: 20px;
      height: 600px;
      .video-container {
         width: 50%;
         padding-right: 10px;
   .el-dialog {
      position: relative;
      margin-top: 38px;
      width: 1782px;
      height: 1002px;
      padding: 0;
      .el-dialog__body {
         width: 100%;
         height: 100%;
      }
      .el-dialog__header {
         height: 0;
         overflow: hidden;
         padding: 0;
         .el-dialog__headerbtn {
            position: absolute;
            right: -40px;
            top: -40px;
            .el-dialog__close {
               font-size: 30px;
            }
         }
      }
   }
}
</style>
<style lang="scss" scoped>
.content-container {
   height: 100%;
   width: 100%;
   .video-container {
      width: 100%;
      height: 100%;
   }
   .realTimeMap {
      position: absolute;
      left: -1px;
      bottom: -1px;
      width: 218px;
      height: 217px;
      border-radius: 0px 20px 0px 40px;
      border: 1px solid #62a1ff;
   }
}
</style>