import { httpGET, httpDEL, httpPOST, httpPUT } from './common/httpFetch' /** * 角色列表 * @description 角色列表 * @param { string } orgId 分库orgId * @param { string } start 分页起始 * @param { string } name 角色名字 * @param { string } length 每页条数 */ export const getRoles = body => { return httpGET('data/api-u/roles', { body, isLoading: false }) } /** * @description 角色删除 * @param { string } orgId 分库orgId * @param { string } id 分库orgId */ export const rolesDel = body => { return httpDEL('data/api-u/roles', { body }) } /** * @description 角色添加 * @param { string } orgId 分库orgId * @param { string } name 角色 */ export const rolesAdd = body => { return httpPOST('data/api-u/roles', { body }) } /** * 角色编辑 * @description * @param { string } orgId 分库orgId * @param { string } name 角色 */ export const rolesEdit = body => { return httpPUT('data/api-u/roles', { body }) } /** * @description 角色列表 * @param { string } orgId 分库orgId */ export const getAccessTree = body => { return httpGET('data/api-u/roles/findRoleList', { body }) } /** * @description 菜单全部 * @param { string } orgId 分库orgId */ export const getRolesList = body => { return httpGET('data/api-u/sysmenus/tree', { body }) } /** * 获取角色菜单 * @description 获取角色菜单 * @param { string } roleId 角色ID * @param { string } orgId 分库orgId */ export const getRolePermission = body => { return httpGET('data/api-u/sysmenus/menusByRole', { body }) } /** * 角色赋菜单权限 * @description 角色赋菜单权限 * @param { string } id 角色ID * @param { string } orgId 分库orgId * @param { string } menuIds 菜单ids,字符串’,’分割 */ export const saveRolePermission = body => { return httpPOST('data/api-u/roles/saveRoleMenus', { body }) } /** * 获取权限列表 * @description 获取权限列表 */ export const getRolesTree = body => { return httpGET('data/api-u/sysmenus/tree', { body }) }