From 981a4cda5c445e59108d6906f00f8ff27dbaaf84 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 21 Apr 2026 15:59:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=83=A8=E5=88=86=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E5=A2=9E=E5=8A=A0=E6=98=8E=E7=A1=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 3 ++- src/components/Cascader/Area/index.d.ts | 13 ++++++++++-- src/components/Cascader/Dictionary/index.d.ts | 13 +++++++++++- src/components/Cascader/Industry/index.d.ts | 13 ++++++++++-- src/components/LeftTree/Area/index.d.ts | 14 +++++++++++-- .../LeftTree/Department/Gwj/index.d.ts | 13 +++++++++++- src/components/LeftTree/Dictionary/index.d.ts | 13 +++++++++++- src/components/Select/Dictionary/index.d.ts | 12 ++++++++++- .../Select/Personnel/Gwj/index.d.ts | 20 ++++++++++++++++++- src/components/SelectTree/Area/index.d.ts | 13 ++++++++++-- .../SelectTree/Department/Gwj/index.d.ts | 13 +++++++++++- .../SelectTree/Dictionary/index.d.ts | 13 +++++++++++- .../SelectTree/HiddenLevel/Gwj/index.d.ts | 13 +++++++++++- .../SelectTree/HiddenPart/Gwj/index.d.ts | 13 +++++++++++- src/components/SelectTree/Industry/index.d.ts | 13 ++++++++++-- src/hooks/useGetUserInfo/index.d.ts | 16 ++++++++++++++- 16 files changed, 187 insertions(+), 21 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8fa5c6e..f5c3976 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -10,7 +10,8 @@ "Bash(git check-ignore:*)", "Bash(git checkout:*)", "Bash(find:*)", - "Bash(mkdir:*)" + "Bash(mkdir:*)", + "mcp__ide__getDiagnostics" ], "deny": [], "ask": [] diff --git a/src/components/Cascader/Area/index.d.ts b/src/components/Cascader/Area/index.d.ts index 58d580f..5b962f0 100644 --- a/src/components/Cascader/Area/index.d.ts +++ b/src/components/Cascader/Area/index.d.ts @@ -1,11 +1,20 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; +interface Data { + value: string; + label: string; + children: Data[]; +} + /** * 组件属性 */ -export interface AreaCascaderProps extends Omit { - +export interface AreaCascaderProps extends Omit { + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/Cascader/Dictionary/index.d.ts b/src/components/Cascader/Dictionary/index.d.ts index 9cee00d..1abe2f2 100644 --- a/src/components/Cascader/Dictionary/index.d.ts +++ b/src/components/Cascader/Dictionary/index.d.ts @@ -1,10 +1,17 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; +interface Data { + dictValue: string; + dictLabel: string; + children: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface DictionaryCascaderProps extends Omit { +export interface DictionaryCascaderProps extends Omit { /** appKey,默认 DICTIONARY_APP_KEY_ENUM.DEFAULT(0bb989ecada5470c87635018ece9f327) */ appKey?: string; /** 要获取的字典 */ @@ -13,6 +20,10 @@ export interface DictionaryCascaderProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/Cascader/Industry/index.d.ts b/src/components/Cascader/Industry/index.d.ts index 3d13a63..570a167 100644 --- a/src/components/Cascader/Industry/index.d.ts +++ b/src/components/Cascader/Industry/index.d.ts @@ -1,11 +1,20 @@ import type { FC } from "react"; import type { BasicCascaderProps } from "../Basic"; +interface Data { + dict_value: string; + dict_label: string; + childrenList: Data[]; +} + /** * 组件属性 */ -export interface IndustryCascaderProps extends Omit { - +export interface IndustryCascaderProps extends Omit { + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/LeftTree/Area/index.d.ts b/src/components/LeftTree/Area/index.d.ts index f45a93e..4795cb4 100644 --- a/src/components/LeftTree/Area/index.d.ts +++ b/src/components/LeftTree/Area/index.d.ts @@ -1,11 +1,21 @@ import type { FC } from "react"; import type { BasicLeftTreeProps } from "../Basic"; +interface Data { + value: string; + label: string; + children: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface AreaLeftTreeProps extends Omit { - +export interface AreaLeftTreeProps extends Omit { + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/LeftTree/Department/Gwj/index.d.ts b/src/components/LeftTree/Department/Gwj/index.d.ts index 73b2375..19a16de 100644 --- a/src/components/LeftTree/Department/Gwj/index.d.ts +++ b/src/components/LeftTree/Department/Gwj/index.d.ts @@ -2,14 +2,25 @@ import type { FC } from "react"; import type { DepartmentSelectTreeProps } from "../../../SelectTree/Department/Gwj"; import type { BasicLeftTreeProps } from "../../Basic"; +interface Data { + id: string; + name: string; + childrenList: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface DepartmentLeftTreeProps extends Omit { +export interface DepartmentLeftTreeProps extends Omit { /** 请求参数 */ params?: DepartmentSelectTreeProps["params"]; /** 查询的企业类型 */ searchType?: DepartmentSelectTreeProps["searchType"]; + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/LeftTree/Dictionary/index.d.ts b/src/components/LeftTree/Dictionary/index.d.ts index f5388b4..70bd978 100644 --- a/src/components/LeftTree/Dictionary/index.d.ts +++ b/src/components/LeftTree/Dictionary/index.d.ts @@ -1,10 +1,17 @@ import type { FC } from "react"; import type { BasicLeftTreeProps } from "../Basic"; +interface Data { + dictValue: string; + dictLabel: string; + children: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface DictionaryLeftTreeProps extends Omit { +export interface DictionaryLeftTreeProps extends Omit { /** appKey,默认 DICTIONARY_APP_KEY_ENUM.DEFAULT(0bb989ecada5470c87635018ece9f327) */ appKey?: string; /** 要获取的字典 */ @@ -13,6 +20,10 @@ export interface DictionaryLeftTreeProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/Select/Dictionary/index.d.ts b/src/components/Select/Dictionary/index.d.ts index 501ff2c..0b30d1b 100644 --- a/src/components/Select/Dictionary/index.d.ts +++ b/src/components/Select/Dictionary/index.d.ts @@ -1,10 +1,16 @@ import type { FC } from "react"; import type { BasicSelectProps } from "../Basic"; +interface Data { + dictValue: string; + dictLabel: string; + [key: string]: any; +} + /** * 组件属性 */ -export interface DictionarySelectProps extends Omit { +export interface DictionarySelectProps extends Omit { /** appKey,默认 DICTIONARY_APP_KEY_ENUM.DEFAULT(0bb989ecada5470c87635018ece9f327) */ appKey?: string; /** 要获取的字典 */ @@ -13,6 +19,10 @@ export interface DictionarySelectProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[]) => void; } /** diff --git a/src/components/Select/Personnel/Gwj/index.d.ts b/src/components/Select/Personnel/Gwj/index.d.ts index e8c5fb8..bbc5667 100644 --- a/src/components/Select/Personnel/Gwj/index.d.ts +++ b/src/components/Select/Personnel/Gwj/index.d.ts @@ -1,6 +1,20 @@ import type { FC } from "react"; import type { BasicSelectProps } from "../../Basic"; +interface Data { + id: string; + name: string; + corpinfoId: string; + corpinfoName: string; + departmentId: string; + departmentName: string; + postId: string; + postName: string; + userId: string; + username: string; + [key: string]: any; +} + /** * 请求参数 */ @@ -31,7 +45,7 @@ export interface ExtraParams { /** * 组件属性 */ -export interface PersonnelSelectProps extends Omit { +export interface PersonnelSelectProps extends Omit { /** 请求参数 */ params?: Params; /** 占位符,默认"人员" */ @@ -44,6 +58,10 @@ export interface PersonnelSelectProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[]) => void; } /** diff --git a/src/components/SelectTree/Area/index.d.ts b/src/components/SelectTree/Area/index.d.ts index 464968d..b4e60d4 100644 --- a/src/components/SelectTree/Area/index.d.ts +++ b/src/components/SelectTree/Area/index.d.ts @@ -1,11 +1,20 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; +interface Data { + value: string; + label: string; + children: Data[]; +} + /** * 组件属性 */ -export interface AreaSelectTreeProps extends Omit { - +export interface AreaSelectTreeProps extends Omit { + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/SelectTree/Department/Gwj/index.d.ts b/src/components/SelectTree/Department/Gwj/index.d.ts index 24c4e4a..8f4706b 100644 --- a/src/components/SelectTree/Department/Gwj/index.d.ts +++ b/src/components/SelectTree/Department/Gwj/index.d.ts @@ -1,6 +1,13 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; +interface Data { + id: string; + name: string; + childrenList: Data[]; + [key: string]: any; +} + /** * 企业类型枚举(用于 inType) */ @@ -28,7 +35,7 @@ export interface Params { /** * 组件属性 */ -export interface DepartmentSelectTreeProps extends Omit { +export interface DepartmentSelectTreeProps extends Omit { /** 请求参数 */ params?: Params; /** 占位符,默认"部门" */ @@ -39,6 +46,10 @@ export interface DepartmentSelectTreeProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/SelectTree/Dictionary/index.d.ts b/src/components/SelectTree/Dictionary/index.d.ts index 592742c..65eaffa 100644 --- a/src/components/SelectTree/Dictionary/index.d.ts +++ b/src/components/SelectTree/Dictionary/index.d.ts @@ -1,10 +1,17 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; +interface Data { + dictValue: string; + dictLabel: string; + children: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface DictionarySelectTreeProps extends Omit { +export interface DictionarySelectTreeProps extends Omit { /** appKey,默认 DICTIONARY_APP_KEY_ENUM.DEFAULT(0bb989ecada5470c87635018ece9f327) */ appKey?: string; /** 要获取的字典 */ @@ -13,6 +20,10 @@ export interface DictionarySelectTreeProps extends Omit void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts b/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts index 893abff..7bec891 100644 --- a/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts +++ b/src/components/SelectTree/HiddenLevel/Gwj/index.d.ts @@ -1,16 +1,27 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; +interface Data { + dictValue: string; + dictLabel: string; + children: Data[]; + [key: string]: any; +} + /** * 组件属性 */ -export interface HiddenLevelSelectTreeProps extends Omit { +export interface HiddenLevelSelectTreeProps extends Omit { /** 是否显示忽略隐患,默认 true */ isShowNeglect?: boolean; /** 是否显示较大隐患,默认 true */ isShowLarger?: boolean; /** 是否显示重大隐患,默认 true */ isShowMajor?: boolean; + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/SelectTree/HiddenPart/Gwj/index.d.ts b/src/components/SelectTree/HiddenPart/Gwj/index.d.ts index e83519f..a73e49f 100644 --- a/src/components/SelectTree/HiddenPart/Gwj/index.d.ts +++ b/src/components/SelectTree/HiddenPart/Gwj/index.d.ts @@ -1,6 +1,13 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../../Basic"; +interface Data { + hiddenregionId: string; + hiddenregion: string; + children: Data[]; + [key: string]: any; +} + /** * 请求参数 */ @@ -12,11 +19,15 @@ export interface Params { /** * 组件属性 */ -export interface HiddenPartSelectTreeProps extends Omit { +export interface HiddenPartSelectTreeProps extends Omit { /** 请求参数 */ params?: Params; /** 是否需要企业id,默认 false */ isNeedCorpInfoId?: boolean; + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/components/SelectTree/Industry/index.d.ts b/src/components/SelectTree/Industry/index.d.ts index cc86238..33241de 100644 --- a/src/components/SelectTree/Industry/index.d.ts +++ b/src/components/SelectTree/Industry/index.d.ts @@ -1,11 +1,20 @@ import type { FC } from "react"; import type { BasicSelectTreeProps } from "../Basic"; +interface Data { + dict_value: string; + dict_label: string; + childrenList: Data[]; +} + /** * 组件属性 */ -export interface IndustrySelectTreeProps extends Omit { - +export interface IndustrySelectTreeProps extends Omit { + /** 获取父级节点 */ + onGetNodePaths?: (nodes: Data[]) => void; + /** 获取数据 */ + onGetData?: (data: Data[], processedData: Data[]) => void; } /** diff --git a/src/hooks/useGetUserInfo/index.d.ts b/src/hooks/useGetUserInfo/index.d.ts index 24dc944..7aae5d8 100644 --- a/src/hooks/useGetUserInfo/index.d.ts +++ b/src/hooks/useGetUserInfo/index.d.ts @@ -1,4 +1,18 @@ -export type getUserInfoFunction = () => Promise>; +interface Data { + corpinfoId: string; + corpinfoName: string; + departmentId: string; + departmentName: string; + id: string; + name: string; + postId: string; + postName: string; + userId: string; + username: string; + [key: string]: any; +} + +export type getUserInfoFunction = () => Promise; /** * 获取用户信息