显示学校

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
@@ -217,9 +217,7 @@ export const useEarthquakeDisasterChain = () => {
name: '显示学校',
statusStore: statusStore.poiLayers,
statusKey: 'showSchool' as const,
callback: (status: unknown) => {
console.log('显示学校', status);
},
callback: layerControl.clickSchool,
},
{
name: '显示人口网格',
+5
View File
@@ -74,6 +74,11 @@ export const useMap = () => {
useLoadingInformationStore().storePoints.id = id;
}
// 学校
else if (pickedObject.id.startsWith(config.prefix.schoolPointId)) {
useLoadingInformationStore().school.id = id;
}
// 其他
else {
// 重置状态
@@ -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';
/**
* 物资储备点相关钩子函数
+1 -3
View File
@@ -240,9 +240,7 @@ export const useRainDisasterChain = () => {
name: '显示学校',
statusStore: statusStore.poiLayers,
statusKey: 'showSchool' as const,
callback: (status: unknown) => {
console.log('显示学校', status);
},
callback: layerControl.clickSchool,
},
{
name: '显示人口网格',