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
| import request from "@/common/untils/request.js"
|
| // 等级列表
| export const getListRole = async (data) => {
| return request({
| url: "/api/role/listRole",
| method: "post",
| data
| })
| }
| // 根据角色id获取用户列表
| export const getUserList = async (data) => {
| return request({
| url: "/api/role/usersById",
| method: "post",
| data
| })
| }
| // 新增角色
| export const addRole = (data) => {
| return request({
| url: "/api/role/add",
| method: "post",
| data
| })
| }
| // 编辑角色
| export const updateRole = (data) => {
| return request({
| url: "/api/role/update",
| method: "post",
| data
| })
| }
| // 获取参考角色 页面权限 菜单 的数据
| export const getDataRole = (data) => {
| return request({
| url: "/api/role/prepare?useType=" + data.useType,
| method: "get",
| data
| })
| }
| // 角色启用、停用
| export const roleChange = (data) => {
| return request({
| url: "/api/role/change",
| method: "post",
| data
| })
| }
| // 删除角色
| export const deleteRole = (id) => {
| return request({
| url: `/api/role/delete/${id}`,
| method: "delete",
| id
| })
| }
| // 获取等级数量统计
| export const getTotal = (data) => {
| return request({
| url: "/api/role/getTotal?useType=" + data.useType,
| method: "get",
| data
| })
| }
|
|