From 13a992a8bb6fcdfafc2754641910619d9b15abf0 Mon Sep 17 00:00:00 2001 From: wzy-warehouse <18135009705@163.com> Date: Tue, 16 Jun 2026 10:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B4=A9=E5=A1=8C=E9=9A=90?= =?UTF-8?q?=E6=82=A3=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/images/icon/collapse.png | Bin 0 -> 3135 bytes src/assets/index.ts | 1 + .../rain-earthquake/BasicComponent.vue | 17 +++ .../basic/CollapseComponent.vue | 128 ++++++++++++++++++ src/config/config.json | 1 + .../earthquake/useEarthquakeDisasterChain.ts | 13 ++ src/hooks/map/useMap.ts | 6 + src/hooks/rain-earthquake/useHiddenPoint.ts | 4 + src/hooks/rain-earthquake/useLayerControl.ts | 8 ++ src/hooks/rainstorm/useRainDisasterChain.ts | 13 ++ src/stores/useLoadingInformation.ts | 13 ++ src/stores/useStatusStore.ts | 9 ++ src/types/common/DisasterType.ts | 3 + src/types/common/LoadingResourceType.ts | 5 + 14 files changed, 221 insertions(+) create mode 100644 src/assets/images/icon/collapse.png create mode 100644 src/component/rain-earthquake/basic/CollapseComponent.vue diff --git a/src/assets/images/icon/collapse.png b/src/assets/images/icon/collapse.png new file mode 100644 index 0000000000000000000000000000000000000000..a2155ee20502b570d53a907d48dc1222b049e2b4 GIT binary patch literal 3135 zcmY*bdpHw%A7AA*%&iVe?%AYfwuLNWjHZ}Kx#qGBTWllOR;*ky;ZVvgcPi>k9G9cy zRk@`)j6|5*3W>QK_uIU4-k$Tm?;qda_wxDPexK+0JR003EIF%AN) zy(?lOf-{Lw)NTB-@jEE4^(;#u<2$Y}$#V5pDErJq24Ms(nX#Cw6C9rqH zFpbm3SBbtT2aMIv41s5&K?(^8M8RO;;o-XBNL|`hKN#G|$Oxu~fFTf2K?XGV8a2c_ z0!j_m{Mi8G6HK^D4h$jFsA{_nz45fr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Qt$pJQl_en%(T8hYT{4@k*?yyB- zSS270?>C6`bB`WdJn#S4$l+|AB69o-ML#Hp6I;z``!Xq_ZSsf6)M|pKDxRBojUFEV zZ6s6#3O?t1266j4QR;AFW9_iBY&u#9u7gA8Bt9rhUDh_uC#;MDJNUMDv$owbH(uJ! z#hC46|6PGC=rCu8p_eEfnU8$@}%1&7Sa}b|@XQ$T{HVVL4{T{IsXm z(dWk8v$`Rp0UFEf#e?T0F`LLDLi&t>TCQi#!^+WdnY2?rj+d0x2lc~Wy8y+FQr-tE zJ4!3)xrnwa=6sf_+M(ZBv|B3fmhdGT2OXa>l1{!64XXOEAzhQoGj|DX##ZpIZJ~*A zNNuoXu}X(2a@7~Uw;OAXxHzVeqL5%Gsg@e_TKbwx}xrBjJ> zOQDn|lJIb_2JBz@D)q?*!!pM})X~~+e-Axm^cJDBm^InT>NnRD

WyvNZ7aB4sZ(>Gq|YcVO7w|4$}WNvXcY{Q!#(l8ka3UJjR8h z&O@ynPVgo;hR3Pl>HJQqp!I*n{_2KPC+}gs7OhF4nyuZ@QpCMZ zCcRi^%h1CLUJR}(5v-guC4gb4NxarIlZNLb;-qUe$OuX&cH zwQ{7S1g$mJDgDKHw8%&dwz3A|bf@wQK97j9tEk+&Om9-TqEsn567$m2Si3)b(?9p=*t%E&`0M$rU%iqbx#4sQe(p>CP?Yq$TxvRuJDlI@ + + + + + + 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', + /** * 泥石流隐患点 */