添加崩塌隐患点
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
collapseIcon,
|
||||
debrisFlowIcon,
|
||||
flashFloodIcon,
|
||||
landslideIcon,
|
||||
@@ -33,6 +34,9 @@ export const useHiddenPoint = () => {
|
||||
case 'landslide':
|
||||
case '滑坡':
|
||||
return landslideIcon;
|
||||
case 'collapse':
|
||||
case '崩塌':
|
||||
return collapseIcon;
|
||||
case 'debris_flow':
|
||||
case '泥石流':
|
||||
return debrisFlowIcon;
|
||||
|
||||
@@ -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,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,
|
||||
|
||||
Reference in New Issue
Block a user