2026-04-18 16:40:04 +08:00
|
|
|
import { useStatusStore } from '@/stores/useStatusStore';
|
2026-04-16 09:09:00 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 控制面板显示隐藏逻辑
|
|
|
|
|
*/
|
|
|
|
|
export const useLayerControl = () => {
|
|
|
|
|
/**
|
|
|
|
|
* 点击显示隐藏隐患点
|
|
|
|
|
* @param status - 显示隐藏状态
|
|
|
|
|
*/
|
|
|
|
|
const clickHiddenDangerPoint = (status: unknown) => {
|
2026-04-18 17:34:46 +08:00
|
|
|
// 改变风险点显示状态
|
|
|
|
|
useStatusStore().mapLayers.riskPointShow.show = status as boolean;
|
2026-04-16 09:09:00 +08:00
|
|
|
};
|
|
|
|
|
|
2026-04-18 16:40:04 +08:00
|
|
|
/**
|
|
|
|
|
* 点击显示医院
|
|
|
|
|
*/
|
2026-04-18 17:34:46 +08:00
|
|
|
const clickHospital = () => {
|
|
|
|
|
// 加载状态为true
|
|
|
|
|
useStatusStore().poiLayers.showHospital.loading = true;
|
2026-04-18 16:40:04 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return { clickHiddenDangerPoint, clickHospital };
|
2026-04-16 09:09:00 +08:00
|
|
|
};
|