添加文档注释,方便生成技术文档

This commit is contained in:
wzy-warehouse
2026-04-13 22:28:56 +08:00
parent 8ef7d36d26
commit 27fba7ce12
34 changed files with 520 additions and 160 deletions
@@ -5,7 +5,14 @@ import {
waterLoggingIcon,
} from '@/assets';
/**
* 隐患点相关钩子函数
* @returns 字段映射和获取灾害图标方法
*/
export const useHiddenPoint = () => {
/**
* 字段映射配置
*/
const field = {
fieldCode: '野外编号',
disasterName: '灾害点名称',
@@ -15,6 +22,11 @@ export const useHiddenPoint = () => {
riskGrade: '风险等级',
};
/**
* 根据灾害类型获取对应图标
* @param disasterType - 灾害类型
* @returns 图标路径
*/
function getDisasterIcon(disasterType?: string): string {
switch (disasterType) {
case '滑坡':
+14 -1
View File
@@ -1,9 +1,18 @@
import { riskAreaIcon } from '@/assets';
/**
* 风险点相关钩子函数
* @returns 信息框标题、字段映射和获取图标方法
*/
export const useRiskPoint = () => {
// 信息框标题
/**
* 信息框标题
*/
const informationBoxTitle = '风险区域';
/**
* 字段映射配置
*/
const field = {
riskName: '风险区名称',
unitCode: '统一编号',
@@ -18,6 +27,10 @@ export const useRiskPoint = () => {
lat: '纬度',
};
/**
* 获取风险点图标
* @returns 图标路径
*/
function getDisasterIcon(): string {
return riskAreaIcon;
}