import request from '@/utils/request'

// 查询不良因素清单列表
export function listFactor(query) {
  return request({
    url: '/reliability/factor/list',
    method: 'get',
    params: query
  })
}

// 查询不良因素清单详细
export function getFactor(id) {
  return request({
    url: '/reliability/factor/' + id,
    method: 'get'
  })
}

// 新增不良因素清单
export function addFactor(data) {
  return request({
    url: '/reliability/factor',
    method: 'post',
    data: data
  })
}

// 修改不良因素清单
export function updateFactor(data) {
  return request({
    url: '/reliability/factor',
    method: 'put',
    data: data
  })
}

// 删除不良因素清单
export function delFactor(id) {
  return request({
    url: '/reliability/factor/' + id,
    method: 'delete'
  })
}

// 导出不良因素清单
export function exportFactor(query) {
  return request({
    url: '/reliability/factor/export',
    method: 'get',
    params: query
  })
}