From 56e53977a09b1713d9f462b34052b30268d99ee9 Mon Sep 17 00:00:00 2001 From: zxyroyy <1442470094@qq.com> Date: Tue, 23 Jun 2026 14:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E6=A1=A3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function-child/AroundAnalysis.vue | 25 +- .../AroundAnalysisDetailComponent.vue | 142 ----- .../PulsePointListComponent.vue | 595 ------------------ .../around-analysis/SearchComponent.vue | 146 +---- src/hooks/rain-earthquake/useAroundButton.ts | 86 ++- src/hooks/rain-earthquake/useAroundSearch.ts | 214 +------ src/types/common/useAroundAnalysisType.ts | 2 + 7 files changed, 96 insertions(+), 1114 deletions(-) delete mode 100644 src/component/rain-earthquake/function-child/around-analysis/AroundAnalysisDetailComponent.vue delete mode 100644 src/component/rain-earthquake/function-child/around-analysis/PulsePointListComponent.vue diff --git a/src/component/rain-earthquake/function-child/AroundAnalysis.vue b/src/component/rain-earthquake/function-child/AroundAnalysis.vue index 00bca4c..2ae50a0 100644 --- a/src/component/rain-earthquake/function-child/AroundAnalysis.vue +++ b/src/component/rain-earthquake/function-child/AroundAnalysis.vue @@ -11,19 +11,16 @@ - - - - -
+ +
选择区域
半径:
@@ -44,23 +41,19 @@ import { provide } from 'vue';//从Vue导入provide函数,用于依赖注入 import { useStatusStore } from '@/stores/useStatusStore'; import { useAroundButton } from '@/hooks/rain-earthquake/useAroundButton.ts'; import { useAroundSearch } from '@/hooks/rain-earthquake/useAroundSearch.ts'; -import AroundAnalysisDetailComponent from './around-analysis/AroundAnalysisDetailComponent.vue'; import ButtonComponent from './around-analysis/ButtonComponent.vue'; import SearchComponent from './around-analysis/SearchComponent.vue'; -import PulsePointListComponent from './around-analysis/PulsePointListComponent.vue'; const statusStore = useStatusStore(); -// 在父组件中创建唯一的 Hook 实例,包含所有周边分析相关的状态和方法 +// 在父组件中创建唯一的 Hook 实例 const analysisButtonState = useAroundButton(); +const searchState = useAroundSearch(); -// 搜索触发的区域分析 Hook(在父组件中创建,确保 watch 不会被销毁) -const searchAreaState = useAroundSearch(); - -// 通过 provide 共享给所有子组件(让 TypeScript 自动推断类型) +// 通过 provide 共享给所有子组件 provide('analysisButtonState', analysisButtonState); -provide('searchAreaState', searchAreaState); +provide('searchState', searchState); diff --git a/src/component/rain-earthquake/function-child/around-analysis/PulsePointListComponent.vue b/src/component/rain-earthquake/function-child/around-analysis/PulsePointListComponent.vue deleted file mode 100644 index 63d6f24..0000000 --- a/src/component/rain-earthquake/function-child/around-analysis/PulsePointListComponent.vue +++ /dev/null @@ -1,595 +0,0 @@ - - - - - diff --git a/src/component/rain-earthquake/function-child/around-analysis/SearchComponent.vue b/src/component/rain-earthquake/function-child/around-analysis/SearchComponent.vue index b7098ab..c165922 100644 --- a/src/component/rain-earthquake/function-child/around-analysis/SearchComponent.vue +++ b/src/component/rain-earthquake/function-child/around-analysis/SearchComponent.vue @@ -22,50 +22,36 @@
- - -
-
选择区域
-
-
- 半径: - - 公里 -
-
- -