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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
| import axios from "@/assets/axios";
| import formatPassword from "@/assets/js/tools/formatPassword";
|
| /**
| * 查询所有用户信息
| * @returns
| */
| export const getAllUser = (params, data) => {
| return axios({
| method: "POST",
| url: "docUser/getAllUser",
| params,
| data,
| });
| };
| /**
| * 新增用户
| * @returns
| */
| export const addUser = (data) => {
| return axios({
| method: "POST",
| url: "docUser/addUser",
| headers: {
| "Content-Type": "multipart/form-data",
| },
| data,
| });
| };
| /**
| * 删除用户
| * @returns
| */
| export const deleteUser = (id) => {
| return axios({
| method: "GET",
| url: "docUser/deleteUser",
| params: { id },
| });
| };
| /**
| * 编辑用户信息
| * @returns
| */
| export const editUser = (data) => {
| return axios({
| method: "POST",
| url: "docUser/updateUser",
| headers: {
| "Content-Type": "multipart/form-data",
| },
| data,
| });
| };
| /**
| * 查询所有部门信息
| * @returns
| */
| export const getAllDepart = () => {
| return axios({
| method: "GET",
| url: "docDepart/getAllDepart",
| });
| };
| /**
| * 查询所有角色信息
| * @returns
| */
| export const getAllRole = () => {
| return axios({
| method: "GET",
| url: "docDepart/getAllRole",
| });
| };
| /**
| * 清除人脸信息
| * @returns
| */
| export const deleteFace = (faceId) => {
| return axios({
| method: "GET",
| url: "docFace/deleteFace",
| params: { faceId },
| });
| };
| /**
| * 修改用户密码
| * @returns
| */
| export const changePwd = (oldSnId, newSnId) => {
| return axios({
| method: "GET",
| url: "docUser/changeSnId",
| params: {
| newSnId: encodeURIComponent(formatPassword(newSnId)),
| oldSnId: encodeURIComponent(formatPassword(oldSnId)),
| },
| });
| };
|
| /**
| * 根据用户角色的id查询所有的用户
| * @param roleId 角色id
| * @returns {AxiosPromise}
| */
| export const getUserByRoleId = (roleId) => {
| return axios({
| method: "GET",
| url: "docUser/getUserByRoleId",
| params: {
| roleId,
| },
| });
| };
|
| /**
| * 根据用户角色的id (多个)查询所有的用户
| * @param roleIds 角色id 为多个时 以逗号分隔
| * @returns {AxiosPromise}
| */
| export const getUserByRoleIds = (roleIds) => {
| return axios({
| method: "GET",
| url: "docUser/getUserByRoleIds",
| params: {
| roleIds,
| },
| });
| };
| /**
| * 查询角色用户列表 权限类型0:测试, 1下载 2:源码下载 3:源码上传
| * @param {*} roleType
| * @returns
| */
| export const getRoleUser = (roleType) => {
| return axios({
| method: "GET",
| url: "roleUser/getRoleUser",
| params: {
| roleType,
| },
| });
| };
|
|