消防站

This commit is contained in:
wzy-warehouse
2026-04-18 20:48:01 +08:00
parent cee9eb50eb
commit b7c0ce7068
15 changed files with 350 additions and 7 deletions
@@ -205,9 +205,7 @@ export const useEarthquakeDisasterChain = () => {
name: '显示消防站',
statusStore: statusStore.poiLayers,
statusKey: 'showFireStation' as const,
callback: (status: unknown) => {
console.log('显示消防站', status);
},
callback: layerControl.clickFireStation,
},
{
name: '显示储备点',
+5
View File
@@ -64,6 +64,11 @@ export const useMap = () => {
useLoadingInformationStore().emergencyShelter.id = id;
}
// 消防站
else if (pickedObject.id.startsWith(config.prefix.fireStationPointId)) {
useLoadingInformationStore().fireStation.id = id;
}
// 其他
else {
// 重置状态
@@ -0,0 +1,33 @@
import { firefighterIcon } from '@/assets';
/**
* 消防站相关钩子函数
* @returns
*/
export const useFireStationPoint = () => {
/**
* 字段映射配置
*/
const field = {
teamName: '消防站/队名称',
teamType: '消防站类型',
address: '地理位置',
lon: '经度',
lat: '纬度',
teamNum: '消防队人数',
cars: '消防车数量',
devices: '消防器材数量',
unitHead: '负责人',
telephone: '手机号',
};
/**
* 获取消防站图标
* @returns 图标路径
*/
function getDisasterIcon(): string {
return firefighterIcon;
}
return { field, getDisasterIcon };
};
+1 -3
View File
@@ -235,9 +235,7 @@ export const useRainDisasterChain = () => {
name: '显示消防站',
statusStore: statusStore.poiLayers,
statusKey: 'showFireStation' as const,
callback: (status: unknown) => {
console.log('显示消防站', status);
},
callback: layerControl.clickFireStation,
},
{
name: '显示储备点',
+9
View File
@@ -37,10 +37,19 @@ export const useLayerControl = () => {
useStatusStore().poiLayers.showRefugeeShelter.loading = true;
};
/**
* 点击显示消防站
*/
const clickFireStation = () => {
// 加载状态为true
useStatusStore().poiLayers.showFireStation.loading = true;
};
return {
clickHiddenDangerPoint,
clickHospital,
clickDangerousSource,
clickEmergencyShelter,
clickFireStation,
};
};