import { RandomParam } from "./commonTypes"; import { Staff, Department } from "./typeSolo"; export interface ArrayInObjInterface { [index: string]: Department; } /** * 将obj数组转换成hash,规则: 以obj的某个唯一值作为hash的key, hash的value就是obj本身 * **/ export declare const flatArray2Obj: (arrayData: Department[], idParam: string) => ArrayInObjInterface; /** * 查找 advance / staff 所有祖先id * */ export declare const findAllAncestorId: (arrayInObj: ArrayInObjInterface, itemPid: number, rootId: number) => number[]; export declare const createTreeFrom1DimensionArray: (arrayData: Department[], idParam: string, parentParam: string) => any[]; export declare const toogleItemInArray: (arrayData: number[] | undefined, item: number) => number[]; /** * 生成员工信息 * */ export declare const gStaffData: (v: Staff) => { AvatarColor: any; DepartmentId: number | null; DepartmentName: string; TopDepartmentName: string; Id: string | number; Name: string; Email: string; Avatar: string; Department?: string | undefined; UserAvatar?: any; }; /** * async forEach * */ export declare const asyncForEach: (array: any[], callback: RandomParam) => Promise; /**高亮字符串**/ export declare const doHighLightStrReplace: (str?: string, highLightString?: string) => string; export declare const throttle: (func: RandomParam, timeDelay: number) => (context: object, ...args: any[]) => void; /** * 将defaultValue转换成组件需要的格式 * **/ export declare const transformDefaultValue: (defaultValue: any) => any; export declare const isIE: () => boolean; export declare const htmlDecode: (value: any) => any; export declare const isClassOrFunctionModule: (x: any) => boolean;