import request from '@/utils/request'

// 查询传感器列表
export function listSensor(query) {
  return request({
    url: '/laboratory/sensor/list',
    method: 'get',
    params: query
  })
}

// 查询传感器下拉列表
export function optionSensor(data) {
  return request({
    url: '/laboratory/sensor/getFunList',
    method: 'post',
    data: data
  })
}



// 查询传感器详细
export function getSensor(id) {
  return request({
    url: '/laboratory/sensor/' + id,
    method: 'get'
  })
}

// 新增传感器
export function addSensor(data) {
  return request({
    url: '/laboratory/sensor',
    method: 'post',
    data: data
  })
}

// 修改传感器
export function updateSensor(data) {
  return request({
    url: '/laboratory/sensor',
    method: 'put',
    data: data
  })
}

// 删除传感器
export function delSensor(id) {
  return request({
    url: '/laboratory/sensor/' + id,
    method: 'delete'
  })
}


// 查询传感器列表
export function getSensorList() {
  return request({
    url: '/laboratory/sensor/getSensorList',
    method: 'get'
  })
}
