Browse Source

修复机场图标

李富豪 1 year ago
parent
commit
f152e0aec0

+ 6 - 2
Web/src/components/GMap.vue

@@ -286,10 +286,14 @@ export default defineComponent({
 
     onUnmounted(() => {
       const gatewayInfo = store.state.deviceState.gatewayInfo;
-      for (const key in gatewayInfo) {
+      for (const key in gatewayInfo) {// 清除上次绘制的遥控器图标
         deviceTsaUpdateHook.removeDeviceMarker(key)
       }
-      root.$map.destroy()
+      const dockInfo = store.state.deviceState.dockInfo;
+      for (const sn in dockInfo) {// 清除上次绘制的机场图标
+        deviceTsaUpdateHook.removeDeviceMarker(sn);
+      }
+      root.$map.destroy();
     })
 
     const { getDrawFlightAreaCallback, onFlightAreaDroneLocationWs } = useFlightArea()

+ 1 - 1
Web/src/hooks/use-g-map-tsa.ts

@@ -49,7 +49,7 @@ export function deviceTsaUpdate() {
     AMap = root.$aMap
     if (type !== EDeviceTypeName.Aircraft) {// 加入判断屏蔽小飞机图标
       markers[sn] = new AMap.Marker({
-        position: new AMap.LngLat(lng || 113.943225499, lat || 22.577673716),
+        position: new AMap.LngLat(lng || 121.48, lat || 31.22),
         icon: initIcon(type),
         title: name,
         anchor: 'top-center',

+ 1 - 1
Web/src/pages/page-web/projects/task/taskList/index.vue

@@ -274,7 +274,7 @@ onMounted(async () => {
       }
     }, { deep: true })
     getOnlineDeviceHms()
-  }, 1000)// 默认3秒,此时改成1
+  }, 500)// 默认3秒,此时改成0.5
   await fetchList();
 });
 

+ 1 - 1
Web/src/pages/page-web/projects/tsa.vue

@@ -103,7 +103,7 @@ onMounted(() => {
       }, { deep: true }
     )
     getOnlineDeviceHms()
-  }, 1000)// 默认3秒,此时改成1
+  }, 500)// 默认3秒,此时改成0.5
   const element = document.getElementsByClassName('scrollbar').item(0) as HTMLDivElement
   const parent: any = element?.parentNode as HTMLDivElement
   scorllHeight.value = parent?.clientHeight - parent?.firstElementChild?.clientHeight