diff --git a/src/assets/images/icon/collapse.png b/src/assets/images/icon/collapse.png
new file mode 100644
index 0000000..a2155ee
Binary files /dev/null and b/src/assets/images/icon/collapse.png differ
diff --git a/src/assets/index.ts b/src/assets/index.ts
index 5af5201..6d65e8d 100644
--- a/src/assets/index.ts
+++ b/src/assets/index.ts
@@ -2,6 +2,7 @@
// 图标
export { default as landslideIcon } from '@/assets/images/icon/landslide.png';
+export { default as collapseIcon } from '@/assets/images/icon/collapse.png';
export { default as waterLoggingIcon } from '@/assets/images/icon/waterlogging.png';
export { default as debrisFlowIcon } from '@/assets/images/icon/debris-flow.png';
export { default as flashFloodIcon } from '@/assets/images/icon/flash-flood.png';
diff --git a/src/component/rain-earthquake/BasicComponent.vue b/src/component/rain-earthquake/BasicComponent.vue
index 34373d1..293c55d 100644
--- a/src/component/rain-earthquake/BasicComponent.vue
+++ b/src/component/rain-earthquake/BasicComponent.vue
@@ -14,6 +14,14 @@
"
/>
+
+
+
+
+
+
0"
+ :base-points="collapsePoints"
+ :get-disaster-icon="getDisasterIcon"
+ :prefix="config.prefix.collapseHiddenPointId"
+ :is-default="true"
+ :loading-resource-field="LoadingResource.COLLAPSE_HIDDEN_POINT"
+ />
+
+
+
+
+
+
+
+
+
diff --git a/src/config/config.json b/src/config/config.json
index 63a4daf..58dbfdc 100644
--- a/src/config/config.json
+++ b/src/config/config.json
@@ -35,6 +35,7 @@
},
"prefix": {
"landslideHiddenPointId": "landslide-hidden-point-",
+ "collapseHiddenPointId": "collapse-hidden-point-",
"debrisFlowHiddenPointId": "debris-flow-hidden-point-",
"waterLoggingHiddenPointId": "water-logging-hidden-point-",
"flashFloodHiddenPointId": "flash-flood-hidden-point-",
diff --git a/src/hooks/earthquake/useEarthquakeDisasterChain.ts b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
index 933ed0b..72d786e 100644
--- a/src/hooks/earthquake/useEarthquakeDisasterChain.ts
+++ b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
@@ -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,
diff --git a/src/hooks/map/useMap.ts b/src/hooks/map/useMap.ts
index 522b0cc..d82191a 100644
--- a/src/hooks/map/useMap.ts
+++ b/src/hooks/map/useMap.ts
@@ -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;
diff --git a/src/hooks/rain-earthquake/useHiddenPoint.ts b/src/hooks/rain-earthquake/useHiddenPoint.ts
index 88e9d98..8eccc4f 100644
--- a/src/hooks/rain-earthquake/useHiddenPoint.ts
+++ b/src/hooks/rain-earthquake/useHiddenPoint.ts
@@ -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;
diff --git a/src/hooks/rain-earthquake/useLayerControl.ts b/src/hooks/rain-earthquake/useLayerControl.ts
index b5da6ea..4d2b903 100644
--- a/src/hooks/rain-earthquake/useLayerControl.ts
+++ b/src/hooks/rain-earthquake/useLayerControl.ts
@@ -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,
diff --git a/src/hooks/rainstorm/useRainDisasterChain.ts b/src/hooks/rainstorm/useRainDisasterChain.ts
index ed1cacf..f8fdf78 100644
--- a/src/hooks/rainstorm/useRainDisasterChain.ts
+++ b/src/hooks/rainstorm/useRainDisasterChain.ts
@@ -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,
diff --git a/src/stores/useLoadingInformation.ts b/src/stores/useLoadingInformation.ts
index 28ac7a6..2a34fe5 100644
--- a/src/stores/useLoadingInformation.ts
+++ b/src/stores/useLoadingInformation.ts
@@ -114,6 +114,14 @@ export const useLoadingInformationStore = defineStore(
id: -1,
});
+ // ============================== 崩塌隐患点状态 ================================
+ const collapseHiddenPoint = reactive({
+ /** 加载状态 */
+ loading: false,
+ /** 崩塌隐患点ID */
+ id: -1,
+ });
+
// ============================== 泥石流隐患点状态 ================================
const debrisFlowHiddenPoint = reactive({
/** 加载状态 */
@@ -190,6 +198,10 @@ export const useLoadingInformationStore = defineStore(
landslideHiddenPoint.loading = false;
landslideHiddenPoint.id = -1;
+ // 崩塌隐患点状态重置
+ collapseHiddenPoint.loading = false;
+ collapseHiddenPoint.id = -1;
+
// 泥石流隐患点状态重置
debrisFlowHiddenPoint.loading = false;
debrisFlowHiddenPoint.id = -1;
@@ -216,6 +228,7 @@ export const useLoadingInformationStore = defineStore(
reservoir,
subwayStation,
landslideHiddenPoint,
+ collapseHiddenPoint,
debrisFlowHiddenPoint,
waterLoggingHiddenPoint,
flashFloodHiddenPoint,
diff --git a/src/stores/useStatusStore.ts b/src/stores/useStatusStore.ts
index 9650e0d..d2cd0a6 100644
--- a/src/stores/useStatusStore.ts
+++ b/src/stores/useStatusStore.ts
@@ -118,6 +118,11 @@ export const useStatusStore = defineStore('status', () => {
show: true,
loading: true,
},
+ /** 显示崩塌隐患点 */
+ showCollapseHiddenPoint: {
+ show: true,
+ loading: true,
+ },
/** 显示泥石流隐患点 */
showDebrisFlowHiddenPoint: {
show: true,
@@ -278,6 +283,10 @@ export const useStatusStore = defineStore('status', () => {
show: true,
loading: true,
};
+ poiLayers.showCollapseHiddenPoint = {
+ show: true,
+ loading: true,
+ };
poiLayers.showDebrisFlowHiddenPoint = {
show: true,
loading: true,
diff --git a/src/types/common/DisasterType.ts b/src/types/common/DisasterType.ts
index 3df9660..7cabce6 100644
--- a/src/types/common/DisasterType.ts
+++ b/src/types/common/DisasterType.ts
@@ -14,6 +14,8 @@ export enum DisasterType {
export enum PointType {
/** 滑坡 */
LANDSLIDE = '滑坡',
+ /** 崩塌 */
+ COLLAPSE = '崩塌',
/** 泥石流 */
DEBRIS_FLOW = '泥石流',
/** 内涝 */
@@ -29,6 +31,7 @@ export enum PointType {
*/
export const HiddenDangerPointTypeMap: Record = {
[PointType.LANDSLIDE]: 'landslide',
+ [PointType.COLLAPSE]: 'collapse',
[PointType.DEBRIS_FLOW]: 'debris_flow',
[PointType.WATER_LOGGING]: 'water_logging',
[PointType.FLASH_FLOOD]: 'flash_flood',
diff --git a/src/types/common/LoadingResourceType.ts b/src/types/common/LoadingResourceType.ts
index 2af50ce..a15878b 100644
--- a/src/types/common/LoadingResourceType.ts
+++ b/src/types/common/LoadingResourceType.ts
@@ -47,6 +47,11 @@ export enum LoadingResource {
*/
LANDSLIDE_HIDDEN_POINT = 'LANDSLIDE_HIDDEN_POINT',
+ /**
+ * 崩塌隐患点
+ */
+ COLLAPSE_HIDDEN_POINT = 'COLLAPSE_HIDDEN_POINT',
+
/**
* 泥石流隐患点
*/