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: '显示桥梁',