import request from '@/utils/request'

// 查询结束的故障管理跟踪列表
export function listFinish(query) {
  return request({
    url: '/reliability/finish/list',
    method: 'get',
    params: query
  })
}

// 优先级统计
export function priorityData(query) {
  return request({
    url: '/reliability/finish/priorityData',
    method: 'get',
    params: query
  })
}

// 专业统计
export function disciplineData(query) {
  return request({
    url: '/reliability/finish/disciplineData',
    method: 'get',
    params: query
  })
}

// 阶段统计
export function stepData(query) {
  return request({
    url: '/reliability/finish/stepData',
    method: 'get',
    params: query
  })
}

// 查询结束的故障管理跟踪详细
export function getFinish(id) {
  return request({
    url: '/reliability/finish/' + id,
    method: 'get'
  })
}

// 新增结束的故障管理跟踪
export function addFinish(data) {
  return request({
    url: '/reliability/finish',
    method: 'post',
    data: data
  })
}

//跟踪提交故障管理跟踪
export function insertList(id) {
  return request({
    url: '/reliability/finish/insert/' + id,
    method: 'get',
  })
}

// 修改结束的故障管理跟踪
export function updateFinish(data) {
  return request({
    url: '/reliability/finish',
    method: 'put',
    data: data
  })
}

// 删除结束的故障管理跟踪
export function delFinish(id) {
  return request({
    url: '/reliability/finish/' + id,
    method: 'delete'
  })
}

// 导出结束的故障管理跟踪
export function exportFinish(query) {
  return request({
    url: '/reliability/finish/export',
    method: 'get',
    params: query
  })
}
