规范化操作
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user