husq
2023-09-22 b3de47a55bb968797abb16d48cd9b4522a11a7f1
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)
}