import request from '@/utils/request'

// 查询培训矩阵列表
export function listMatrix(query) {
  return request({
    url: '/training/matrix/list',
    method: 'get',
    params: query
  })
}

// 查询培训矩阵详细
export function getMatrix(id) {
  return request({
    url: '/training/matrix/' + id,
    method: 'get'
  })
}

// 新增培训矩阵
export function addMatrix(data) {
  return request({
    url: '/training/matrix',
    method: 'post',
    data: data
  })
}

// 批量新增装置培训计划
export function batchAddTraining(id) {
  return request({
    url: '/training/matrix/batchAddTraining/' + id,
    method: 'get'
  })
}

// 批量新增装置培训计划
export function batchAddCompany(id) {
  return request({
    url: '/training/matrix/batchAddCompany/' + id,
    method: 'get'
  })
}


// 修改培训矩阵
export function updateMatrix(data) {
  return request({
    url: '/training/matrix',
    method: 'put',
    data: data
  })
}

// 删除培训矩阵
export function delMatrix(id) {
  return request({
    url: '/training/matrix/' + id,
    method: 'delete'
  })
}

// 导出培训矩阵
export function exportMatrix(query) {
  return request({
    url: '/training/matrix/export',
    method: 'get',
    params: query
  })
}
