添加桥梁

This commit is contained in:
zhuangzhuang2000
2026-04-27 14:14:39 +08:00
parent 2b2bf3f5a4
commit 76c9a765fc
16 changed files with 317 additions and 12 deletions
@@ -241,9 +241,7 @@ export const useEarthquakeDisasterChain = () => {
name: '显示桥梁',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showBridge' as const,
callback: (status: unknown) => {
console.log('显示桥梁', status);
},
callback: layerControl.clickBridge,
},
{
name: '显示高速',
@@ -268,7 +266,7 @@ export const useEarthquakeDisasterChain = () => {
{
name: '显示地铁站',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showReservoir' as const,
statusKey: 'showSubway' as const,
callback: (status: unknown) => {
console.log('显示地铁站', status);
},
+5 -1
View File
@@ -79,13 +79,17 @@ export const useMap = () => {
useLoadingInformationStore().school.id = id;
}
// 桥梁
else if (pickedObject.id.startsWith(config.prefix.bridgePointId)) {
useLoadingInformationStore().bridge.id = id;
}
// 其他
else {
// 重置状态
useLoadingInformationStore().resetStatue();
}
} else {
console.log(pickedObject);
// 重置状态
useLoadingInformationStore().resetStatue();
}
@@ -0,0 +1,28 @@
import { bridgeIcon } from '@/assets';
/**
* 桥梁相关钩子函数
* @returns
*/
export const useBridgePoint = () => {
/**
* 字段映射配置
*/
const field = {
bridgeName: '桥梁名称',
bridgeType: '桥梁类型',
techType: '技术类型',
lon: '经度',
lat: '纬度',
};
/**
* 获取桥梁图标
* @returns 图标路径
*/
function getDisasterIcon(): string {
return bridgeIcon;
}
return { field, getDisasterIcon };
};
+8 -2
View File
@@ -95,7 +95,12 @@ export const useLayerControl = () => {
const clickNationRoad = () => {
useStatusStore().infrastructureLayers.showMainRoad.loading = true;
};
/**
* 显示桥梁
*/
const clickBridge = () => {
useStatusStore().infrastructureLayers.showBridge.loading = true;
};
return {
clickHiddenDangerPoint,
@@ -109,6 +114,7 @@ export const useLayerControl = () => {
clickWaterPipe,
clickTrafficRoad,
clickHighway,
clickNationRoad
clickNationRoad,
clickBridge,
};
};
+2 -4
View File
@@ -264,9 +264,7 @@ export const useRainDisasterChain = () => {
name: '显示桥梁',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showBridge' as const,
callback: (status: unknown) => {
console.log('显示桥梁', status);
},
callback: layerControl.clickBridge,
},
{
name: '显示高速',
@@ -291,7 +289,7 @@ export const useRainDisasterChain = () => {
{
name: '显示地铁站',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showReservoir' as const,
statusKey: 'showSubway' as const,
callback: (status: unknown) => {
console.log('显示地铁站', status);
},