liuxiaolong
2019-05-06 19e47fa0e48ac76a951bbfaa0a3e95211567f5a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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 })
}