type.ts 841 B

1234567891011121314151617181920212223
  1. import { IS_DISABLED } from "@/types/common/constants"
  2. /* V4: 部门树结构 */
  3. export interface DeptTreeItem {
  4. id: number | null,
  5. deptName: string, // 部门名称
  6. parentId: number | null, // 上级部门 id
  7. orderNum: number | undefined, // 排序
  8. isDisabled: IS_DISABLED, // 状态: 0-启用, 1-禁用
  9. createdBy: number, // 创建人
  10. updatedBy: number, // 更新人
  11. createdAt: string, // 创建时间
  12. updatedAt: string, // 更新时间
  13. isDeleted: number, // 0-未删除。 大于 0-已删除
  14. tenantId: number, // 租户 ID
  15. userCount: number, // 组织下的用户数量
  16. }
  17. export type DeptTree = DeptTreeItem & { children: DeptTreeItem[] }
  18. export type addDeptProps = Pick<DeptTreeItem, 'isDisabled' | 'parentId' | 'deptName' | 'orderNum'>
  19. export type editDeptProps = addDeptProps & {id?: DeptTreeItem['id']}