import request from '@/utils/request'

// 查询人员-装置级培训关系列表
export function listDevice(query) {
  return request({
    url: '/training/device/list',
    method: 'get',
    params: query
  })
}

// 查询人员-装置级培训关系矩阵
export function deviceListParticipants(query) {
  return request({
    url: '/training/device/deviceList',
    method: 'get',
    params: query
  })
}

// 查询人员-装置级培训关系详细
export function getDevice(id) {
  return request({
    url: '/training/device/' + id,
    method: 'get'
  })
}

// 新增人员-装置级培训关系
export function addDevice(data) {
  return request({
    url: '/training/device',
    method: 'post',
    data: data
  })
}

// 修改人员-装置级培训关系
export function updateDevice(data) {
  return request({
    url: '/training/device',
    method: 'put',
    data: data
  })
}

// 删除人员-装置级培训关系
export function delDevice(id) {
  return request({
    url: '/training/device/' + id,
    method: 'delete'
  })
}

// 导出人员-装置级培训关系
export function exportDevice(query) {
  return request({
    url: '/training/device/export',
    method: 'get',
    params: query
  })
}
