126 lines
2.6 KiB
JavaScript
126 lines
2.6 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 新增设备
|
|
export function addDeviceInfoApi(data) {
|
|
return request({
|
|
url: '/material/iotMachine/addOrUpdate',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
// 获取设备列表
|
|
export function getDeviceListApi(query) {
|
|
return request({
|
|
url: '/material/iotMachine/getIotList',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
// 查询绑定记录
|
|
export function getDeviceBindRecordApi(query) {
|
|
return request({
|
|
url: '/material/iotMachine/getRecordList',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
// 解绑设备
|
|
export function unbindDeviceApi(data) {
|
|
return request({
|
|
url: '/material/iotMachine/unbind ',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
// 删除设备
|
|
export function deleteDeviceApi(id) {
|
|
return request({
|
|
url: `/material/iotMachine/deleteById/${id}`,
|
|
method: 'delete',
|
|
|
|
})
|
|
}
|
|
|
|
/**
|
|
* *****
|
|
*/
|
|
// 新增或修改IOT
|
|
export function addOrUpdate(data) {
|
|
return request({
|
|
url: '/material/iotMachine/addOrUpdate',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
// IOT列表
|
|
export function getIotList(params = {}) {
|
|
return request({
|
|
url: '/material/iotMachine/getIotList',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 删除IOT /iotMachine/deleteById/{iotId}
|
|
export function deleteIotById(params) {
|
|
return request({
|
|
url: '/material/iotMachine/deleteById/' + params,
|
|
method: 'delete',
|
|
})
|
|
}
|
|
|
|
// IOT下拉列表 /iotMachine/selectList
|
|
export function selectList(params = {}) {
|
|
return request({
|
|
url: '/material/iotMachine/selectList',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 绑定IOT /iotMachine/bind
|
|
export function bindIot(data) {
|
|
return request({
|
|
url: '/material/iotMachine/bind',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
// 解绑IOT /iotMachine/unbind
|
|
export function unbindIot(data) {
|
|
return request({
|
|
url: '/material/iotMachine/unbind',
|
|
method: 'post',
|
|
data,
|
|
})
|
|
}
|
|
|
|
// 获取绑定IOT列表 /iotMachine/getTypeList
|
|
export function getTypeList(params = {}) {
|
|
return request({
|
|
url: '/material/iotMachine/getTypeList',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 绑定详情 /iotMachine/getRecordList
|
|
export function getRecordList(params = {}) {
|
|
return request({
|
|
url: '/material/iotMachine/getRecordList',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|
|
|
|
// 所有绑定详情 /iotMachine/getRecordListAll
|
|
export function getRecordListAll(params = {}) {
|
|
return request({
|
|
url: '/material/iotMachine/getRecordListAll',
|
|
method: 'get',
|
|
params,
|
|
})
|
|
}
|