import request from '@/config/axios'
|
|
export interface OpcuaTagVO {
|
id: string
|
device: string
|
tagName: string
|
dataType: string
|
enabled: boolean
|
address: string
|
samplingRate: number
|
}
|
|
export interface OpcuaTagPageReqVO extends PageParam {
|
device?: string
|
tagName?: string
|
}
|
|
// 查询OpcuaTag列表
|
export const getOpcuaTagPage = (params: OpcuaTagPageReqVO) => {
|
return request.get({ url: '/data/channel/opcua/tag/page', params })
|
}
|
|
// 查询OpcuaTag详情
|
export const getOpcuaTag = (id: number) => {
|
return request.get({ url: `/data/channel/opcua/tag/info/${id}`})
|
}
|
|
// 新增OpcuaTag
|
export const createOpcuaTag = (data: OpcuaTagVO) => {
|
return request.post({ url: '/data/channel/opcua/tag/create', data })
|
}
|
|
// 修改OpcuaTag
|
export const updateOpcuaTag = (data: OpcuaTagVO) => {
|
return request.put({ url: '/data/channel/opcua/tag/update', data })
|
}
|
|
// 删除OpcuaTag
|
export const deleteOpcuaTag = (id: number) => {
|
return request.delete({ url: '/data/channel/opcua/tag/delete?id=' + id })
|
}
|
|
//导出OpcdaTag
|
export const exportOpcUaTag = (params) => {
|
return request.download({ url: '/data/channel/opcua/tag/export', params })
|
}
|
|
// 下载用户导入模板
|
export const importOpcUaTagTemplate = () => {
|
return request.download({ url: '/data/channel/opcua/tag/get-import-template' })
|
}
|