import request from '@/utils/request'

// 查询上岗证一览列表
export function listWorklicense(query) {
  return request({
    url: '/training/worklicense/list',
    method: 'get',
    params: query
  })
}

// 培训成绩调用上岗证
export function listTraining(query) {
  return request({
    url: '/training/worklicense/listWorklicense',
    method: 'get',
    params: query
  })
}

export function licenseData(query) {
  return request({
    url: '/training/worklicense/licenseData',
    method: 'get',
    params: query
  })
}
// 查询上岗证一览详细
export function getWorklicense(id) {
  return request({
    url: '/training/worklicense/' + id,
    method: 'get'
  })
}

// 新增上岗证一览
export function addWorklicense(data) {
  return request({
    url: '/training/worklicense',
    method: 'post',
    data: data
  })
}

// 修改上岗证一览
export function updateWorklicense(data) {
  return request({
    url: '/training/worklicense',
    method: 'put',
    data: data
  })
}

// 删除上岗证一览
export function delWorklicense(id) {
  return request({
    url: '/training/worklicense/' + id,
    method: 'delete'
  })
}

// 导出上岗证一览
export function exportWorklicense(query) {
  return request({
    url: '/training/worklicense/export',
    method: 'get',
    params: query
  })
}
