Merge remote-tracking branch 'origin/main' into zxy

This commit is contained in:
2026-06-17 22:07:09 +08:00
45 changed files with 677 additions and 56 deletions
@@ -4,6 +4,7 @@ import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
import {
debrisFlowIcon,
landslideIcon,
collapseIcon,
riskAreaIcon,
earthquakeLineIcon,
hospitalIcon,
@@ -146,6 +147,18 @@ export const useEarthquakeDisasterChain = () => {
LoadingResource.DEBRIS_FLOW_HIDDEN_POINT
),
},
{
name: '崩塌隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showCollapseHiddenPoint' as const,
callback: layerControl.clickCollapseHiddenPoint,
link: collapseIcon,
category: ControlPanelCategory.DISASTER_HAZARD,
count: () =>
resourceStore.getResourceCount(
LoadingResource.COLLAPSE_HIDDEN_POINT
),
},
{
name: '风险点',
statusStore: statusStore.mapLayers,
+6
View File
@@ -25,6 +25,7 @@ export const useMap = () => {
// 当id改变时候,重置状态
if (
loadingInfoStore.landslideHiddenPoint.id !== id &&
loadingInfoStore.collapseHiddenPoint.id !== id &&
loadingInfoStore.debrisFlowHiddenPoint.id !== id &&
loadingInfoStore.waterLoggingHiddenPoint.id !== id &&
loadingInfoStore.flashFloodHiddenPoint.id !== id &&
@@ -43,6 +44,11 @@ export const useMap = () => {
loadingInfoStore.landslideHiddenPoint.id = id;
}
// 崩塌隐患点
else if (pickedObject.id.startsWith(config.prefix.collapseHiddenPointId)) {
loadingInfoStore.collapseHiddenPoint.id = id;
}
// 泥石流隐患点
else if (pickedObject.id.startsWith(config.prefix.debrisFlowHiddenPointId)) {
loadingInfoStore.debrisFlowHiddenPoint.id = id;
+13 -1
View File
@@ -1,4 +1,5 @@
import {
collapseIcon,
debrisFlowIcon,
flashFloodIcon,
landslideIcon,
@@ -14,6 +15,7 @@ export const useHiddenPoint = () => {
* 字段映射配置
*/
const field = {
probability: '预测概率',
fieldCode: '野外编号',
disasterName: '灾害点名称',
position: '位置',
@@ -22,6 +24,13 @@ export const useHiddenPoint = () => {
riskGrade: '风险等级',
};
/**
* 样式
*/
const style = {
probability: { background: '#888888' },
};
/**
* 根据灾害类型获取对应图标
* @param disasterType - 灾害类型(支持中英文)
@@ -33,6 +42,9 @@ export const useHiddenPoint = () => {
case 'landslide':
case '滑坡':
return landslideIcon;
case 'collapse':
case '崩塌':
return collapseIcon;
case 'debris_flow':
case '泥石流':
return debrisFlowIcon;
@@ -47,5 +59,5 @@ export const useHiddenPoint = () => {
}
}
return { field, getDisasterIcon };
return { field, style, getDisasterIcon };
};
@@ -161,6 +161,13 @@ export const useLayerControl = () => {
statusStore.poiLayers.showLandslideHiddenPoint.loading = true;
};
/**
* 显示崩塌隐患点
*/
const clickCollapseHiddenPoint = () => {
statusStore.poiLayers.showCollapseHiddenPoint.loading = true;
};
/**
* 显示泥石流隐患点
*/
@@ -221,6 +228,7 @@ export const useLayerControl = () => {
clickReservoir,
clickSubwayStation,
clickLandslideHiddenPoint,
clickCollapseHiddenPoint,
clickDebrisFlowHiddenPoint,
clickWaterLoggingHiddenPoint,
clickFlashFloodHiddenPoint,
@@ -4,12 +4,15 @@ import config from '@/config/config.json';
import { useLeftLegendStore } from '@/stores/useLeftLegendStore';
import { useScene } from '../useScene';
import { useRainstormDeduction } from '../rainstorm/useRainstormDeduction';
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
export const useRightHandle = () => {
const statusStore = useStatusStore();
const leftLegendStore = useLeftLegendStore();
const scene = useScene();
const rainstormDeduction = useRainstormDeduction();
const simulationIdStore = useSimulationIdStore();
/**
* 暴雨模拟
* @param status - 状态
@@ -25,6 +28,12 @@ export const useRightHandle = () => {
// 添加图例
rainstormDeduction.addLegend();
// 如果有脉冲,显示脉冲
CesiumUtilsSingleton.showPulseEffects();
// 模拟id状态为true
simulationIdStore.status = true;
} else {
// 关闭暴雨模拟:隐藏降雨栅格图层
statusStore.weatherLayers.showRainfallGrid.show = false;
@@ -34,6 +43,12 @@ export const useRightHandle = () => {
// 隐藏步骤条
statusStore.uiComponents.stepBar.show = false;
// 隐藏脉冲
CesiumUtilsSingleton.hidePulseEffects();
// 模拟id状态为false
simulationIdStore.status = false;
}
};
+9 -1
View File
@@ -14,6 +14,7 @@ export const useRiskPoint = () => {
* 字段映射配置
*/
const field = {
probability: '预测概率',
riskName: '风险区名称',
unitCode: '统一编号',
housing: '住房(间)',
@@ -27,6 +28,13 @@ export const useRiskPoint = () => {
lat: '纬度',
};
/**
* 样式
*/
const style = {
probability: { background: '#888888' },
};
/**
* 获取风险点图标
* @returns 图标路径
@@ -35,5 +43,5 @@ export const useRiskPoint = () => {
return riskAreaIcon;
}
return { informationBoxTitle, field, getDisasterIcon };
return { informationBoxTitle, field, style, getDisasterIcon };
};
@@ -4,6 +4,7 @@ import {
debrisFlowIcon,
flashFloodIcon,
landslideIcon,
collapseIcon,
riskAreaIcon,
waterLoggingIcon,
hospitalIcon,
@@ -199,6 +200,18 @@ export const useRainDisasterChain = () => {
LoadingResource.FLASH_FLOOD_HIDDEN_POINT
),
},
{
name: '崩塌隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showCollapseHiddenPoint' as const,
callback: layerControl.clickCollapseHiddenPoint,
link: collapseIcon,
category: ControlPanelCategory.DISASTER_HAZARD,
count: () =>
resourceStore.getResourceCount(
LoadingResource.COLLAPSE_HIDDEN_POINT
),
},
{
name: '风险点',
statusStore: statusStore.mapLayers,
+5
View File
@@ -1,6 +1,7 @@
import { useButtonSelectedIdStore } from '@/stores/useButtonSelectedIdStore';
import { useLeftLegendStore } from '@/stores/useLeftLegendStore';
import { useLoadingInformationStore } from '@/stores/useLoadingInformation';
import { useSimulationIdStore } from '@/stores/useSimulationIdStore';
import { useStatusStore } from '@/stores/useStatusStore';
export const useScene = () => {
@@ -8,6 +9,7 @@ export const useScene = () => {
const loadingInformationStore = useLoadingInformationStore();
const leftLegendStore = useLeftLegendStore();
const buttonSelectedIdStore = useButtonSelectedIdStore();
const simulationIdStore = useSimulationIdStore();
// 重置场景
const resetScene = () => {
@@ -22,6 +24,9 @@ export const useScene = () => {
// 重置左侧图例
leftLegendStore.resetLegendListInfo();
// 重置模拟id
simulationIdStore.resetSimulationId();
};
return { resetScene };