import request from '@/utils/request'

// 查询培训成绩列表
export function listTrainingrecords(query) {
  return request({
    url: '/training/trainingrecords/list',
    method: 'get',
    params: query
  })
}

// 查询培训成绩详细
export function getTrainingrecords(id) {
  return request({
    url: '/training/trainingrecords/' + id,
    method: 'get'
  })
}

// 新增培训成绩
export function addTrainingrecords(data) {
  return request({
    url: '/training/trainingrecords',
    method: 'post',
    data: data
  })
}

// 修改培训成绩
export function updateTrainingrecords(data) {
  return request({
    url: '/training/trainingrecords',
    method: 'put',
    data: data
  })
}

// 删除培训成绩
export function delTrainingrecords(id) {
  return request({
    url: '/training/trainingrecords/' + id,
    method: 'delete'
  })
}

// 导出培训成绩
export function exportTrainingrecords(query) {
  return request({
    url: '/training/trainingrecords/export',
    method: 'get',
    params: query
  })
}

// 导出培训时长
export function exportTrainingTime() {
  return request({
    url: '/training/trainingrecords/exportTrainingTime',
    method: 'get',
  })
}
