feat:对接部门管理,优化菜单管理,共用handleTree方法

This commit is contained in:
AN
2025-04-13 13:22:12 +08:00
parent 73cfa34796
commit 375ffa1578
19 changed files with 667 additions and 165 deletions

View File

@ -316,11 +316,13 @@ declare namespace Api {
email: string;
/** 部门状态0正常 1停用 */
status: string;
/** 子部门 */
children: Dept[];
}>;
/** dept search params */
type DeptSearchParams = CommonType.RecordNullable<
Pick<Api.System.Dept, 'parentId' | 'deptName' | 'deptCategory' | 'status'> & Api.Common.CommonSearchParams
Pick<Api.System.Dept, 'deptName' | 'status'> & Api.Common.CommonSearchParams
>;
/** dept operate params */
@ -358,8 +360,9 @@ declare namespace Api {
/** post search params */
type PostSearchParams = CommonType.RecordNullable<
Pick<Api.System.Post, 'deptId' | 'postCode' | 'postName' | 'status'>
& { belongDeptId: CommonType.IdType } & Api.Common.CommonSearchParams
Pick<Api.System.Post, 'deptId' | 'postCode' | 'postName' | 'status'> & {
belongDeptId: CommonType.IdType;
} & Api.Common.CommonSearchParams
>;
/** post operate params */
@ -441,7 +444,7 @@ declare namespace Api {
/** tenant search params */
type TenantSearchParams = CommonType.RecordNullable<
Pick<Api.System.Tenant, 'tenantId' | 'contactUserName' | 'contactPhone' | 'companyName'> &
Api.Common.CommonSearchParams
Api.Common.CommonSearchParams
>;
/** tenant operate params */
@ -492,7 +495,7 @@ declare namespace Api {
/** tenant package search params */
type TenantPackageSearchParams = CommonType.RecordNullable<
Pick<Api.System.TenantPackage, 'packageName' | 'menuIds' | 'menuCheckStrictly' | 'status'> &
Api.Common.CommonSearchParams
Api.Common.CommonSearchParams
>;
/** tenant package operate params */

View File

@ -31,4 +31,16 @@ declare namespace CommonType {
/** The res error code */
type ErrorCode = '401' | '403' | '404' | 'default';
/** 构造树型结构数据的配置选项 */
type TreeConfig = {
/** id字段名 */
idField: string;
/** 父节点字段名 */
parentIdField?: string;
/** 子节点字段名 */
childrenField?: string;
/** 过滤函数 */
filterFn?: (node: any) => boolean;
};
}

View File

@ -25,6 +25,7 @@ declare module "@elegant-router/types" {
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
"system": "/system";
"system_config": "/system/config";
"system_dept": "/system/dept";
"system_dict": "/system/dict";
"system_dict_data": "/system/dict/data";
"system_dict_type": "/system/dict/type";
@ -96,6 +97,7 @@ declare module "@elegant-router/types" {
| "login"
| "home"
| "system_config"
| "system_dept"
| "system_dict_data"
| "system_dict"
| "system_dict_type"