You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.1 KiB
TypeScript
63 lines
2.1 KiB
TypeScript
import request from '@/config/axios'
|
|
|
|
// 采集设备模型-点位管理 VO
|
|
export interface DeviceModelAttributeVO {
|
|
id: number // ID
|
|
attributeCode: string // 点位编码
|
|
attributeName: string // 点位名称
|
|
attributeType: string // 点位类型
|
|
dataType: string // 数据类型
|
|
address: string // 寄存器地址
|
|
dataUnit: string // 单位
|
|
ratio: number // 倍率
|
|
remark: string // 备注
|
|
deviceModelId: number // 采集设备模型id
|
|
}
|
|
|
|
// 采集设备模型-点位管理 API
|
|
export const DeviceModelAttributeApi = {
|
|
// 查询采集设备模型-点位管理分页
|
|
getDeviceModelAttributePage: async (params: any) => {
|
|
return await request.get({ url: `/iot/device-model-attribute/page`, params })
|
|
},
|
|
|
|
// 查询采集设备模型-点位管理列表(当前设备模型下的点位)
|
|
getDeviceModelAttributeList: async (id: number) => {
|
|
return await request.get({ url: `/iot/device-model-attribute/list`, params: { id } })
|
|
},
|
|
|
|
// 查询采集设备模型-点位管理详情
|
|
getDeviceModelAttribute: async (id: number) => {
|
|
return await request.get({ url: `/iot/device-model-attribute/get?id=` + id })
|
|
},
|
|
|
|
// 新增采集设备模型-点位管理
|
|
createDeviceModelAttribute: async (data) => {
|
|
return await request.post({ url: `/iot/device-model-attribute/create`, data })
|
|
},
|
|
|
|
// 修改采集设备模型-点位管理
|
|
updateDeviceModelAttribute: async (data) => {
|
|
return await request.put({ url: `/iot/device-model-attribute/update`, data })
|
|
},
|
|
|
|
// 删除采集设备模型-点位管理
|
|
deleteDeviceModelAttribute: async (ids: string) => {
|
|
return await request.delete({ url: `/iot/device-model-attribute/delete?ids=` + ids })
|
|
},
|
|
|
|
// 导出采集设备模型-点位管理 Excel
|
|
exportDeviceModelAttribute: async (params) => {
|
|
return await request.download({ url: `/iot/device-model-attribute/export-excel`, params })
|
|
},
|
|
|
|
operationAnalysisDetails: async (params: {
|
|
deviceId: number
|
|
modelId?: number
|
|
collectionStartTime?: string
|
|
collectionEndTime?: string
|
|
}) => {
|
|
return await request.get({ url: `/iot/device-model-attribute/operationAnalysisDetails`, params })
|
|
}
|
|
}
|