规范化操作

This commit is contained in:
wzy-warehouse
2026-04-18 17:34:46 +08:00
parent da7745b7a9
commit f3fd716352
8 changed files with 107 additions and 62 deletions
@@ -37,6 +37,7 @@
import { useHiddenPoint } from '@/hooks/rain-earthquake/useHiddenPoint';
import { useStatusStore } from '@/stores/useStatusStore';
import { LoadingResource } from '@/types/common/LoadingResourceType';
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore';
// 接收父组件传递的参数
const props = defineProps<{
@@ -97,5 +98,27 @@
}
}
);
// 监听显示隐藏
watch(
() => useStatusStore().mapLayers.hiddenDangerPointShow.show,
(newValue: boolean) => {
if (newValue) {
// 显示隐患点
CesiumUtilsSingleton.batchShowPrimitives(
useLoadingResourceStore().getLoadingResource(
LoadingResource.HIDDEN_DANGER_POINT
)
);
} else {
// 隐藏隐患点
CesiumUtilsSingleton.batchHidePrimitives(
useLoadingResourceStore().getLoadingResource(
LoadingResource.HIDDEN_DANGER_POINT
)
);
}
}
);
</script>
<style scoped></style>