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
import {ELINE_ADMQ, ELINE_QUERY,ELINE_DEVICE, REQUEST_CONFIG, TUNNEL_ADMQ, TUNNEL_BANDWIDTH} from "../../../utils/RequestUrls";
import Axios from 'axios'
var staticMethods = {
//获取所有Eline(待测试及确认)
getElineCollection: function(){
return Axios.get(ELINE_ADMQ);
},
//新增Eline(待测试及确认)
postElineAdd:function (eline) {
return Axios.post(ELINE_ADMQ, eline, REQUEST_CONFIG);
},
//修改Eline(待测试及确认)
putElineUpdate:function (eline) {
return Axios.put(ELINE_ADMQ, eline, REQUEST_CONFIG);
},
//删除Eline(待测试及确认)
deleteElineDelete:function (elineKeyList) {
return Axios.delete(ELINE_ADMQ,{
data:elineKeyList,
headers:{'Content-Type':'application/json','Encoding':'utf-8'}
});
},
//条件查询Eline(待测试及确认)
getElineByCondition:function (selectList) {
return Axios.put(ELINE_QUERY, selectList, REQUEST_CONFIG);
},
//获取设备列表(待测试及确认)
getElineDeviceList:function (serviceTypeID) {
return Axios.put(ELINE_DEVICE + '/' + serviceTypeID);
},
//获取所有路由路径
getTunnelCollection:function () {
return Axios.get(TUNNEL_ADMQ);
},
//获取业务路由路径
getServiceTunnelCollection:function (vpnid) {
return Axios.get(TUNNEL_ADMQ + '/' + vpnid);
},
//获取所有路由路径new
getTunnelBandwidthCollection:function () {
return Axios.get(TUNNEL_BANDWIDTH);
},
}
function ElineAPI (websocketService = null) {
return Object.freeze(Object.assign(
{
// object methods comes here
},
staticMethods
))
}
// inject static methods
Object.assign(ElineAPI, staticMethods);
export default ElineAPI