规整代码,同时保留功能

This commit is contained in:
wzy-warehouse
2026-04-16 09:09:00 +08:00
parent 459940d425
commit b25cdc2aae
7 changed files with 93 additions and 87 deletions
+29 -2
View File
@@ -5,12 +5,20 @@ import { PointType } from '@/types/common/DisasterType';
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
import config from '@/config/config.json';
import { useStatusStore } from '@/stores/useStatusStore';
import {
debrisFlowIcon,
flashFloodIcon,
landslideIcon,
riskAreaIcon,
waterLoggingIcon,
} from '@/assets';
/**
* 暴雨灾害链影响点列表钩子函数
* @returns 搜索条件、表格数据、分页配置及相关方法
* 暴雨灾害链
* @returns
*/
export const useRainDisasterChain = () => {
// ================灾害链影响点列表================================
/**
* 搜索条件
*/
@@ -73,6 +81,19 @@ export const useRainDisasterChain = () => {
paginationConfig.value.currentPage = value;
};
// ================图例================================
/**
* 图例数据
*/
const legendList = [
{ name: '滑坡隐患点', link: landslideIcon },
{ name: '泥石流隐患点', link: debrisFlowIcon },
{ name: '山洪隐患点', link: flashFloodIcon },
{ name: '内涝隐患点', link: waterLoggingIcon },
{ name: '风险区域', link: riskAreaIcon },
];
// ================左侧按钮================================
/**
* 左侧按钮信息
*/
@@ -139,6 +160,7 @@ export const useRainDisasterChain = () => {
},
];
// ================右侧按钮================================
/**
* 右侧按钮信息
*/
@@ -185,6 +207,10 @@ export const useRainDisasterChain = () => {
},
];
// ================控制面板================================
/**
* 控制面板信息
*/
const controlPanel = [
{
name: '显示医院',
@@ -293,6 +319,7 @@ export const useRainDisasterChain = () => {
tableDatas,
tableColumns,
paginationConfig,
legendList,
leftButtonInfo,
rightButtonInfo,
controlPanel,
-26
View File
@@ -1,26 +0,0 @@
import {
debrisFlowIcon,
flashFloodIcon,
landslideIcon,
riskAreaIcon,
waterLoggingIcon,
} from '@/assets';
/**
* 暴雨图例钩子函数
* @returns 图例数据列表
*/
export const useRainLegend = () => {
/**
* 图例数据
*/
const legendList = [
{ name: '滑坡隐患点', link: landslideIcon },
{ name: '泥石流隐患点', link: debrisFlowIcon },
{ name: '山洪隐患点', link: flashFloodIcon },
{ name: '内涝隐患点', link: waterLoggingIcon },
{ name: '风险区域', link: riskAreaIcon },
];
return { legendList };
};