mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 12:59:24 +08:00
refactor: 使用用户选择器组件重构角色分配功能
This commit is contained in:
@@ -9,10 +9,7 @@ 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)
|
||||
|
@@ -29,11 +29,13 @@ export function updateRole(data: any, id: string) {
|
||||
export function deleteRole(ids: string | Array<string>) {
|
||||
return http.del(`${BASE_URL}/${ids}`)
|
||||
}
|
||||
/** @desc 获取角色绑定的用户列表 */
|
||||
|
||||
/** @desc 查询角色关联用户 */
|
||||
export function listRoleUsers(id: string) {
|
||||
return http.get(`${BASE_URL}/listRoleUsers/${id}`)
|
||||
return http.get(`${BASE_URL}/${id}/user`)
|
||||
}
|
||||
|
||||
export function bindUsers(id: string, userIds: Array<string>) {
|
||||
return http.post(`${BASE_URL}/bindUsers/${id}`, userIds)
|
||||
/** @desc 分配角色给用户 */
|
||||
export function assignToUsers(id: string, userIds: Array<string>) {
|
||||
return http.post(`${BASE_URL}/${id}/user`, userIds)
|
||||
}
|
||||
|
Reference in New Issue
Block a user