2025-11-03 16:50:34 +08:00
|
|
|
|
import type { FC } from "react";
|
|
|
|
|
|
import type { BasicSelectTreeProps } from "../../Basic";
|
|
|
|
|
|
|
2026-05-08 09:55:46 +08:00
|
|
|
|
export interface DepartmentSelectTreeItem {
|
2026-04-21 15:59:53 +08:00
|
|
|
|
id: string;
|
|
|
|
|
|
name: string;
|
2026-05-08 09:55:46 +08:00
|
|
|
|
childrenList: DepartmentSelectTreeItem[];
|
2026-04-21 15:59:53 +08:00
|
|
|
|
[key: string]: any;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-05 10:32:51 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 企业类型枚举(用于 inType)
|
|
|
|
|
|
*/
|
|
|
|
|
|
type InType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 企业类型枚举(用于 enterpriseType)
|
|
|
|
|
|
*/
|
|
|
|
|
|
type EnterpriseType = 1 | 2 | 3;
|
|
|
|
|
|
|
2026-01-07 15:35:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 请求参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface Params {
|
|
|
|
|
|
/** 企业id */
|
|
|
|
|
|
eqCorpinfoId?: string;
|
|
|
|
|
|
/** 父级部门id */
|
|
|
|
|
|
eqParentId?: string;
|
2026-02-05 10:32:51 +08:00
|
|
|
|
/** 企业类型 0-普通企业 1-集团单位 2-股份单位 3-相关方企业 4-货主单位 5-驻港单位 6-物资中心 */
|
|
|
|
|
|
inType?: InType[];
|
|
|
|
|
|
/** 企业类型 1-监管 2-企业 3-相关方 */
|
|
|
|
|
|
enterpriseType?: EnterpriseType | EnterpriseType[];
|
2026-06-23 16:33:33 +08:00
|
|
|
|
[key: string]: any;
|
2026-01-07 15:35:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-03 16:50:34 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 组件属性
|
|
|
|
|
|
*/
|
2026-04-21 15:59:53 +08:00
|
|
|
|
export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
|
2025-11-03 16:50:34 +08:00
|
|
|
|
/** 请求参数 */
|
2025-11-04 08:39:32 +08:00
|
|
|
|
params?: Params;
|
2025-11-06 14:31:25 +08:00
|
|
|
|
/** 占位符,默认"部门" */
|
2025-11-06 09:38:23 +08:00
|
|
|
|
placeholder?: string;
|
|
|
|
|
|
/** 是否需要企业id,默认 false */
|
|
|
|
|
|
isNeedCorpInfoId?: boolean;
|
|
|
|
|
|
/** 是否需要父级部门id,默认 false */
|
|
|
|
|
|
isNeedParentId?: boolean;
|
2026-01-13 08:46:29 +08:00
|
|
|
|
/** 查询的企业类型,默认current,current 接收 eqCorpinfoId 或者 eqParentId,all 不接受任何参数,inType 接收 inType 或者 enterpriseType */
|
|
|
|
|
|
searchType?: "current" | "all" | "inType";
|
2026-04-21 15:59:53 +08:00
|
|
|
|
/** 获取父级节点 */
|
2026-05-08 09:55:46 +08:00
|
|
|
|
onGetNodePaths?: (nodes: DepartmentSelectTreeItem[]) => void;
|
2026-04-21 15:59:53 +08:00
|
|
|
|
/** 获取数据 */
|
2026-05-08 09:55:46 +08:00
|
|
|
|
onGetData?: (data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void;
|
2025-11-03 16:50:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-06 14:31:25 +08:00
|
|
|
|
* 部门下拉树组件(港务局版本)
|
2025-11-03 16:50:34 +08:00
|
|
|
|
*/
|
|
|
|
|
|
declare const DepartmentSelectTree: FC<DepartmentSelectTreeProps>;
|
|
|
|
|
|
|
|
|
|
|
|
export default DepartmentSelectTree;
|