危险源点

This commit is contained in:
wzy-warehouse
2026-04-18 19:03:06 +08:00
parent f3fd716352
commit ad3ffe91b0
15 changed files with 319 additions and 8 deletions
@@ -193,9 +193,7 @@ export const useEarthquakeDisasterChain = () => {
name: '显示危险源',
statusStore: statusStore.poiLayers,
statusKey: 'showDangerSource' as const,
callback: (status: unknown) => {
console.log('显示危险源', status);
},
callback: layerControl.clickDangerousSource,
},
{
name: '显示避难所',
+7
View File
@@ -50,6 +50,13 @@ export const useMap = () => {
useLoadingInformationStore().hospital.id = id;
}
// 危险源
else if (
pickedObject.id.startsWith(config.prefix.dangerousSourcePointId)
) {
useLoadingInformationStore().dangerousSource.id = id;
}
// 其他
else {
// 重置状态
@@ -0,0 +1,32 @@
import { dangerousSourceIcon } from '@/assets';
/**
* 危险源相关钩子函数
* @returns
*/
export const useDangerousSourcePoint = () => {
/**
* 字段映射配置
*/
const field = {
unitCode: '统一编号',
name: '危险源名称',
level: '级别',
enterpriseType: '危险源类型',
address: '地理位置',
lon: '经度',
lat: '纬度',
unitHead: '负责人',
telephone: '手机号',
};
/**
* 获取危险源图标
* @returns 图标路径
*/
function getDisasterIcon(): string {
return dangerousSourceIcon;
}
return { field, getDisasterIcon };
};
+1 -3
View File
@@ -223,9 +223,7 @@ export const useRainDisasterChain = () => {
name: '显示危险源',
statusStore: statusStore.poiLayers,
statusKey: 'showDangerSource' as const,
callback: (status: unknown) => {
console.log('显示危险源', status);
},
callback: layerControl.clickDangerousSource,
},
{
name: '显示避难所',
+9 -1
View File
@@ -21,5 +21,13 @@ export const useLayerControl = () => {
useStatusStore().poiLayers.showHospital.loading = true;
};
return { clickHiddenDangerPoint, clickHospital };
/**
* 点击显示危险源
*/
const clickDangerousSource = () => {
// 加载状态为true
useStatusStore().poiLayers.showDangerSource.loading = true;
};
return { clickHiddenDangerPoint, clickHospital, clickDangerousSource };
};