规范化操作

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
@@ -36,6 +36,7 @@
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
import { useRiskPoint } from '@/hooks/rain-earthquake/useRiskPoint';
import { LoadingResource } from '@/types/common/LoadingResourceType';
import { useLoadingResourceStore } from '@/stores/useLoadingResourceStore';
const riskPoints = ref<Point[]>([]);
@@ -88,6 +89,26 @@
}
}
);
// 监听显示隐藏风险点
watch(
() => useStatusStore().mapLayers.riskPointShow.show,
(newValue: boolean) => {
if (newValue) {
CesiumUtilsSingleton.batchShowPrimitives(
useLoadingResourceStore().getLoadingResource(
LoadingResource.RISK_POINT
)
);
} else {
CesiumUtilsSingleton.batchHidePrimitives(
useLoadingResourceStore().getLoadingResource(
LoadingResource.RISK_POINT
)
);
}
}
);
</script>
<style scoped></style>