From b3de47a55bb968797abb16d48cd9b4522a11a7f1 Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Fri, 22 Sep 2023 17:07:12 +0800
Subject: [PATCH] 视频问题部分修改提交

---
 src/pages/page-web/projects/tsa.vue |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/pages/page-web/projects/tsa.vue b/src/pages/page-web/projects/tsa.vue
index 42994f2..b9ef43d 100644
--- a/src/pages/page-web/projects/tsa.vue
+++ b/src/pages/page-web/projects/tsa.vue
@@ -281,14 +281,14 @@
 const getResource = (name: string) => {
   return new URL(`/src/assets/icons/${name}`, import.meta.url).href
 }
-const hasFlownToLocation = ref(false)
+// 获取ws连接过来的sn设备号
+const snCode = ref<string[]>([])
 // 添加机场标注
 watch(() => store.state.deviceState, data => {
   const cesium = cesiumOperation(global.$viewer)
-  cesium.removeAllPoint()
-  if (data.currentType === EDeviceTypeName.Gateway && data.gatewayInfo[data.currentSn]) {
-    // deviceTsaUpdateHook.moveTo(data.currentSn, data.gatewayInfo[data.currentSn].longitude, data.gatewayInfo[data.currentSn].latitude)
-  }
+  if (snCode.value.includes(data.currentSn)) return
+  snCode.value.push(data.currentSn)
+  // cesium.removeAllPoint()
   if (data.currentType === EDeviceTypeName.Aircraft && data.deviceInfo[data.currentSn]) {
     // 无人机图标
     const setting = {
@@ -321,9 +321,7 @@
       }
     }
     cesium.addPoint(setting)
-    if (hasFlownToLocation.value) return
-    cesium.flyTo(setting)
-    hasFlownToLocation.value = true
+    // cesium.flyTo(setting)
   }
 }, {
   deep: true,
@@ -428,7 +426,8 @@
     osdVisible.value.gateway_callsign = device.gateway.callsign
     osdVisible.value.payloads = device.payload
   }
-  store.commit('SET_OSD_VISIBLE_INFO', osdVisible)
+  console.log(osdVisible.value, 'value')
+  store.commit('SET_OSD_VISIBLE_INFO', osdVisible.value)
   store.commit('SET_HMSInfo_DetailSn', sn)
 }
 

--
Gitblit v1.9.3