forked from drone/command-center-dashboard

罗广辉
2025-04-19 b03d7720b3207e71d4d22ec3037b2b07a34e1a3d
src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -79,12 +79,25 @@
   currentLiveUrl.value = res.data.data.rtcs_url
}
const hasIr = ref(false)
provide('hasIr', hasIr)
//获取相机能力
async function getLiveCapacity() {
   const res = await getLiveCapacityApi(workspace_id.value,{ sn: dockSn.value})
   const res = await getLiveCapacityApi({ sn: droneSn.value})
   res?.data?.data?.forEach((item) => {
      item?.cameras_list?.forEach((item1) => {
         item1?.videos_list?.forEach((item2) => {
            item2?.switch_video_types?.forEach(item3 =>{
                 if (item3 === 'ir'){
                     hasIr.value = true
                  }
            })
         })
      })
   })
}
const useTaskDetailsCallBack = () => {
   console.log(workspace_id.value,66666666)
   getDeviceLiveUrl()
}
@@ -109,7 +122,7 @@
let once = true
watch(deviceOsdInfo,()=>{
   if (once){
      // getLiveCapacity()
      getLiveCapacity()
      once =false
   }
})