import request from '@/utils/request'

// 查询故障上报列表
export function listFault(query) {
  return request({
    url: '/system/fault/list',
    method: 'get',
    params: query
  })
}

// 查询故障上报详细
export function getFault(faultId) {
  return request({
    url: '/system/fault/' + faultId,
    method: 'get'
  })
}

// 新增故障上报
export function addFault(data) {
  return request({
    url: '/system/fault',
    method: 'post',
    data: data
  })
}

// 修改故障上报
export function updateFault(data) {
  return request({
    url: '/system/fault',
    method: 'put',
    data: data
  })
}

// 删除故障上报
export function delFault(faultId) {
  return request({
    url: '/system/fault/' + faultId,
    method: 'delete'
  })
}
