forked from drone/command-center-dashboard

shuishen
2025-04-19 46fade7760ade1b94c8cfd653942756dabb7ccea
feat:当前机巢任务执行加载航线
3 files modified
15 ■■■■■ changed files
src/hooks/useTaskViewInfo/useTaskViewInfo.js 4 ●●● patch | view | raw | blame | history
src/hooks/useTaskWayline/useTaskWayline.js 5 ●●●● patch | view | raw | blame | history
src/views/SignMachineNest/MachineRight/InspectionRaskList.vue 6 ●●●●● patch | view | raw | blame | history
src/hooks/useTaskViewInfo/useTaskViewInfo.js
@@ -2,7 +2,7 @@
import aircraftGltf from '@/assets/gltf/aircraft.gltf'
import CreateFrustum from '@/utils/cesium/frustum/CreateFrustum'
export function useTaskViewInfo (viewer, wsInfo, removeEntitys) {
export function useTaskViewInfo (viewer, wsInfo) {
  const newViewer = isRef(viewer) ? viewer : ref(viewer)
  let viewInfoFrustum
@@ -82,8 +82,6 @@
    viewInfoFrustum?.clear()
    newViewer.value?.entities.removeById('aircraftGltf')
    removeEntitys && removeEntitys()
  }
  onUnmounted(() => {
src/hooks/useTaskWayline/useTaskWayline.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2025-04-19 14:24:34
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-04-19 17:21:58
 * @LastEditTime: 2025-04-19 17:47:46
 * @FilePath: \command-center-dashboard\src\hooks\useTaskWayline\useTaskWayline.js
 * @Description: 
 * 
@@ -39,6 +39,9 @@
      const [lon, lat] = item.Point.coordinates.split(',')
      return Cartesian3.fromDegrees(Number(lon), Number(lat))
    })
    removeEntitys()
    // 起点
    newViewer.value.entities.add({
      id: 'drone-job-wayline-start',
src/views/SignMachineNest/MachineRight/InspectionRaskList.vue
@@ -338,9 +338,11 @@
    //         job_id: '7aa5222c-2f8b-401e-b6ba-d6a550398829',
    //     },
    // ]
})
    if (tableList.value.length > 0) {
        await getTaskDetails(tableList.value[0].wayline_job_info_id)
watch([() => tabIndex.value, () => tableList.value], async ([newTabIndex, newTableList]) => {
    if (newTabIndex == 1 && newTableList.length > 0) {
        await getTaskDetails(newTableList[0].wayline_job_info_id)
    }
})