消防站
This commit is contained in:
@@ -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: '显示储备点',
|
||||
|
||||
@@ -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 };
|
||||
};
|
||||
@@ -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: '显示储备点',
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user