重构组件结构,添加周边分析组件结构(但无具体实现)
This commit is contained in:
@@ -3,9 +3,9 @@ import type { XianHiddenDangerSpots } from '@/types/base/XianHiddenDangerSpots';
|
||||
import type { PaginationType } from '@/types/common/PaginationType';
|
||||
import { PointType } from '@/types/common/DisasterType';
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import { useLayerControl } from '../useLayerControl';
|
||||
import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
|
||||
import { debrisFlowIcon, landslideIcon, riskAreaIcon } from '@/assets';
|
||||
import { useRightHandle } from '../useRightHandle';
|
||||
import { useRightHandle } from '../rain-earthquake/useRightHandle.ts';
|
||||
|
||||
/**
|
||||
* 暴雨灾害链
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||
|
||||
/**
|
||||
* 控制面板显示隐藏逻辑
|
||||
@@ -0,0 +1,25 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
|
||||
export const useLeftHandle = () => {
|
||||
/**
|
||||
* 周边分析
|
||||
*/
|
||||
const clickAroundAnalysis = (status: unknown) => {
|
||||
// 如果选中,隐藏右侧按钮,取消选中则显示右侧按钮
|
||||
if (status as boolean) {
|
||||
useStatusStore().uiComponents.rightButton.show = false;
|
||||
|
||||
// 加载周边分析
|
||||
useStatusStore().functionStatus.aroundAnalysis.loading = true;
|
||||
useStatusStore().functionStatus.aroundAnalysis.show = true;
|
||||
} else {
|
||||
useStatusStore().uiComponents.rightButton.show = true;
|
||||
|
||||
// 隐藏周边分析
|
||||
useStatusStore().functionStatus.aroundAnalysis.show = false;
|
||||
}
|
||||
};
|
||||
return {
|
||||
clickAroundAnalysis,
|
||||
};
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useStatusStore } from '@/stores/useStatusStore';
|
||||
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
|
||||
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils.ts';
|
||||
import config from '@/config/config.json';
|
||||
import { useButtonSelectedIdStore } from '@/stores/useButtonSelectedIdStore';
|
||||
|
||||
export const useRightHandle = () => {
|
||||
/**
|
||||
@@ -9,6 +10,7 @@ export const useRightHandle = () => {
|
||||
const resetScene = () => {
|
||||
CesiumUtilsSingleton.clearAllResources('custom');
|
||||
useStatusStore().resetScene();
|
||||
useButtonSelectedIdStore().resetId();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -10,8 +10,9 @@ import {
|
||||
riskAreaIcon,
|
||||
waterLoggingIcon,
|
||||
} from '@/assets';
|
||||
import { useLayerControl } from '../useLayerControl';
|
||||
import { useRightHandle } from '../useRightHandle';
|
||||
import { useLayerControl } from '../rain-earthquake/useLayerControl.ts';
|
||||
import { useRightHandle } from '../rain-earthquake/useRightHandle.ts';
|
||||
import { useLeftHandle } from '../rain-earthquake/useLeftHandle.ts';
|
||||
|
||||
/**
|
||||
* 暴雨灾害链
|
||||
@@ -100,9 +101,7 @@ export const useRainDisasterChain = () => {
|
||||
const leftButtonInfo = [
|
||||
{
|
||||
name: '周边分析',
|
||||
callback: () => {
|
||||
console.log('周边分析');
|
||||
},
|
||||
callback: useLeftHandle().clickAroundAnalysis,
|
||||
},
|
||||
{
|
||||
name: '关联分析',
|
||||
|
||||
Reference in New Issue
Block a user