From 8e365e980e070eefecb721b658dd20717ebf03ef Mon Sep 17 00:00:00 2001
From: wzy-warehouse <18135009705@163.com>
Date: Mon, 4 May 2026 21:46:36 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A7=E5=88=B6=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E9=9D=A2=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../rain-earthquake/ControlShowComponent.vue | 140 +++++++++++++--
.../rain-earthquake/LegendComponent.vue | 163 ------------------
.../rain-earthquake/RightButtonComponent.vue | 2 +-
.../earthquake/useEarthquakeDisasterChain.ts | 64 ++++---
src/hooks/rain-earthquake/useLayerControl.ts | 8 +
src/hooks/rainstorm/useRainDisasterChain.ts | 60 ++++---
src/stores/useStatusStore.ts | 9 -
src/views/home/earthquake/EarthquakeView.vue | 12 --
src/views/home/rainstorm/RainstormView.vue | 12 --
9 files changed, 208 insertions(+), 262 deletions(-)
delete mode 100644 src/component/rain-earthquake/LegendComponent.vue
diff --git a/src/component/rain-earthquake/ControlShowComponent.vue b/src/component/rain-earthquake/ControlShowComponent.vue
index 7c60536..349feeb 100644
--- a/src/component/rain-earthquake/ControlShowComponent.vue
+++ b/src/component/rain-earthquake/ControlShowComponent.vue
@@ -4,18 +4,49 @@
v-show="useStatusStore().uiComponents.controlPanel.show"
>
-
+
-
-
+
+
+
+
{{ category.title }}
+
+
+
+
+
+
+
![]()
+
+
+
+
+
{{ item.name }}
+
@@ -24,16 +55,41 @@
-
-
diff --git a/src/component/rain-earthquake/RightButtonComponent.vue b/src/component/rain-earthquake/RightButtonComponent.vue
index 9d145a8..886a6c5 100644
--- a/src/component/rain-earthquake/RightButtonComponent.vue
+++ b/src/component/rain-earthquake/RightButtonComponent.vue
@@ -79,7 +79,7 @@
width: 180px;
position: absolute;
top: 45px;
- right: 200px;
+ right: 40px;
z-index: 1000;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
diff --git a/src/hooks/earthquake/useEarthquakeDisasterChain.ts b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
index 2360779..e83f994 100644
--- a/src/hooks/earthquake/useEarthquakeDisasterChain.ts
+++ b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
@@ -88,30 +88,6 @@ export const useEarthquakeDisasterChain = () => {
paginationConfig.value.currentPage = value;
};
- // ================图例================================
- /**
- * 图例数据
- */
- const legendList = [
- // 隐患点
- { name: '滑坡隐患点', link: landslideIcon },
- { name: '泥石流隐患点', link: debrisFlowIcon },
- { name: '风险区域', link: riskAreaIcon },
- // 断裂带
- { name: '断裂带', link: earthquakeLineIcon },
- // 承灾体
- { name: '医院', link: hospitalIcon },
- { name: '危险源', link: dangerousSourceIcon },
- { name: '避难所', link: emergencyShelterIcon },
- { name: '消防站', link: firefighterIcon },
- { name: '储备点', link: storePointsIcon },
- { name: '学校', link: schoolIcon },
- { name: '地铁站', link: subwayIcon },
- // 基础设施
- { name: '桥梁', link: bridgeIcon },
- { name: '水库', link: reservoirIcon },
- ];
-
// ================左侧按钮================================
/**
* 左侧按钮信息
@@ -205,107 +181,146 @@ export const useEarthquakeDisasterChain = () => {
const layerControl = useLayerControl();
return [
+ // 灾害隐患点类别
{
name: '显示滑坡隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showLandslideHiddenPoint' as const,
callback: layerControl.clickLandslideHiddenPoint,
+ link: landslideIcon,
+ category: '灾害隐患点',
},
{
name: '显示泥石流隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showDebrisFlowHiddenPoint' as const,
callback: layerControl.clickDebrisFlowHiddenPoint,
+ link: debrisFlowIcon,
+ category: '灾害隐患点',
},
{
name: '显示风险点',
statusStore: statusStore.mapLayers,
statusKey: 'riskPointShow' as const,
callback: layerControl.clickRiskPoint,
+ link: riskAreaIcon,
+ category: '灾害隐患点',
},
+ {
+ name: '显示断裂带',
+ statusStore: statusStore.mapLayers,
+ statusKey: 'faultShow' as const,
+ callback: layerControl.clickFault,
+ link: earthquakeLineIcon,
+ category: '灾害隐患点',
+ },
+ // 基础设施类别
{
name: '显示医院',
statusStore: statusStore.poiLayers,
statusKey: 'showHospital' as const,
callback: layerControl.clickHospital,
+ link: hospitalIcon,
+ category: '基础设施',
},
{
name: '显示危险源',
statusStore: statusStore.poiLayers,
statusKey: 'showDangerSource' as const,
callback: layerControl.clickDangerousSource,
+ link: dangerousSourceIcon,
+ category: '基础设施',
},
{
name: '显示避难所',
statusStore: statusStore.poiLayers,
statusKey: 'showRefugeeShelter' as const,
callback: layerControl.clickEmergencyShelter,
+ link: emergencyShelterIcon,
+ category: '基础设施',
},
{
name: '显示消防站',
statusStore: statusStore.poiLayers,
statusKey: 'showFireStation' as const,
callback: layerControl.clickFireStation,
+ link: firefighterIcon,
+ category: '基础设施',
},
{
name: '显示储备点',
statusStore: statusStore.poiLayers,
statusKey: 'showReservePoint' as const,
callback: layerControl.clickStorePoints,
+ link: storePointsIcon,
+ category: '基础设施',
},
{
name: '显示学校',
statusStore: statusStore.poiLayers,
statusKey: 'showSchool' as const,
callback: layerControl.clickSchool,
+ link: schoolIcon,
+ category: '基础设施',
},
{
name: '显示人口网格',
statusStore: statusStore.poiLayers,
statusKey: 'showPopulationGrid' as const,
callback: layerControl.clickPopulationGrid,
+ category: '基础设施',
},
{
name: '显示管网系统',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showNetworkSystem' as const,
callback: layerControl.clickWaterPipe,
+ category: '基础设施',
},
{
name: '显示交通道路',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showTrafficRoad' as const,
callback: layerControl.clickTrafficRoad,
+ category: '基础设施',
},
{
name: '显示桥梁',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showBridge' as const,
callback: layerControl.clickBridge,
+ link: bridgeIcon,
+ category: '基础设施',
},
{
name: '显示高速',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showHighway' as const,
callback: layerControl.clickHighway,
+ category: '基础设施',
},
{
name: '显示国道',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showMainRoad' as const,
callback: layerControl.clickNationRoad,
+ category: '基础设施',
},
{
name: '显示水库',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showReservoir' as const,
callback: layerControl.clickReservoir,
+ link: reservoirIcon,
+ category: '基础设施',
},
{
name: '显示地铁站',
statusStore: statusStore.poiLayers,
statusKey: 'showSubwayStation' as const,
callback: layerControl.clickSubwayStation,
+ link: subwayIcon,
+ category: '基础设施',
},
];
};
@@ -316,7 +331,6 @@ export const useEarthquakeDisasterChain = () => {
tableDatas,
tableColumns,
paginationConfig,
- legendList,
leftButtonInfo,
rightButtonInfo,
controlPanel: getControlPanel(),
diff --git a/src/hooks/rain-earthquake/useLayerControl.ts b/src/hooks/rain-earthquake/useLayerControl.ts
index 183369e..5ead64a 100644
--- a/src/hooks/rain-earthquake/useLayerControl.ts
+++ b/src/hooks/rain-earthquake/useLayerControl.ts
@@ -142,8 +142,16 @@ export const useLayerControl = () => {
useStatusStore().mapLayers.riskPointShow.loading = true;
};
+ /**
+ * 显示断裂带
+ */
+ const clickFault = () => {
+ useStatusStore().mapLayers.faultShow.loading = true;
+ };
+
return {
clickRiskPoint,
+ clickFault,
clickHospital,
clickDangerousSource,
clickEmergencyShelter,
diff --git a/src/hooks/rainstorm/useRainDisasterChain.ts b/src/hooks/rainstorm/useRainDisasterChain.ts
index b6cc479..efd617f 100644
--- a/src/hooks/rainstorm/useRainDisasterChain.ts
+++ b/src/hooks/rainstorm/useRainDisasterChain.ts
@@ -91,30 +91,6 @@ export const useRainDisasterChain = () => {
paginationConfig.value.currentPage = value;
};
- // ================图例================================
- /**
- * 图例数据
- */
- const legendList = [
- // 隐患点
- { name: '滑坡隐患点', link: landslideIcon },
- { name: '泥石流隐患点', link: debrisFlowIcon },
- { name: '山洪隐患点', link: flashFloodIcon },
- { name: '内涝隐患点', link: waterLoggingIcon },
- { name: '风险区域', link: riskAreaIcon },
- // 承灾体
- { name: '医院', link: hospitalIcon },
- { name: '危险源', link: dangerousSourceIcon },
- { name: '避难所', link: emergencyShelterIcon },
- { name: '消防站', link: firefighterIcon },
- { name: '储备点', link: storePointsIcon },
- { name: '学校', link: schoolIcon },
- { name: '地铁站', link: subwayIcon },
- // 基础设施
- { name: '桥梁', link: bridgeIcon },
- { name: '水库', link: reservoirIcon },
- ];
-
// ================左侧按钮================================
/**
* 左侧按钮信息
@@ -234,119 +210,154 @@ export const useRainDisasterChain = () => {
const layerControl = useLayerControl();
return [
+ // 灾害隐患点类别
{
name: '显示滑坡隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showLandslideHiddenPoint' as const,
callback: layerControl.clickLandslideHiddenPoint,
+ link: landslideIcon,
+ category: '灾害隐患点',
},
{
name: '显示泥石流隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showDebrisFlowHiddenPoint' as const,
callback: layerControl.clickDebrisFlowHiddenPoint,
+ link: debrisFlowIcon,
+ category: '灾害隐患点',
},
{
name: '显示内涝隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showWaterLoggingHiddenPoint' as const,
callback: layerControl.clickWaterLoggingHiddenPoint,
+ link: waterLoggingIcon,
+ category: '灾害隐患点',
},
{
name: '显示山洪隐患点',
statusStore: statusStore.poiLayers,
statusKey: 'showFlashFloodHiddenPoint' as const,
callback: layerControl.clickFlashFloodHiddenPoint,
+ link: flashFloodIcon,
+ category: '灾害隐患点',
},
{
name: '显示风险点',
statusStore: statusStore.mapLayers,
statusKey: 'riskPointShow' as const,
callback: layerControl.clickRiskPoint,
+ link: riskAreaIcon,
+ category: '灾害隐患点',
},
+ // 基础设施类别
{
name: '显示医院',
statusStore: statusStore.poiLayers,
statusKey: 'showHospital' as const,
callback: layerControl.clickHospital,
+ link: hospitalIcon,
+ category: '基础设施',
},
{
name: '显示危险源',
statusStore: statusStore.poiLayers,
statusKey: 'showDangerSource' as const,
callback: layerControl.clickDangerousSource,
+ link: dangerousSourceIcon,
+ category: '基础设施',
},
{
name: '显示避难所',
statusStore: statusStore.poiLayers,
statusKey: 'showRefugeeShelter' as const,
callback: layerControl.clickEmergencyShelter,
+ link: emergencyShelterIcon,
+ category: '基础设施',
},
{
name: '显示消防站',
statusStore: statusStore.poiLayers,
statusKey: 'showFireStation' as const,
callback: layerControl.clickFireStation,
+ link: firefighterIcon,
+ category: '基础设施',
},
{
name: '显示储备点',
statusStore: statusStore.poiLayers,
statusKey: 'showReservePoint' as const,
callback: layerControl.clickStorePoints,
+ link: storePointsIcon,
+ category: '基础设施',
},
{
name: '显示学校',
statusStore: statusStore.poiLayers,
statusKey: 'showSchool' as const,
callback: layerControl.clickSchool,
+ link: schoolIcon,
+ category: '基础设施',
},
{
name: '显示人口网格',
statusStore: statusStore.poiLayers,
statusKey: 'showPopulationGrid' as const,
callback: layerControl.clickPopulationGrid,
+ category: '基础设施',
},
{
name: '显示管网系统',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showNetworkSystem' as const,
callback: layerControl.clickWaterPipe,
+ category: '基础设施',
},
{
name: '显示交通道路',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showTrafficRoad' as const,
callback: layerControl.clickTrafficRoad,
+ category: '基础设施',
},
{
name: '显示桥梁',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showBridge' as const,
callback: layerControl.clickBridge,
+ link: bridgeIcon,
+ category: '基础设施',
},
{
name: '显示高速',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showHighway' as const,
callback: layerControl.clickHighway,
+ category: '基础设施',
},
{
name: '显示国道',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showMainRoad' as const,
callback: layerControl.clickNationRoad,
+ category: '基础设施',
},
{
name: '显示水库',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showReservoir' as const,
callback: layerControl.clickReservoir,
+ link: reservoirIcon,
+ category: '基础设施',
},
{
name: '显示地铁站',
statusStore: statusStore.poiLayers,
statusKey: 'showSubwayStation' as const,
callback: layerControl.clickSubwayStation,
+ link: subwayIcon,
+ category: '基础设施',
},
];
};
@@ -366,7 +377,6 @@ export const useRainDisasterChain = () => {
tableDatas,
tableColumns,
paginationConfig,
- legendList,
leftButtonInfo,
rightButtonInfo,
changeConditions,
diff --git a/src/stores/useStatusStore.ts b/src/stores/useStatusStore.ts
index 84cbe51..d7250cf 100644
--- a/src/stores/useStatusStore.ts
+++ b/src/stores/useStatusStore.ts
@@ -19,11 +19,6 @@ export const useStatusStore = defineStore('status', () => {
* UI 组件显示状态集合
*/
const uiComponents = reactive({
- /** 图例显示状态 */
- legendShow: {
- show: true,
- loading: true,
- },
/** 灾情链影响点表格显示状态 */
disasterChainPointShow: {
show: false,
@@ -196,10 +191,6 @@ export const useStatusStore = defineStore('status', () => {
*/
const resetScene = () => {
// UI 组件显示状态重置
- uiComponents.legendShow = {
- show: true,
- loading: true,
- };
uiComponents.disasterChainPointShow = {
show: false,
loading: true,
diff --git a/src/views/home/earthquake/EarthquakeView.vue b/src/views/home/earthquake/EarthquakeView.vue
index 7ed8bd9..53f0504 100644
--- a/src/views/home/earthquake/EarthquakeView.vue
+++ b/src/views/home/earthquake/EarthquakeView.vue
@@ -28,16 +28,6 @@
@change-current-page="changeCurrentPage"
/>
-
-
-
-
-
-