zy-react-library/src/components/SelectTree/Department/Gwj/index.d.ts

62 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import type { FC } from "react";
import type { BasicSelectTreeProps } from "../../Basic";
export interface DepartmentSelectTreeItem {
id: string;
name: string;
childrenList: DepartmentSelectTreeItem[];
[key: string]: any;
}
/**
* 企业类型枚举(用于 inType
*/
type InType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
/**
* 企业类型枚举(用于 enterpriseType
*/
type EnterpriseType = 1 | 2 | 3;
/**
* 请求参数
*/
export interface Params {
/** 企业id */
eqCorpinfoId?: string;
/** 父级部门id */
eqParentId?: string;
/** 企业类型 0-普通企业 1-集团单位 2-股份单位 3-相关方企业 4-货主单位 5-驻港单位 6-物资中心 */
inType?: InType[];
/** 企业类型 1-监管 2-企业 3-相关方 */
enterpriseType?: EnterpriseType | EnterpriseType[];
[key: string]: any;
}
/**
* 组件属性
*/
export interface DepartmentSelectTreeProps extends Omit<BasicSelectTreeProps, "treeData" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
/** 请求参数 */
params?: Params;
/** 占位符,默认"部门" */
placeholder?: string;
/** 是否需要企业id默认 false */
isNeedCorpInfoId?: boolean;
/** 是否需要父级部门id默认 false */
isNeedParentId?: boolean;
/** 查询的企业类型默认currentcurrent 接收 eqCorpinfoId 或者 eqParentIdall 不接受任何参数inType 接收 inType 或者 enterpriseType */
searchType?: "current" | "all" | "inType";
/** 获取父级节点 */
onGetNodePaths?: (nodes: DepartmentSelectTreeItem[]) => void;
/** 获取数据 */
onGetData?: (data: DepartmentSelectTreeItem[], processedData: DepartmentSelectTreeItem[]) => void;
}
/**
* 部门下拉树组件(港务局版本)
*/
declare const DepartmentSelectTree: FC<DepartmentSelectTreeProps>;
export default DepartmentSelectTree;