From e91e29a9a6dd4f7cb436da3c5c59fdd750e35129 Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Thu, 21 Sep 2023 16:37:05 +0800
Subject: [PATCH] 修改workSpaceId、地图逻辑修改

---
 src/components/GMap.vue |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index ba82548..4e8c879 100644
--- a/src/components/GMap.vue
+++ b/src/components/GMap.vue
@@ -1,9 +1,10 @@
 <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>
@@ -24,7 +25,7 @@
           <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"
@@ -666,7 +667,7 @@
 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,
@@ -958,7 +959,6 @@
         stopLivestream({
           video_id: videoId
         }).then(res => {
-          console.log(res, 'res')
           if (res.code === 0) {
             aircraftUrl.value = ''
           }
@@ -973,11 +973,11 @@
     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)
@@ -992,19 +992,16 @@
 
     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]
@@ -1085,8 +1082,8 @@
     useConnectMqtt()
 
     onMounted(() => {
-      const app = getApp()
-      useGMapManageHook.globalPropertiesConfig(app)
+      // const app = getApp()
+      // useGMapManageHook.globalPropertiesConfig(app)
     })
 
     function getDrawCallback ({ obj }) {
@@ -1278,7 +1275,7 @@
       aircraftUrl,
       aircraftList,
       aircraSelected,
-      selectChange
+      selectChange,
     }
   }
 })

--
Gitblit v1.9.3