index.js
3.04 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import api from "../index";
import baseUrl from "../baseUrl";
export default {
devs(params){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs`, params)
},
treeList(params,id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchan_struct`, params)
},
getVideoList(params,id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
},
addCode(params,id) {
return api.post(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes`, params)
},
addNode(params,id){
return api.post(`${baseUrl}/api/v1/org`, params)
},
getCode(params,id){
return api.get(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes`, params)
},
editCode(params,id,unid){
return api.post(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes/${unid}`, params)
},
delCode(params,id,unid){
return api.delete(`${baseUrl}/api/v1/codes/custom/cates/${id}/codes/${unid}`, params)
},
delOrg(params,id){
return api.delete(`${baseUrl}/api/v1/org/${id}`, params)
},
delCamera(params,id,id2){
return api.delete(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
getCameraTable(params,id,id2){
console.log(id2)
if(id2){
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
}else{
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
}
},
editVideo(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
addCamera(params,id){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans`, params)
},
editCamera(params,id,id2){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vchans/${id2}`, params)
},
uploadFile(params,id){
return api.post(`${baseUrl}/api/v1/devconf_fx/devs/${id}/vfile_vchans`, params,{'Content-Type': 'multipart/form-data'})
},
getResource(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/status`, params);
},
getDevsName(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/devs/${id}/fx_devs`, params);
},
getStoreConList(params) {
return api.get(`${baseUrl}/api/v1/devconf_fx/store_confs`, params);
},
uploadStore(params) {
return api.post(`${baseUrl}/api/v1/devconf_fx/store_confs`, params, {
"Content-Type": "multipart/form-data"
});
},
getSubTask(params, id) {
return api.get(`${baseUrl}/api/v1/devconf_fx/tasks/${id}/subtasks`, params);
},
delStore(params, id) {
return api.delete(`${baseUrl}/api/v1/devconf_fx/store_confs/${id}`, params);
},
getsip(params, id, id2) {
return api.get(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`,
params
);
},
addSip(params, id, id2) {
return api.post(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/sip_server`,
params
);
},
editSip(params, id, id2, id3) {
return api.post(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`,
params
);
},
delSip(params, id, id2, id3) {
return api.delete(
`${baseUrl}/api/v1/devconf_fx/devs/${id}/${id2}/${id3}/sip_server`,
params
);
}
};