import request from '@/utils/request'

// 查询培训计划列表
export function listTraining(query) {
  return request({
    url: '/training/training/list',
    method: 'get',
    params: query
  })
}

// 查询培训计划详细
export function getTraining(id) {
  return request({
    url: '/training/training/' + id,
    method: 'get'
  })
}

// 新增培训计划
export function addTraining(data) {
  return request({
    url: '/training/training',
    method: 'post',
    data: data
  })
}

// 修改培训计划
export function updateTraining(data) {
  return request({
    url: '/training/training',
    method: 'put',
    data: data
  })
}

// 删除培训计划
export function delTraining(id) {
  return request({
    url: '/training/training/' + id,
    method: 'delete'
  })
}

// 导出培训计划
export function exportTraining(query) {
  return request({
    url: '/training/training/export',
    method: 'get',
    params: query
  })
}