From 40960baac9334eacd756cd08d7a8061e03b02112 Mon Sep 17 00:00:00 2001
From: zhuangzhuang2000 <73012624+zhuangzhuang2000@users.noreply.github.com>
Date: Fri, 24 Apr 2026 20:41:41 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=A7=84=E5=88=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ControlShowDetailComponent.vue | 9 +++++
.../detail-panels/TrafficRoadComponent.vue | 38 +++++++++++++++++++
.../earthquake/useEarthquakeDisasterChain.ts | 4 +-
src/hooks/rain-earthquake/useLayerControl.ts | 8 ++++
src/hooks/rainstorm/useRainDisasterChain.ts | 4 +-
5 files changed, 57 insertions(+), 6 deletions(-)
create mode 100644 src/component/rain-earthquake/detail-panels/TrafficRoadComponent.vue
diff --git a/src/component/rain-earthquake/ControlShowDetailComponent.vue b/src/component/rain-earthquake/ControlShowDetailComponent.vue
index 1c55ed7..e77f142 100644
--- a/src/component/rain-earthquake/ControlShowDetailComponent.vue
+++ b/src/component/rain-earthquake/ControlShowDetailComponent.vue
@@ -62,6 +62,14 @@
useStatusStore().infrastructureLayers.showNetworkSystem.loading
"
/>
+
+
+
diff --git a/src/component/rain-earthquake/detail-panels/TrafficRoadComponent.vue b/src/component/rain-earthquake/detail-panels/TrafficRoadComponent.vue
new file mode 100644
index 0000000..01e6257
--- /dev/null
+++ b/src/component/rain-earthquake/detail-panels/TrafficRoadComponent.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
diff --git a/src/hooks/earthquake/useEarthquakeDisasterChain.ts b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
index 49a310f..eed2a83 100644
--- a/src/hooks/earthquake/useEarthquakeDisasterChain.ts
+++ b/src/hooks/earthquake/useEarthquakeDisasterChain.ts
@@ -235,9 +235,7 @@ export const useEarthquakeDisasterChain = () => {
name: '显示交通道路',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showTrafficRoad' as const,
- callback: (status: unknown) => {
- console.log('显示交通道路', status);
- },
+ callback: layerControl.clickTrafficRoad,
},
{
name: '显示桥梁',
diff --git a/src/hooks/rain-earthquake/useLayerControl.ts b/src/hooks/rain-earthquake/useLayerControl.ts
index a8a2fc7..f42c78c 100644
--- a/src/hooks/rain-earthquake/useLayerControl.ts
+++ b/src/hooks/rain-earthquake/useLayerControl.ts
@@ -76,6 +76,13 @@ export const useLayerControl = () => {
useStatusStore().infrastructureLayers.showNetworkSystem.loading = true;
};
+ /**
+ * 显示交通道路
+ */
+ const clickTrafficRoad = () => {
+ useStatusStore().infrastructureLayers.showTrafficRoad.loading = true;
+ };
+
return {
clickHiddenDangerPoint,
clickHospital,
@@ -86,5 +93,6 @@ export const useLayerControl = () => {
clickSchool,
clickPopulationGrid,
clickWaterPipe,
+ clickTrafficRoad
};
};
diff --git a/src/hooks/rainstorm/useRainDisasterChain.ts b/src/hooks/rainstorm/useRainDisasterChain.ts
index 4977d3b..77ec381 100644
--- a/src/hooks/rainstorm/useRainDisasterChain.ts
+++ b/src/hooks/rainstorm/useRainDisasterChain.ts
@@ -258,9 +258,7 @@ export const useRainDisasterChain = () => {
name: '显示交通道路',
statusStore: statusStore.infrastructureLayers,
statusKey: 'showTrafficRoad' as const,
- callback: (status: unknown) => {
- console.log('显示交通道路', status);
- },
+ callback: layerControl.clickTrafficRoad,
},
{
name: '显示桥梁',