| | |
| | | <template> |
| | | <div class="g-map-wrapper"> |
| | | <!-- 地图区域 --> |
| | | <div id="g-container" :style="{ width: '100%', height: '100%' }" /> |
| | | <!-- <div id="g-container" :style="{ width: '100%', height: '100%' }" /> --> |
| | | <Cesium /> |
| | | <!-- 绘制面板 --> |
| | | <div class="g-action-panel" :style="{ right: drawVisible ? '316px' : '16px' }"> |
| | | <!-- <div class="g-action-panel" :style="{ right: drawVisible ? '316px' : '16px' }"> |
| | | <div :class="state.currentType === 'pin' ? 'g-action-item selection' : 'g-action-item'" @click="draw('pin', true)"> |
| | | <a><a-image :src="pin" :preview="false" /></a> |
| | | </div> |
| | |
| | | <CloseOutlined /> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <!-- 飞机OSD --> |
| | | <div v-if="osdVisible.visible && !osdVisible.is_dock" class="osd-panel fz12"> |
| | | <div class="pl5 pr5 flex-align-center flex-row flex-justify-between" |
| | |
| | | import { useDockControl } from './g-map/use-dock-control' |
| | | import DroneControlPanel from './g-map/DroneControlPanel.vue' |
| | | import { useConnectMqtt } from './g-map/use-connect-mqtt' |
| | | |
| | | import Cesium from './cesiumMap/cesium.vue' |
| | | export default defineComponent({ |
| | | components: { |
| | | BorderOutlined, |
| | |
| | | stopLivestream({ |
| | | video_id: videoId |
| | | }).then(res => { |
| | | console.log(res, 'res') |
| | | if (res.code === 0) { |
| | | aircraftUrl.value = '' |
| | | } |
| | |
| | | watch(() => store.state.deviceStatusEvent, |
| | | data => { |
| | | if (Object.keys(data.deviceOnline).length !== 0) { |
| | | deviceTsaUpdateHook.initMarker(data.deviceOnline.domain, data.deviceOnline.device_callsign, data.deviceOnline.sn) |
| | | // deviceTsaUpdateHook.initMarker(data.deviceOnline.domain, data.deviceOnline.device_callsign, data.deviceOnline.sn) |
| | | store.state.deviceStatusEvent.deviceOnline = {} as DeviceStatus |
| | | } |
| | | if (Object.keys(data.deviceOffline).length !== 0) { |
| | | deviceTsaUpdateHook.removeMarker(data.deviceOffline.sn) |
| | | // deviceTsaUpdateHook.removeMarker(data.deviceOffline.sn) |
| | | if ((data.deviceOffline.sn === osdVisible.value.sn) || (osdVisible.value.is_dock && data.deviceOffline.sn === osdVisible.value.gateway_sn)) { |
| | | osdVisible.value.visible = false |
| | | store.commit('SET_OSD_VISIBLE_INFO', osdVisible) |
| | |
| | | |
| | | watch(() => store.state.deviceState, data => { |
| | | if (data.currentType === EDeviceTypeName.Gateway && data.gatewayInfo[data.currentSn]) { |
| | | deviceTsaUpdateHook.moveTo(data.currentSn, data.gatewayInfo[data.currentSn].longitude, data.gatewayInfo[data.currentSn].latitude) |
| | | if (osdVisible.value.visible && osdVisible.value.gateway_sn !== '') { |
| | | deviceInfo.gateway = data.gatewayInfo[osdVisible.value.gateway_sn] |
| | | } |
| | | } |
| | | if (data.currentType === EDeviceTypeName.Aircraft && data.deviceInfo[data.currentSn]) { |
| | | deviceTsaUpdateHook.moveTo(data.currentSn, data.deviceInfo[data.currentSn].longitude, data.deviceInfo[data.currentSn].latitude) |
| | | if (osdVisible.value.visible && osdVisible.value.sn !== '') { |
| | | deviceInfo.device = data.deviceInfo[osdVisible.value.sn] |
| | | } |
| | | } |
| | | if (data.currentType === EDeviceTypeName.Dock && data.dockInfo[data.currentSn]) { |
| | | deviceTsaUpdateHook.initMarker(EDeviceTypeName.Dock, [EDeviceTypeName.Dock], data.currentSn, data.dockInfo[data.currentSn].basic_osd?.longitude, data.dockInfo[data.currentSn].basic_osd?.latitude) |
| | | if (osdVisible.value.visible && osdVisible.value.is_dock && osdVisible.value.gateway_sn !== '') { |
| | | deviceInfo.dock = data.dockInfo[osdVisible.value.gateway_sn] |
| | | deviceInfo.device = data.deviceInfo[deviceInfo.dock.basic_osd.sub_device?.device_sn ?? osdVisible.value.sn] |
| | |
| | | useConnectMqtt() |
| | | |
| | | onMounted(() => { |
| | | const app = getApp() |
| | | useGMapManageHook.globalPropertiesConfig(app) |
| | | // const app = getApp() |
| | | // useGMapManageHook.globalPropertiesConfig(app) |
| | | }) |
| | | |
| | | function getDrawCallback ({ obj }) { |
| | |
| | | aircraftUrl, |
| | | aircraftList, |
| | | aircraSelected, |
| | | selectChange |
| | | selectChange, |
| | | } |
| | | } |
| | | }) |