feat: 新增角色列表

This commit is contained in:
xlsea
2025-05-10 01:17:37 +08:00
parent 67b5af9892
commit a903251c0d
11 changed files with 431 additions and 45 deletions

View File

@ -35,6 +35,14 @@ export function fetchDeleteMenu(menuId: CommonType.IdType) {
});
}
/** 获取菜单树 */
export function fetchGetMenuTreeSelect() {
return request<Api.System.MenuList>({
url: 'system/menu/treeselect',
method: 'get'
});
}
/** 获取角色菜单权限 */
export function fetchGetRoleMenuTreeSelect(roleId: CommonType.IdType) {
return request<Api.System.RoleMenuTreeSelect>({

View File

@ -52,3 +52,20 @@ export function fetchGetRoleSelect(roleIds?: CommonType.IdType[]) {
params: { roleIds }
});
}
/** 获取对应角色部门树列表 */
export function fetchGetRoleDeptTreeSelect(roleId: CommonType.IdType) {
return request<Api.System.RoleDeptTreeSelect>({
url: `/system/role/deptTree/${roleId}`,
method: 'get'
});
}
/** 获取对应角色用户列表 */
export function fetchGetRoleUserList(params: Api.System.UserSearchParams) {
return request<Api.System.UserList>({
url: `/system/role/authUser/allocatedList`,
method: 'get',
params
});
}