提交 | 用户 | 时间
|
203fd3
|
1 |
import request from '@/config/axios' |
潘 |
2 |
|
|
3 |
export interface ModBusDeviceVO { |
|
4 |
id: string |
|
5 |
name: string |
|
6 |
address: string |
|
7 |
port: number |
|
8 |
connectInactivityTimeout: number |
|
9 |
reconnectInterval: number |
|
10 |
attemptsBeforeTimeout: number |
|
11 |
waitToRetryMilliseconds: number |
|
12 |
readTimeout: number |
|
13 |
writeTimeout: number |
|
14 |
useOptimizedBlockRead: boolean |
|
15 |
projectReference: string |
|
16 |
} |
|
17 |
|
|
18 |
export interface ModBusDevicePageReqVO extends PageParam { |
|
19 |
name?: string |
|
20 |
address?: string |
|
21 |
} |
|
22 |
|
|
23 |
// 查询ModBusDevice列表 |
|
24 |
export const getModBusDevicePage = (params: ModBusDevicePageReqVO) => { |
|
25 |
return request.get({ url: '/data/channel/modbus/device/page', params }) |
|
26 |
} |
|
27 |
|
|
28 |
// 查询ModBusDevice详情 |
|
29 |
export const getModBusDevice = (id: number) => { |
|
30 |
return request.get({ url: `/data/channel/modbus/device/info/${id}`}) |
|
31 |
} |
|
32 |
|
|
33 |
// 新增ModBusDevice |
|
34 |
export const createModBusDevice = (data: ModBusDeviceVO) => { |
b05c43
|
35 |
return request.post({ url: '/data/channel/modbus/device/create', data }) |
203fd3
|
36 |
} |
潘 |
37 |
|
|
38 |
// 修改ModBusDevice |
|
39 |
export const updateModBusDevice = (data: ModBusDeviceVO) => { |
|
40 |
return request.put({ url: '/data/channel/modbus/device/update', data }) |
|
41 |
} |
|
42 |
|
|
43 |
// 删除ModBusDevice |
|
44 |
export const deleteModBusDevice = (id: number) => { |
|
45 |
return request.delete({ url: '/data/channel/modbus/device/delete?id=' + id }) |
|
46 |
} |