物资储备点
This commit is contained in:
@@ -211,9 +211,7 @@ export const useEarthquakeDisasterChain = () => {
|
||||
name: '显示储备点',
|
||||
statusStore: statusStore.poiLayers,
|
||||
statusKey: 'showReservePoint' as const,
|
||||
callback: (status: unknown) => {
|
||||
console.log('显示储备点', status);
|
||||
},
|
||||
callback: layerControl.clickStorePoints,
|
||||
},
|
||||
{
|
||||
name: '显示学校',
|
||||
|
||||
@@ -69,6 +69,11 @@ export const useMap = () => {
|
||||
useLoadingInformationStore().fireStation.id = id;
|
||||
}
|
||||
|
||||
// 物资储备点
|
||||
else if (pickedObject.id.startsWith(config.prefix.storePointsPointId)) {
|
||||
useLoadingInformationStore().storePoints.id = id;
|
||||
}
|
||||
|
||||
// 其他
|
||||
else {
|
||||
// 重置状态
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import storePointsIcon from '@/assets/images/icon/store-points.jpg';
|
||||
|
||||
/**
|
||||
* 物资储备点相关钩子函数
|
||||
* @returns
|
||||
*/
|
||||
export const useStorePointsPoint = () => {
|
||||
/**
|
||||
* 字段映射配置
|
||||
*/
|
||||
const field = {
|
||||
name: '储备站点名称',
|
||||
level: '级别',
|
||||
type: '储备站类型',
|
||||
address: '地理位置',
|
||||
lon: '经度',
|
||||
lat: '纬度',
|
||||
volume: '储备站有效库容',
|
||||
tent: '救援帐篷数',
|
||||
generator: '发电机数',
|
||||
unitHead: '负责人',
|
||||
telephone: '手机号',
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取物资储备点图标
|
||||
* @returns 图标路径
|
||||
*/
|
||||
function getDisasterIcon(): string {
|
||||
return storePointsIcon;
|
||||
}
|
||||
|
||||
return { field, getDisasterIcon };
|
||||
};
|
||||
@@ -241,9 +241,7 @@ export const useRainDisasterChain = () => {
|
||||
name: '显示储备点',
|
||||
statusStore: statusStore.poiLayers,
|
||||
statusKey: 'showReservePoint' as const,
|
||||
callback: (status: unknown) => {
|
||||
console.log('显示储备点', status);
|
||||
},
|
||||
callback: layerControl.clickStorePoints,
|
||||
},
|
||||
{
|
||||
name: '显示学校',
|
||||
|
||||
@@ -45,11 +45,20 @@ export const useLayerControl = () => {
|
||||
useStatusStore().poiLayers.showFireStation.loading = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击显示物资储备点
|
||||
*/
|
||||
const clickStorePoints = () => {
|
||||
// 加载状态为true
|
||||
useStatusStore().poiLayers.showReservePoint.loading = true;
|
||||
};
|
||||
|
||||
return {
|
||||
clickHiddenDangerPoint,
|
||||
clickHospital,
|
||||
clickDangerousSource,
|
||||
clickEmergencyShelter,
|
||||
clickFireStation,
|
||||
clickStorePoints,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user