初始代码
This commit is contained in:
62
yawei-mes/mes-ui/src/api/mes/iot/iotDevice.js
Normal file
62
yawei-mes/mes-ui/src/api/mes/iot/iotDevice.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询设备配置列表
|
||||
export function listIotDeviceConfig(query) {
|
||||
return request({
|
||||
url: '/mes/iot/config/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备基础信息详情
|
||||
export function getIotDeviceConfig(id) {
|
||||
return request({
|
||||
url: '/mes/iot/config/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备数据列表
|
||||
export function listIotDeviceData(query) {
|
||||
return request({
|
||||
url: '/mes/iot/data/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增设备配置
|
||||
export function addIotDeviceConfig(data) {
|
||||
return request({
|
||||
url: '/mes/iot/config',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改设备配置
|
||||
export function updateIotDeviceConfig(data) {
|
||||
return request({
|
||||
url: '/mes/iot/config',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除设备配置
|
||||
export function delIotDeviceConfig(id) {
|
||||
return request({
|
||||
url: '/mes/iot/config/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备数据详情
|
||||
export function getIotDeviceData(id) {
|
||||
return request({
|
||||
url: '/mes/iot/data/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
36
yawei-mes/mes-ui/src/api/mes/iot/iotTrend.js
Normal file
36
yawei-mes/mes-ui/src/api/mes/iot/iotTrend.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取设备列表(下拉选择用)
|
||||
export function getDeviceList() {
|
||||
return request({
|
||||
url: '/mes/iot/trend/deviceList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取设备参数列表(通道配置)
|
||||
export function getParamList(iotDeviceId) {
|
||||
return request({
|
||||
url: '/mes/iot/trend/paramList',
|
||||
method: 'get',
|
||||
params: { iotDeviceId }
|
||||
})
|
||||
}
|
||||
|
||||
// 获取趋势数据
|
||||
export function getTrendData(params) {
|
||||
return request({
|
||||
url: '/mes/iot/trend/data',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询IOT数据列表
|
||||
export function listIotData(query) {
|
||||
return request({
|
||||
url: '/mes/iot/trend/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
80
yawei-mes/mes-ui/src/api/mes/iot/labview.js
Normal file
80
yawei-mes/mes-ui/src/api/mes/iot/labview.js
Normal file
@@ -0,0 +1,80 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询IOT Labview数据库配置列表
|
||||
export function listLabview(query) {
|
||||
return request({
|
||||
url: '/iot/labview/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询IOT Labview数据库配置详细
|
||||
export function getLabview(id) {
|
||||
return request({
|
||||
url: '/iot/labview/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据设备ID查询配置
|
||||
export function getLabviewByDeviceId(iotDeviceId) {
|
||||
return request({
|
||||
url: '/iot/labview/device/' + iotDeviceId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取目标表配置
|
||||
export function getTargetTable(id) {
|
||||
return request({
|
||||
url: '/iot/labview/targetTable/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增IOT Labview数据库配置
|
||||
export function addLabview(data) {
|
||||
return request({
|
||||
url: '/iot/labview',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改IOT Labview数据库配置
|
||||
export function updateLabview(data) {
|
||||
return request({
|
||||
url: '/iot/labview',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除IOT Labview数据库配置
|
||||
export function delLabview(ids) {
|
||||
return request({
|
||||
url: '/iot/labview/' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 测试数据库连接
|
||||
export function testConnection(data) {
|
||||
return request({
|
||||
url: '/iot/labview/testConnection',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 导出IOT Labview数据库配置
|
||||
export function exportLabview(query) {
|
||||
return request({
|
||||
url: '/iot/labview/export',
|
||||
method: 'post',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user