import { Observable } from 'rxjs'; import { Entity, FrameContext } from '@farris/devkit'; import { BefRepository } from '@farris/bef'; /** * 父子树仓库 */ declare class ParentTreeRepository { /** * 添加兄弟节点 */ addSibling(repository: BefRepository, id: string): Observable; /** * 添加兄弟节点 */ addChild(repository: BefRepository, parentId: string): Observable; /** * 添加子表兄弟节点 */ addSubSibling(repository: BefRepository, nodes: Array, ids: Array): Observable; /** * 添加子表子节点 */ addSubChild(repository: BefRepository, nodes: Array, ids: Array): Observable; private getPaths; /** * 加载父节点 */ loadByParentId(repository: BefRepository, hierarchyInfoKey: string, parentId: string, filters: any[], sorts: any[], frozenCurrentRow?: boolean, pagination?: { pageSize: number; pageIndex: number; }, frameContext?: FrameContext, reload?: boolean): Observable; loadFullTree(repository: BefRepository, hierarchyInfoKey: string, parentId: string, propertyName: string, fullTreeType: string, loadType: string, filters?: any[], context?: any): Observable; /** * 插入对父节点的过滤 */ buildFiltersWithParent(originalHierarchyInfoKey: string, parentHierarchyInfo: any, filterArray: any[]): any; buildEntityFilter(filter: any[], sort: any[], pageSize: number, pageIndex: number): { FilterConditions: any[]; SortConditions: any[]; IsUsePagination: boolean; Pagination: { PageIndex: number; PageSize: number; PageCount: number; TotalCount: number; }; }; /** * 清空后代实体 * @description parentHierarchyInfo中layer为要清空后代节点的layer,但里面的parentElement不是父级的id,而是要清空后代节点的id */ clearDescendantEntities(repository: BefRepository, hierarchyInfokey: string, parentHierarchyInfo: any, frozenCurrentRow?: boolean): void; /** * 获取某个节点的所有子节点 * @param repository repository * @param hierarchyInfokey hierarchyInfokey * @param parentHierarchyInfo parentHierarchyInfo */ private getChildNodes; /** * 获取实体的分级信息 */ getHierarchyInfoById(repository: BefRepository, hierarchyInfokey: string, id: string): any; getHierarchyInfo(entity: Entity, hierarchyInfokey: string): { parentElement: string; layer: number; isDetail: boolean; }; /** * 获取分级码的原始的字段名 */ getOriginalHierarchyInfoKey(repository: BefRepository, hierarchyInfokey: string): string; private getPaginationInfo; private findParent; private getAllParentIds; /** * 查找节点下所有子级(第一级) * @param repository repository * @param hierarchyInfoKey 分级码字段 * @param id id * @returns */ private getChildren; } export { ParentTreeRepository };