index.js
2.62 KB
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
import api from '../index'
import baseUrl from '../baseUrl'
export default {
getUserList(params,id){
return api.get(`${baseUrl}/api/v1/auth/users`, params)
},
getRoleList(params,id) {
return api.get(`${baseUrl}/api/v1/auth/roles`, params)
},
addUser(params){
return api.post(`${baseUrl}/api/v1/auth/users`, params)
},
editUser(params,id) {
return api.post(`${baseUrl}/api/v1/auth/users/${id}`, params)
},
resetPwd(params,id) {
return api.post(`${baseUrl}/api/v1/devconf_fx/users/${id}/reset`, params)
},
delUser(params,id){
return api.delete(`${baseUrl}/api/v1/auth/users/${id}`, params)
},
addRole(params){
return api.post(`${baseUrl}/api/v1/auth/roles`, params)
},
unbindRole(params,id,id2){
return api.delete(`${baseUrl}/api/v1/auth/users/${id}/roles/${id2}`, params)
},
logList(params){
return api.get(`${baseUrl}/api/v1/devconf_fx/logs`, params)
},
bindperms(params,id){
return api.post(`${baseUrl}/api/v1/auth/roles/${id}/perms`, params)
},
getPerms(params,id){
return api.get(`${baseUrl}/api/v1/auth/roles/${id}/perms`, params)
},
editRole(params,id){
return api.post(`${baseUrl}/api/v1/auth/roles/${id}`, params)
},
bindRole(params,id){
return api.post(`${baseUrl}/api/v1/auth/users/${id}/roles`, params)
},
getDevsTime(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/time`, params)
},
manualTime(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/time`, params)
},
getNtp(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/timing/ntp`, params)
},
ntpTime(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/timing/ntp`, params)
},
factoryReset(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/factory-reset`, params)
},
importParams(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/parameters/import`, params,{'Content-Type': 'multipart/form-data'})
},
exportParams(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/parameters/export`, params)
},
manualReboot(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/manual`, params)
},
intervalReboot(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params)
},
getRebootSetting(params,id,id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs/${id2}/reboot/auto`, params)
},
downloadOcx(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/dlfile`, params)
}
}