import request from '@/config/axios'
|
|
export interface ModBusTagVO {
|
id: string
|
tagName: string
|
dataType: string
|
enabled: boolean
|
format: string
|
tag: string
|
address: string
|
samplingRate: number
|
tagDesc: string
|
}
|
|
export interface ModBusTagPageReqVO extends PageParam {
|
tagName?: string
|
address?: string
|
}
|
|
// 查询ModBusTag列表
|
export const getModBusTagPage = (params: ModBusTagPageReqVO) => {
|
return request.get({ url: '/data/channel/modbus/tag/page', params })
|
}
|
|
// 查询ModBusTag详情
|
export const getModBusTag = (id: number) => {
|
return request.get({ url: `/data/channel/modbus/tag/info/${id}`})
|
}
|
|
// 新增ModBusTag
|
export const createModBusTag = (data: ModBusTagVO) => {
|
return request.post({ url: '/data/channel/modbus/tag/create', data })
|
}
|
|
// 修改ModBusTag
|
export const updateModBusTag = (data: ModBusTagVO) => {
|
return request.put({ url: '/data/channel/modbus/tag/update', data })
|
}
|
|
// 删除ModBusTag
|
export const deleteModBusTag = (id: number) => {
|
return request.delete({ url: '/data/channel/modbus/tag/delete?id=' + id })
|
}
|