@ningboyz/apis 1.0.112 → 1.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +15 -15
- package/index.ts +76 -76
- package/package.json +24 -24
- package/packages/antv/cnfg.ts +47 -47
- package/packages/antv/index.ts +20 -20
- package/packages/antv/main.ts +54 -54
- package/packages/antv/para.ts +47 -47
- package/packages/antv/type.ts +59 -59
- package/packages/axios.ts +136 -136
- package/packages/card/form.ts +18 -18
- package/packages/card/gblb.ts +102 -102
- package/packages/card/index.ts +46 -46
- package/packages/card/main.ts +222 -222
- package/packages/card/p4pz.ts +93 -93
- package/packages/card/type.ts +628 -628
- package/packages/card/tzclbgblb.ts +36 -36
- package/packages/card/zcbd.ts +110 -110
- package/packages/card/zccf.ts +105 -105
- package/packages/card/zccz.ts +112 -112
- package/packages/card/zcdb.ts +120 -120
- package/packages/card/zclb.ts +74 -74
- package/packages/card/zczj.ts +21 -21
- package/packages/card/zczjProp.ts +21 -21
- package/packages/cnfg/index.ts +14 -14
- package/packages/cnfg/main.ts +42 -42
- package/packages/cnfg/type.ts +4 -4
- package/packages/core/dept.ts +94 -94
- package/packages/core/dict.ts +69 -69
- package/packages/core/index.ts +52 -52
- package/packages/core/laid.ts +77 -77
- package/packages/core/part.ts +54 -54
- package/packages/core/path.ts +46 -46
- package/packages/core/sysbilltype.ts +45 -45
- package/packages/core/sysclas.ts +16 -16
- package/packages/core/sysenvr.ts +15 -15
- package/packages/core/syskjnd.ts +18 -18
- package/packages/core/sysmenu.ts +110 -110
- package/packages/core/systravel.ts +39 -39
- package/packages/core/type.ts +66 -66
- package/packages/core/types.ts +511 -511
- package/packages/core/unit.ts +74 -74
- package/packages/core/user.ts +360 -360
- package/packages/cron/index.ts +14 -14
- package/packages/cron/main.ts +47 -47
- package/packages/cron/type.ts +18 -18
- package/packages/elem/index.ts +14 -14
- package/packages/elem/main.ts +15 -15
- package/packages/elem/type.ts +7 -7
- package/packages/expd/index.ts +14 -14
- package/packages/expd/main.ts +16 -16
- package/packages/expd/type.ts +8 -8
- package/packages/flow/duty.ts +57 -57
- package/packages/flow/flow.ts +97 -97
- package/packages/flow/index.ts +25 -25
- package/packages/flow/main.ts +61 -61
- package/packages/flow/node.ts +76 -76
- package/packages/flow/type.ts +214 -214
- package/packages/flow/void.ts +64 -64
- package/packages/gams/cnfg.ts +16 -16
- package/packages/gams/index.ts +14 -14
- package/packages/gams/type.ts +6 -6
- package/packages/grow/grow.ts +17 -17
- package/packages/grow/index.ts +14 -14
- package/packages/grow/type.ts +7 -7
- package/packages/gzjg/gzlm.ts +74 -74
- package/packages/gzjg/index.ts +16 -16
- package/packages/gzjg/main.ts +62 -62
- package/packages/gzjg/type.ts +92 -92
- package/packages/gztb/index.ts +14 -14
- package/packages/gztb/main.ts +16 -16
- package/packages/gztb/type.ts +7 -7
- package/packages/index.ts +22 -22
- package/packages/load/index.ts +17 -17
- package/packages/load/type.ts +9 -9
- package/packages/load/yqdw.ts +15 -15
- package/packages/load/yqkm.ts +15 -15
- package/packages/myoa/index.ts +14 -14
- package/packages/myoa/main.ts +47 -47
- package/packages/myoa/type.ts +21 -21
- package/packages/noti/index.ts +14 -14
- package/packages/noti/main.ts +47 -47
- package/packages/noti/type.ts +24 -24
- package/packages/ocri/index.ts +13 -13
- package/packages/ocri/path.ts +17 -17
- package/packages/ocri/type.ts +6 -6
- package/packages/pzpt/cnfg.ts +52 -52
- package/packages/pzpt/glfa.ts +59 -59
- package/packages/pzpt/glkm.ts +51 -51
- package/packages/pzpt/index.ts +39 -39
- package/packages/pzpt/item.ts +54 -54
- package/packages/pzpt/k0km.ts +41 -41
- package/packages/pzpt/k8km.ts +55 -55
- package/packages/pzpt/kbkm.ts +25 -25
- package/packages/pzpt/type.ts +50 -50
- package/packages/pzpt/types.ts +370 -370
- package/packages/pzpt/yqkb.ts +20 -20
- package/packages/pzpt/yqkm.ts +34 -34
- package/packages/tabl/index.ts +14 -14
- package/packages/tabl/main.ts +116 -116
- package/packages/tabl/type.ts +148 -148
- package/packages/task/index.ts +13 -13
- package/packages/task/main.ts +20 -20
- package/packages/task/type.ts +18 -18
- package/packages/wldy/data.ts +52 -52
- package/packages/wldy/index.ts +20 -20
- package/packages/wldy/item.ts +52 -52
- package/packages/wldy/page.ts +62 -62
- package/packages/wldy/type.ts +40 -40
- package/packages/wtui/ctrl.ts +45 -45
- package/packages/wtui/envr.ts +15 -15
- package/packages/wtui/form.ts +61 -61
- package/packages/wtui/index.ts +44 -44
- package/packages/wtui/item.ts +62 -62
- package/packages/wtui/main.ts +85 -85
- package/packages/wtui/menu.ts +37 -37
- package/packages/wtui/node.ts +55 -55
- package/packages/wtui/todo.ts +77 -77
- package/packages/wtui/type.ts +384 -384
- package/packages/wtui/user.ts +39 -39
- package/packages/wtui/view.ts +90 -90
- package/packages/wtui/zone.ts +52 -52
- package/packages/yzcg/index.ts +14 -14
- package/packages/yzcg/main.ts +49 -49
- package/packages/yzcg/type.ts +23 -23
- package/readme.md +1 -1
- package/packages/antv/type.ts~ +0 -57
- package/packages/card/index.ts~ +0 -47
- package/packages/card/type.ts~ +0 -605
- package/packages/card/tzclbsort.ts~ +0 -36
- package/packages/card/zccz.ts~ +0 -106
- package/packages/core/laid.ts~ +0 -84
- package/packages/noti/main.ts~ +0 -47
- package/packages/noti/type.ts~ +0 -29
- package/packages/wtui/type.ts~ +0 -380
package/packages/core/user.ts
CHANGED
|
@@ -1,360 +1,360 @@
|
|
|
1
|
-
import { TCore, TWlzf, TWtui } from "@ningboyz/types";
|
|
2
|
-
import type { HttpRequest } from "../axios";
|
|
3
|
-
import _ from "lodash";
|
|
4
|
-
import {
|
|
5
|
-
ICoreDel4deptQuerys,
|
|
6
|
-
ICoreDel4laidQuerys,
|
|
7
|
-
ICoreSet4laidQuerys,
|
|
8
|
-
ICoreSet4userQuerys,
|
|
9
|
-
ICoreUserCaptcha1Querys,
|
|
10
|
-
ICoreUserCaptcha2Querys,
|
|
11
|
-
ICoreUserCheckCodeServletQuerys,
|
|
12
|
-
ICoreUserDetaildbCamelcaseQuerys,
|
|
13
|
-
ICoreUserGet4DeptQuerys,
|
|
14
|
-
ICoreUserGet4LaidQuerys,
|
|
15
|
-
ICoreUserGet4PartQuerys,
|
|
16
|
-
ICoreUserGet4WlzfQuerys,
|
|
17
|
-
ICoreUserInitpswdQuerys,
|
|
18
|
-
ICoreUserMobileidUpdatedbQuerys,
|
|
19
|
-
ICoreUserScanloginQuerys,
|
|
20
|
-
ICoreUserSelectdbCamelcaseQuerys,
|
|
21
|
-
ICoreUserSelectdbTokenusrHeaders,
|
|
22
|
-
ICoreUserSendMessageQuerys,
|
|
23
|
-
ICoreUserSourcendSet4kjndQuerys,
|
|
24
|
-
ICoreUserUpdatemmQuerys,
|
|
25
|
-
ICoreUserVerifydbDingdingQuerys,
|
|
26
|
-
ICoreDel4userQuerys,
|
|
27
|
-
IParams,
|
|
28
|
-
ICoreUserUploadd2Querys
|
|
29
|
-
} from "./types";
|
|
30
|
-
import { IUserResponse } from "../../../types/src/core";
|
|
31
|
-
|
|
32
|
-
class UserRequest {
|
|
33
|
-
private httpRequest: HttpRequest;
|
|
34
|
-
constructor(httpRequest: HttpRequest) {
|
|
35
|
-
this.httpRequest = httpRequest;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* 获取用户管理详情
|
|
40
|
-
* @param params
|
|
41
|
-
*/
|
|
42
|
-
detaildb(params: object) {
|
|
43
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/detaildb", undefined, params);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 新增用户
|
|
48
|
-
* @param params
|
|
49
|
-
*/
|
|
50
|
-
insertdb(params: object) {
|
|
51
|
-
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/insertdb`, undefined, params);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 更新用户
|
|
56
|
-
* @param params
|
|
57
|
-
*/
|
|
58
|
-
updatedb(params: object) {
|
|
59
|
-
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/updatedb`, undefined, params);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 删除用户
|
|
64
|
-
* @param params
|
|
65
|
-
*/
|
|
66
|
-
deletedb(params: object) {
|
|
67
|
-
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/deletedb`, undefined, params);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @param querys
|
|
73
|
-
* @returns
|
|
74
|
-
*/
|
|
75
|
-
selectdbCamelcase(querys: ICoreUserSelectdbCamelcaseQuerys) {
|
|
76
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/selectdb/camelcase", querys, undefined);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 根据用户id查用户角色
|
|
81
|
-
* @param querys
|
|
82
|
-
* @param params
|
|
83
|
-
* @returns
|
|
84
|
-
*/
|
|
85
|
-
detaildbCamelcase(querys: ICoreUserDetaildbCamelcaseQuerys, params: IParams<IUserResponse> | undefined) {
|
|
86
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tmast/detaildb/camelcase", querys, params);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 获取用户角色
|
|
91
|
-
* @param querys
|
|
92
|
-
*/
|
|
93
|
-
get4part(querys: ICoreUserGet4PartQuerys) {
|
|
94
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/get4part", querys, undefined);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* 添加用户角色
|
|
99
|
-
* @param params
|
|
100
|
-
*/
|
|
101
|
-
usrpartcSet4unit(params: object) {
|
|
102
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4unit", undefined, params);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 删除用户角色
|
|
107
|
-
* @param params
|
|
108
|
-
*/
|
|
109
|
-
usrpartcDel4unit(params: object) {
|
|
110
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4unit", undefined, params);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* 添加人员权限
|
|
115
|
-
* @param querys
|
|
116
|
-
* @param params
|
|
117
|
-
*/
|
|
118
|
-
usrpartcSet4user(querys: ICoreSet4userQuerys, params: object) {
|
|
119
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4user", querys, params);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* 删除人员权限
|
|
124
|
-
* @param querys
|
|
125
|
-
* @param params
|
|
126
|
-
*/
|
|
127
|
-
usrpartcDel4user(querys: ICoreDel4userQuerys, params: object) {
|
|
128
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4user", querys, params);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* 添加地点权限
|
|
133
|
-
* @param querys
|
|
134
|
-
* @param params
|
|
135
|
-
*/
|
|
136
|
-
usrpartcSet4laid(querys: ICoreSet4laidQuerys, params: object) {
|
|
137
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4laid", querys, params);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* 删除地点权限
|
|
142
|
-
* @param querys
|
|
143
|
-
* @param params
|
|
144
|
-
*/
|
|
145
|
-
usrpartcDel4laid(querys: ICoreDel4laidQuerys, params: object) {
|
|
146
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4laid", querys, params);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* 添加部门权限
|
|
151
|
-
* @param params
|
|
152
|
-
*/
|
|
153
|
-
usrpartcSet4dept(params: object) {
|
|
154
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4dept", undefined, params);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* 删除部门权限
|
|
159
|
-
* @param querys
|
|
160
|
-
* @param params
|
|
161
|
-
*/
|
|
162
|
-
usrpartcDel4dept(querys: ICoreDel4deptQuerys, params: object) {
|
|
163
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4dept", querys, params);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* 支付环境
|
|
168
|
-
* @param querys
|
|
169
|
-
* @returns
|
|
170
|
-
*/
|
|
171
|
-
get4wlzf(querys: ICoreUserGet4WlzfQuerys) {
|
|
172
|
-
return this.httpRequest.post<TWlzf.IWlzfEnvrResponse[]>("/core/tuser/get4wlzf", querys, undefined);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* 部门权限
|
|
177
|
-
* @param querys
|
|
178
|
-
*/
|
|
179
|
-
get4dept(querys: ICoreUserGet4DeptQuerys) {
|
|
180
|
-
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tuser/get4dept", querys, undefined);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* 仓库权限
|
|
185
|
-
* @param querys
|
|
186
|
-
*/
|
|
187
|
-
get4laid(querys: ICoreUserGet4LaidQuerys) {
|
|
188
|
-
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tuser/get4laid", querys, undefined);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* 获取用户权限范围内的单位
|
|
193
|
-
*/
|
|
194
|
-
get4unit() {
|
|
195
|
-
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4unit");
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
get4belong() {
|
|
199
|
-
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4belong");
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* 登录
|
|
204
|
-
* @param params
|
|
205
|
-
* object ENROLLID USERPSWD
|
|
206
|
-
*/
|
|
207
|
-
verifydbCamelcase(params: object) {
|
|
208
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/camelcase", undefined, params);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* 发送短信验证码
|
|
213
|
-
* @param querys
|
|
214
|
-
* @param params
|
|
215
|
-
*/
|
|
216
|
-
sendMessage(querys: ICoreUserSendMessageQuerys, params: object) {
|
|
217
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/sendmessage", querys, params);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* 解锁用户
|
|
222
|
-
* @param params
|
|
223
|
-
* @returns
|
|
224
|
-
*/
|
|
225
|
-
unlockit(params: object) {
|
|
226
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/unlockit", undefined, params);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* 校验验证码
|
|
231
|
-
* @param querys
|
|
232
|
-
* @param params
|
|
233
|
-
*/
|
|
234
|
-
checkCodeServlet(querys: ICoreUserCheckCodeServletQuerys, params: object) {
|
|
235
|
-
return this.httpRequest.post<string>("/core/tuser/checkcodeservlet", querys, params);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* 修改密码
|
|
240
|
-
* @param querys
|
|
241
|
-
* @param header
|
|
242
|
-
*/
|
|
243
|
-
updatemm(querys: ICoreUserUpdatemmQuerys, header: object) {
|
|
244
|
-
return this.httpRequest.post<string>("/core/tuser/updatemm", querys, undefined, header);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* 重置密码
|
|
249
|
-
* @param querys
|
|
250
|
-
* @param params
|
|
251
|
-
*/
|
|
252
|
-
initpswd(querys: ICoreUserInitpswdQuerys, params: object) {
|
|
253
|
-
return this.httpRequest.post<string>("/core/tuser/initpswd", querys, params);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* 更新用户信息(未登录修改手机号)
|
|
258
|
-
* @param querys
|
|
259
|
-
* @param params
|
|
260
|
-
*/
|
|
261
|
-
mobileidUpdatedb(querys: ICoreUserMobileidUpdatedbQuerys, params: object) {
|
|
262
|
-
return this.httpRequest.post<string>("/core/tuser/mobileid/updatedb", querys, params);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* 设置年度
|
|
267
|
-
* @param querys
|
|
268
|
-
* @param params
|
|
269
|
-
* @returns
|
|
270
|
-
*/
|
|
271
|
-
sourcendSet4kjnd(querys: ICoreUserSourcendSet4kjndQuerys, params: object) {
|
|
272
|
-
return this.httpRequest.post<string>("/core/tuser/sourcend/set4kjnd", querys, params);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* 获取权限
|
|
277
|
-
*/
|
|
278
|
-
get4view() {
|
|
279
|
-
return this.httpRequest.post<TWtui.IViewCtrlResponse[]>("/core/tuser/get4view");
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* 扫码登录
|
|
284
|
-
*/
|
|
285
|
-
scanlogin(querys: ICoreUserScanloginQuerys) {
|
|
286
|
-
return this.httpRequest.post<TCore.IUserResponse[]>(`${querys.ddurl}/dapi/user/get_userinfo_by_qrcode?appid=${querys.appid}&authcode=${querys.code}`);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* 扫码三方登录
|
|
291
|
-
* @param querys
|
|
292
|
-
* @param params
|
|
293
|
-
* @returns
|
|
294
|
-
* verifyID, userName, thirdapp
|
|
295
|
-
*/
|
|
296
|
-
verifydbDingding(querys: ICoreUserVerifydbDingdingQuerys, params: object) {
|
|
297
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/dingding", querys, params);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* 通过用户token登录
|
|
302
|
-
* @param headers
|
|
303
|
-
* @returns
|
|
304
|
-
*/
|
|
305
|
-
selectdbTokenusr(headers: ICoreUserSelectdbTokenusrHeaders) {
|
|
306
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/selectdb/tokenusr", undefined, undefined, headers);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* 用户管理关联资产登记
|
|
311
|
-
* @param params
|
|
312
|
-
* @returns
|
|
313
|
-
*/
|
|
314
|
-
judgedb(params: object) {
|
|
315
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/judgedb", undefined, params);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* 获取服务器时间
|
|
320
|
-
* @returns
|
|
321
|
-
*/
|
|
322
|
-
async getServerTime() {
|
|
323
|
-
const result = await this.httpRequest.post<{ DATADATE: number; DATATIME: number }>("/core/ping", undefined, undefined);
|
|
324
|
-
if (!_.isNil(result) && result.ONSTATUS) {
|
|
325
|
-
return { DATADATE: result.DATADATE, DATATIME: result.DATATIME };
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* 获取验证码
|
|
331
|
-
* @param querys
|
|
332
|
-
* @returns
|
|
333
|
-
*/
|
|
334
|
-
captcha1(querys: ICoreUserCaptcha1Querys) {
|
|
335
|
-
return this.httpRequest.post<string>("/core/tuser/captcha1", querys, undefined);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* 验证码输入判断
|
|
340
|
-
* 传当前浏览器的fp(visitorId),captcha:文本框输入的数值
|
|
341
|
-
* @param querys
|
|
342
|
-
* @param params
|
|
343
|
-
* @returns
|
|
344
|
-
*/
|
|
345
|
-
captcha2(querys: ICoreUserCaptcha2Querys, params: object) {
|
|
346
|
-
return this.httpRequest.post<string>("/core/tuser/captcha2", querys, params);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* 卡片生成的时候,批量补全
|
|
351
|
-
* 批量创建用户
|
|
352
|
-
* @param querys
|
|
353
|
-
* @param params
|
|
354
|
-
*/
|
|
355
|
-
uploadd2(querys: ICoreUserUploadd2Querys, params: object) {
|
|
356
|
-
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/uploadd2", querys, params);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export default UserRequest;
|
|
1
|
+
import { TCore, TWlzf, TWtui } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
import {
|
|
5
|
+
ICoreDel4deptQuerys,
|
|
6
|
+
ICoreDel4laidQuerys,
|
|
7
|
+
ICoreSet4laidQuerys,
|
|
8
|
+
ICoreSet4userQuerys,
|
|
9
|
+
ICoreUserCaptcha1Querys,
|
|
10
|
+
ICoreUserCaptcha2Querys,
|
|
11
|
+
ICoreUserCheckCodeServletQuerys,
|
|
12
|
+
ICoreUserDetaildbCamelcaseQuerys,
|
|
13
|
+
ICoreUserGet4DeptQuerys,
|
|
14
|
+
ICoreUserGet4LaidQuerys,
|
|
15
|
+
ICoreUserGet4PartQuerys,
|
|
16
|
+
ICoreUserGet4WlzfQuerys,
|
|
17
|
+
ICoreUserInitpswdQuerys,
|
|
18
|
+
ICoreUserMobileidUpdatedbQuerys,
|
|
19
|
+
ICoreUserScanloginQuerys,
|
|
20
|
+
ICoreUserSelectdbCamelcaseQuerys,
|
|
21
|
+
ICoreUserSelectdbTokenusrHeaders,
|
|
22
|
+
ICoreUserSendMessageQuerys,
|
|
23
|
+
ICoreUserSourcendSet4kjndQuerys,
|
|
24
|
+
ICoreUserUpdatemmQuerys,
|
|
25
|
+
ICoreUserVerifydbDingdingQuerys,
|
|
26
|
+
ICoreDel4userQuerys,
|
|
27
|
+
IParams,
|
|
28
|
+
ICoreUserUploadd2Querys
|
|
29
|
+
} from "./types";
|
|
30
|
+
import { IUserResponse } from "../../../types/src/core";
|
|
31
|
+
|
|
32
|
+
class UserRequest {
|
|
33
|
+
private httpRequest: HttpRequest;
|
|
34
|
+
constructor(httpRequest: HttpRequest) {
|
|
35
|
+
this.httpRequest = httpRequest;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 获取用户管理详情
|
|
40
|
+
* @param params
|
|
41
|
+
*/
|
|
42
|
+
detaildb(params: object) {
|
|
43
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/detaildb", undefined, params);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 新增用户
|
|
48
|
+
* @param params
|
|
49
|
+
*/
|
|
50
|
+
insertdb(params: object) {
|
|
51
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/insertdb`, undefined, params);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 更新用户
|
|
56
|
+
* @param params
|
|
57
|
+
*/
|
|
58
|
+
updatedb(params: object) {
|
|
59
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/updatedb`, undefined, params);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 删除用户
|
|
64
|
+
* @param params
|
|
65
|
+
*/
|
|
66
|
+
deletedb(params: object) {
|
|
67
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`/core/tuser/deletedb`, undefined, params);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @param querys
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
selectdbCamelcase(querys: ICoreUserSelectdbCamelcaseQuerys) {
|
|
76
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/selectdb/camelcase", querys, undefined);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 根据用户id查用户角色
|
|
81
|
+
* @param querys
|
|
82
|
+
* @param params
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
detaildbCamelcase(querys: ICoreUserDetaildbCamelcaseQuerys, params: IParams<IUserResponse> | undefined) {
|
|
86
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tmast/detaildb/camelcase", querys, params);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 获取用户角色
|
|
91
|
+
* @param querys
|
|
92
|
+
*/
|
|
93
|
+
get4part(querys: ICoreUserGet4PartQuerys) {
|
|
94
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/get4part", querys, undefined);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 添加用户角色
|
|
99
|
+
* @param params
|
|
100
|
+
*/
|
|
101
|
+
usrpartcSet4unit(params: object) {
|
|
102
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4unit", undefined, params);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 删除用户角色
|
|
107
|
+
* @param params
|
|
108
|
+
*/
|
|
109
|
+
usrpartcDel4unit(params: object) {
|
|
110
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4unit", undefined, params);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 添加人员权限
|
|
115
|
+
* @param querys
|
|
116
|
+
* @param params
|
|
117
|
+
*/
|
|
118
|
+
usrpartcSet4user(querys: ICoreSet4userQuerys, params: object) {
|
|
119
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4user", querys, params);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 删除人员权限
|
|
124
|
+
* @param querys
|
|
125
|
+
* @param params
|
|
126
|
+
*/
|
|
127
|
+
usrpartcDel4user(querys: ICoreDel4userQuerys, params: object) {
|
|
128
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4user", querys, params);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 添加地点权限
|
|
133
|
+
* @param querys
|
|
134
|
+
* @param params
|
|
135
|
+
*/
|
|
136
|
+
usrpartcSet4laid(querys: ICoreSet4laidQuerys, params: object) {
|
|
137
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4laid", querys, params);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 删除地点权限
|
|
142
|
+
* @param querys
|
|
143
|
+
* @param params
|
|
144
|
+
*/
|
|
145
|
+
usrpartcDel4laid(querys: ICoreDel4laidQuerys, params: object) {
|
|
146
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4laid", querys, params);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 添加部门权限
|
|
151
|
+
* @param params
|
|
152
|
+
*/
|
|
153
|
+
usrpartcSet4dept(params: object) {
|
|
154
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/set4dept", undefined, params);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 删除部门权限
|
|
159
|
+
* @param querys
|
|
160
|
+
* @param params
|
|
161
|
+
*/
|
|
162
|
+
usrpartcDel4dept(querys: ICoreDel4deptQuerys, params: object) {
|
|
163
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tuser/usrpartc/del4dept", querys, params);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 支付环境
|
|
168
|
+
* @param querys
|
|
169
|
+
* @returns
|
|
170
|
+
*/
|
|
171
|
+
get4wlzf(querys: ICoreUserGet4WlzfQuerys) {
|
|
172
|
+
return this.httpRequest.post<TWlzf.IWlzfEnvrResponse[]>("/core/tuser/get4wlzf", querys, undefined);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 部门权限
|
|
177
|
+
* @param querys
|
|
178
|
+
*/
|
|
179
|
+
get4dept(querys: ICoreUserGet4DeptQuerys) {
|
|
180
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tuser/get4dept", querys, undefined);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* 仓库权限
|
|
185
|
+
* @param querys
|
|
186
|
+
*/
|
|
187
|
+
get4laid(querys: ICoreUserGet4LaidQuerys) {
|
|
188
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tuser/get4laid", querys, undefined);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* 获取用户权限范围内的单位
|
|
193
|
+
*/
|
|
194
|
+
get4unit() {
|
|
195
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4unit");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
get4belong() {
|
|
199
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tuser/get4belong");
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* 登录
|
|
204
|
+
* @param params
|
|
205
|
+
* object ENROLLID USERPSWD
|
|
206
|
+
*/
|
|
207
|
+
verifydbCamelcase(params: object) {
|
|
208
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/camelcase", undefined, params);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* 发送短信验证码
|
|
213
|
+
* @param querys
|
|
214
|
+
* @param params
|
|
215
|
+
*/
|
|
216
|
+
sendMessage(querys: ICoreUserSendMessageQuerys, params: object) {
|
|
217
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/sendmessage", querys, params);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 解锁用户
|
|
222
|
+
* @param params
|
|
223
|
+
* @returns
|
|
224
|
+
*/
|
|
225
|
+
unlockit(params: object) {
|
|
226
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/unlockit", undefined, params);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* 校验验证码
|
|
231
|
+
* @param querys
|
|
232
|
+
* @param params
|
|
233
|
+
*/
|
|
234
|
+
checkCodeServlet(querys: ICoreUserCheckCodeServletQuerys, params: object) {
|
|
235
|
+
return this.httpRequest.post<string>("/core/tuser/checkcodeservlet", querys, params);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* 修改密码
|
|
240
|
+
* @param querys
|
|
241
|
+
* @param header
|
|
242
|
+
*/
|
|
243
|
+
updatemm(querys: ICoreUserUpdatemmQuerys, header: object) {
|
|
244
|
+
return this.httpRequest.post<string>("/core/tuser/updatemm", querys, undefined, header);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* 重置密码
|
|
249
|
+
* @param querys
|
|
250
|
+
* @param params
|
|
251
|
+
*/
|
|
252
|
+
initpswd(querys: ICoreUserInitpswdQuerys, params: object) {
|
|
253
|
+
return this.httpRequest.post<string>("/core/tuser/initpswd", querys, params);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* 更新用户信息(未登录修改手机号)
|
|
258
|
+
* @param querys
|
|
259
|
+
* @param params
|
|
260
|
+
*/
|
|
261
|
+
mobileidUpdatedb(querys: ICoreUserMobileidUpdatedbQuerys, params: object) {
|
|
262
|
+
return this.httpRequest.post<string>("/core/tuser/mobileid/updatedb", querys, params);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* 设置年度
|
|
267
|
+
* @param querys
|
|
268
|
+
* @param params
|
|
269
|
+
* @returns
|
|
270
|
+
*/
|
|
271
|
+
sourcendSet4kjnd(querys: ICoreUserSourcendSet4kjndQuerys, params: object) {
|
|
272
|
+
return this.httpRequest.post<string>("/core/tuser/sourcend/set4kjnd", querys, params);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* 获取权限
|
|
277
|
+
*/
|
|
278
|
+
get4view() {
|
|
279
|
+
return this.httpRequest.post<TWtui.IViewCtrlResponse[]>("/core/tuser/get4view");
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* 扫码登录
|
|
284
|
+
*/
|
|
285
|
+
scanlogin(querys: ICoreUserScanloginQuerys) {
|
|
286
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`${querys.ddurl}/dapi/user/get_userinfo_by_qrcode?appid=${querys.appid}&authcode=${querys.code}`);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* 扫码三方登录
|
|
291
|
+
* @param querys
|
|
292
|
+
* @param params
|
|
293
|
+
* @returns
|
|
294
|
+
* verifyID, userName, thirdapp
|
|
295
|
+
*/
|
|
296
|
+
verifydbDingding(querys: ICoreUserVerifydbDingdingQuerys, params: object) {
|
|
297
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/dingding", querys, params);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* 通过用户token登录
|
|
302
|
+
* @param headers
|
|
303
|
+
* @returns
|
|
304
|
+
*/
|
|
305
|
+
selectdbTokenusr(headers: ICoreUserSelectdbTokenusrHeaders) {
|
|
306
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/selectdb/tokenusr", undefined, undefined, headers);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* 用户管理关联资产登记
|
|
311
|
+
* @param params
|
|
312
|
+
* @returns
|
|
313
|
+
*/
|
|
314
|
+
judgedb(params: object) {
|
|
315
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/judgedb", undefined, params);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* 获取服务器时间
|
|
320
|
+
* @returns
|
|
321
|
+
*/
|
|
322
|
+
async getServerTime() {
|
|
323
|
+
const result = await this.httpRequest.post<{ DATADATE: number; DATATIME: number }>("/core/ping", undefined, undefined);
|
|
324
|
+
if (!_.isNil(result) && result.ONSTATUS) {
|
|
325
|
+
return { DATADATE: result.DATADATE, DATATIME: result.DATATIME };
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* 获取验证码
|
|
331
|
+
* @param querys
|
|
332
|
+
* @returns
|
|
333
|
+
*/
|
|
334
|
+
captcha1(querys: ICoreUserCaptcha1Querys) {
|
|
335
|
+
return this.httpRequest.post<string>("/core/tuser/captcha1", querys, undefined);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* 验证码输入判断
|
|
340
|
+
* 传当前浏览器的fp(visitorId),captcha:文本框输入的数值
|
|
341
|
+
* @param querys
|
|
342
|
+
* @param params
|
|
343
|
+
* @returns
|
|
344
|
+
*/
|
|
345
|
+
captcha2(querys: ICoreUserCaptcha2Querys, params: object) {
|
|
346
|
+
return this.httpRequest.post<string>("/core/tuser/captcha2", querys, params);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* 卡片生成的时候,批量补全
|
|
351
|
+
* 批量创建用户
|
|
352
|
+
* @param querys
|
|
353
|
+
* @param params
|
|
354
|
+
*/
|
|
355
|
+
uploadd2(querys: ICoreUserUploadd2Querys, params: object) {
|
|
356
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/uploadd2", querys, params);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export default UserRequest;
|