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