forked from drone/command-center-dashboard

罗广辉
2025-04-17 b80dbbcb1340a5d02b2137efc9ff0e5d84c50647
src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -18,12 +18,12 @@
         <TaskDetailsRight v-if="isAutoControl" />
         <template v-else>
            <TaskDetailsHead />
            <TaskDetailsLeft />
         </template>
         <TaskDetailsLeft />
         <!--   控制面板,里面有方法需要立即执行,不可用v-if      -->
         <ControlPanel v-show="!isAutoControl" />
         <img alt="" :src="amplifyImg" class="amplify" @click="amplify" />
         <img alt="" :src="amplifyImg" class="amplify" @click="isMaxMap = !isMaxMap" />
      </div>
   </el-dialog>
</template>
@@ -46,14 +46,12 @@
import { ElMessage } from 'element-plus'
import EventBus from '@/event-bus'
const isAutoControl = ref(true)
const lineQuality = ref(1) //1流畅,2标清
provide('isAutoControl', isAutoControl)
provide('lineQuality', lineQuality)
const isShow = defineModel('show')
const props = defineProps(['id'])
const currentLiveUrl = ref('')
let taskDetails = ref({})
const deviceOsdInfo = ref({})
provide('taskDetails', taskDetails)
@@ -64,10 +62,12 @@
provide('dockSn', dockSn)
provide('droneSn', droneSn)
const isShow = defineModel('show')
const props = defineProps(['id'])
const currentLiveUrl = ref('')
const isTakeOff = ref(false)
const isMaxMap = ref(false)
const amplify = () => {
   isMaxMap.value = !isMaxMap.value
}
let droneWebSocket  //WS实例
// 机巢直播
const getDeviceLiveUrl = async () => {
@@ -80,8 +80,6 @@
   const res = await liveStart(droneSn.value, lineQuality.value)
   currentLiveUrl.value = res.data.data.rtcs_url
}
const isTakeOff = ref(false)
// 设置当前直播地址
const setCurrentLiveUrl = async () => {
@@ -120,7 +118,6 @@
   }
}
let droneWebSocket
// 创建ws连接
const createWsConnect = () => {
   const workspaceId = taskDetails.value.workspace_id