import request from '@/utils/request'

// 查询风险矩阵数据
export function riskMatrixData() {
  return request({
    url: '/reliability/analysis/riskMatrixData',
    method: 'get'
  })
}

// 查询定性分析列表
export function listAnalysis(query) {
  return request({
    url: '/reliability/analysis/list',
    method: 'get',
    params: query
  })
}

// 查询定性分析详细
export function getAnalysis(id) {
  return request({
    url: '/reliability/analysis/' + id,
    method: 'get'
  })
}

// 新增定性分析
export function addAnalysis(data) {
  return request({
    url: '/reliability/analysis',
    method: 'post',
    data: data
  })
}

// 修改定性分析
export function updateAnalysis(data) {
  return request({
    url: '/reliability/analysis',
    method: 'put',
    data: data
  })
}

// 删除定性分析
export function delAnalysis(id) {
  return request({
    url: '/reliability/analysis/' + id,
    method: 'delete'
  })
}

// 导出定性分析
export function exportAnalysis(query) {
  return request({
    url: '/reliability/analysis/export',
    method: 'get',
    params: query
  })
}
