提交 | 用户 | 时间
|
b05c43
|
1 |
import request from '@/config/axios' |
潘 |
2 |
|
|
3 |
export interface ModBusTagVO { |
|
4 |
id: string |
|
5 |
tagName: string |
|
6 |
dataType: string |
|
7 |
enabled: boolean |
|
8 |
format: string |
|
9 |
tag: string |
|
10 |
address: string |
|
11 |
samplingRate: number |
|
12 |
tagDesc: string |
|
13 |
} |
|
14 |
|
|
15 |
export interface ModBusTagPageReqVO extends PageParam { |
|
16 |
tagName?: string |
|
17 |
address?: string |
|
18 |
} |
|
19 |
|
|
20 |
// 查询ModBusTag列表 |
|
21 |
export const getModBusTagPage = (params: ModBusTagPageReqVO) => { |
|
22 |
return request.get({ url: '/data/channel/modbus/tag/page', params }) |
|
23 |
} |
|
24 |
|
|
25 |
// 查询ModBusTag详情 |
|
26 |
export const getModBusTag = (id: number) => { |
|
27 |
return request.get({ url: `/data/channel/modbus/tag/info/${id}`}) |
|
28 |
} |
|
29 |
|
|
30 |
// 新增ModBusTag |
|
31 |
export const createModBusTag = (data: ModBusTagVO) => { |
|
32 |
return request.post({ url: '/data/channel/modbus/tag/create', data }) |
|
33 |
} |
|
34 |
|
|
35 |
// 修改ModBusTag |
|
36 |
export const updateModBusTag = (data: ModBusTagVO) => { |
|
37 |
return request.put({ url: '/data/channel/modbus/tag/update', data }) |
|
38 |
} |
|
39 |
|
|
40 |
// 删除ModBusTag |
|
41 |
export const deleteModBusTag = (id: number) => { |
|
42 |
return request.delete({ url: '/data/channel/modbus/tag/delete?id=' + id }) |
|
43 |
} |
d23859
|
44 |
|
J |
45 |
//导出ModBusTag |
|
46 |
export const exportModBusTag = (params) => { |
|
47 |
return request.download({ url: '/data/channel/modbus/tag/export', params }) |
|
48 |
} |
|
49 |
|
|
50 |
// 下载用户导入模板 |
|
51 |
export const importModBusTagTemplate = () => { |
|
52 |
return request.download({ url: '/data/channel/modbus/tag/get-import-template' }) |
|
53 |
} |