| | |
| | | import { useMyStore } from '@/store' |
| | | import { getTwoPointInfo } from '@/api/manage' |
| | | |
| | | const { getEntityById, removeById, globalCesium, addLeftClickEvent, removeLeftClickEvent, flyTo } = cesiumOperation() |
| | | const { getEntityById, removeById, globalCesium, removeAllPoint, addLeftClickEvent, removeLeftClickEvent, flyTo } = cesiumOperation() |
| | | // 无人机实体 |
| | | let droneEntity = null |
| | | |
| | |
| | | // 当飞机模型存在 |
| | | if (droneEntity) { |
| | | // 且在空中飞行时,实时更新飞机模型的位置 |
| | | if (deviceInfo.mode_code && [3, 4, 5, 9, 10, 16].includes(deviceInfo.mode_code)) { |
| | | if (deviceInfo.mode_code && [3, 4, 5, 9, 10, 16, 17].includes(deviceInfo.mode_code)) { |
| | | if (store.currentAngle == 3) { |
| | | viewInfoFrustum?.clear() |
| | | } else { |
| | |
| | | } else { |
| | | removeById('drone_fly') |
| | | droneEntity = null |
| | | |
| | | removeById('me_dw') |
| | | myAppEntity = null |
| | | |
| | | lastTime = null |
| | | viewInfoFrustum?.clear() |
| | |
| | | |
| | | window.cesiumViewer.camera.lookAtTransform(globalCesium.Matrix4.IDENTITY) |
| | | store.commit('SET_CURRENTANGLE', 1) |
| | | removeAllPoint() |
| | | } |
| | | } else { |
| | | if (deviceInfo.mode_code && [3, 4, 5, 9, 10].includes(deviceInfo.mode_code)) { |
| | | if (deviceInfo.mode_code && [3, 4, 5, 9, 10, 17].includes(deviceInfo.mode_code)) { |
| | | // 暂时把视锥代码注释掉 |
| | | initCreateFrustum(deviceInfo, viewDroneInfo) |
| | | addFlyGltf( |
| | |
| | | }) |
| | | } |
| | | |
| | | if (data.deviceInfo[data.currentSn].mode_code && [3, 4, 5, 9, 10].includes(deviceInfo.mode_code)) { |
| | | if (data.deviceInfo[data.currentSn].mode_code && [3, 4, 5, 9, 10, 17].includes(deviceInfo.mode_code)) { |
| | | if (switchSaving) return (switchSaving = false) |
| | | const newPositions = globalCesium.Cartesian3.fromDegrees( |
| | | data.deviceInfo[data.currentSn].longitude, |