显示学校

This commit is contained in:
wzy-warehouse
2026-04-21 20:56:25 +08:00
parent 89d6313542
commit 16d049d082
16 changed files with 326 additions and 8 deletions
@@ -53,6 +53,14 @@ export const useLayerControl = () => {
useStatusStore().poiLayers.showReservePoint.loading = true;
};
/**
* 点击显示学校
*/
const clickSchool = () => {
// 加载状态为true
useStatusStore().poiLayers.showSchool.loading = true;
};
/**
* 点击显示人口网格
*/
@@ -75,6 +83,7 @@ export const useLayerControl = () => {
clickEmergencyShelter,
clickFireStation,
clickStorePoints,
clickSchool,
clickPopulationGrid,
clickWaterPipe,
};
@@ -0,0 +1,31 @@
import { schoolIcon } from '@/assets';
/**
* 学校相关钩子函数
* @returns 字段映射和获取图标方法
*/
export const useSchoolPoint = () => {
/**
* 字段映射配置
*/
const field = {
schoolName: '学校名称',
schoolType: '学校类型',
lon: '经度',
lat: '纬度',
students: '在校学生数',
isImportant: '是否有重点保护目标',
unitHead: '负责人',
telephone: '联系电话',
};
/**
* 获取学校图标
* @returns 图标路径
*/
function getDisasterIcon(): string {
return schoolIcon;
}
return { field, getDisasterIcon };
};
@@ -1,4 +1,4 @@
import storePointsIcon from '@/assets/images/icon/store-points.jpg';
import { storePointsIcon } from '@/assets';
/**
* 物资储备点相关钩子函数