import request from '@/utils/request'

// 查询装置风险清单列表
export function listRisk(query) {
  return request({
    url: '/reliability/risk/list',
    method: 'get',
    params: query
  })
}

// 查询装置风险清单详细
export function getRisk(id) {
  return request({
    url: '/reliability/risk/' + id,
    method: 'get'
  })
}

// 新增装置风险清单
export function addRisk(data) {
  return request({
    url: '/reliability/risk',
    method: 'post',
    data: data
  })
}

// 修改装置风险清单
export function updateRisk(data) {
  return request({
    url: '/reliability/risk',
    method: 'put',
    data: data
  })
}

// 删除装置风险清单
export function delRisk(id) {
  return request({
    url: '/reliability/risk/' + id,
    method: 'delete'
  })
}

// 导出装置风险清单
export function exportRisk(query) {
  return request({
    url: '/reliability/risk/export',
    method: 'get',
    params: query
  })
}