feat: 角色管理增加授权用户功能 (#33)

This commit is contained in:
Wanghy
2024-10-24 13:36:26 +08:00
committed by GitHub
parent 33bf31b048
commit 2f30df528c
5 changed files with 143 additions and 2 deletions

View File

@@ -9,7 +9,10 @@ const BASE_URL = '/common'
export function listDeptTree(query: { description: string }) {
return http.get<TreeNodeData[]>(`${BASE_URL}/tree/dept`, query)
}
/** @desc 查询部门用户树 */
export function listDeptWithUsersTree(query: { description?: string, status: number }) {
return http.get<TreeNodeData[]>(`${BASE_URL}/tree/deptWithUsers`, query)
}
/** @desc 查询菜单树 */
export function listMenuTree(query: { description: string }) {
return http.get<TreeNodeData[]>(`${BASE_URL}/tree/menu`, query)

View File

@@ -29,3 +29,11 @@ export function updateRole(data: any, id: string) {
export function deleteRole(ids: string | Array<string>) {
return http.del(`${BASE_URL}/${ids}`)
}
/** @desc 获取角色绑定的用户列表 */
export function listRoleUsers(id: string) {
return http.get(`${BASE_URL}/listRoleUsers/${id}`)
}
export function bindUsers(id: string, userIds : Array<string>) {
return http.post(`${BASE_URL}/bindUsers/${id}`,userIds)
}