import request from '@/utils/request'

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

// 查询设备故障详细
export function getAbnormal(abnormalId) {
  return request({
    url: '/ss/abnormal/' + abnormalId,
    method: 'get'
  })
}

// 新增设备故障
export function addAbnormal(data) {
  return request({
    url: '/ss/abnormal',
    method: 'post',
    data: data
  })
}

// 修改设备故障
export function updateAbnormal(data) {
  return request({
    url: '/ss/abnormal',
    method: 'put',
    data: data
  })
}

// 删除设备故障
export function delAbnormal(abnormalId) {
  return request({
    url: '/ss/abnormal/' + abnormalId,
    method: 'delete'
  })
}
