import request from '@/utils/request'

// 查询异常设备列表
export function listAbnormal(query) {
  return request({
    url: '/laboratory/abnormal/list',
    method: 'get',
    params: query
  })
}

// 查询异常设备详细
export function getAbnormal(id) {
  return request({
    url: '/laboratory/abnormal/' + id,
    method: 'get'
  })
}

// 新增异常设备
export function addAbnormal(data) {
  return request({
    url: '/laboratory/abnormal',
    method: 'post',
    data: data
  })
}

// 修改异常设备
export function updateAbnormal(data) {
  return request({
    url: '/laboratory/abnormal',
    method: 'put',
    data: data
  })
}

// 删除异常设备
export function delAbnormal(id) {
  return request({
    url: '/laboratory/abnormal/' + id,
    method: 'delete'
  })
}

// 查询设备列表
export function getEquipmentList(query) {
  return request({
    url: '/laboratory/abnormal/getEquipmentList',
    method: 'get',
    params: query
  })
}


// 删除设备和异常信息
export function delEquipment(query) {
  return request({
    url: '/laboratory/abnormal/delEquipment',
    method: 'delete',
    params: query
  })
}

// 查询设备列表
export function getAbnormalCount(query) {
  return request({
    url: '/laboratory/abnormal/getAbnormalCount',
    method: 'get',
    params: query
  })
}

