import request from '@/utils/request'

// 查询训练集数据列列表
export function listTrain(query) {
  return request({
    url: '/biz/train/list',
    method: 'get',
    params: query
  })
}

// 查询训练集数据列详细
export function getTrain(id) {
  return request({
    url: '/biz/train/' + id,
    method: 'get'
  })
}

// 新增训练集数据列
export function addTrain(data) {
  return request({
    url: '/biz/train',
    method: 'post',
    data: data
  })
}

// 修改训练集数据列
export function updateTrain(data) {
  return request({
    url: '/biz/train',
    method: 'put',
    data: data
  })
}

// 删除训练集数据列
export function delTrain(id) {
  return request({
    url: '/biz/train/' + id,
    method: 'delete'
  })
}

//由 元器件名称-型号规格-质量等级 得到元器件的id
export function getComponentIds() {
  return request({
    url: '/biz/train/componentIds',
    method: 'get'
  })
}
//训练按钮
export function train() {
  return request({
    url:'/biz/train/train',
    method:'get',

  })
}

export function recommend(recommend_args) {
  return request({
    url: '/biz/train/recommend',
    method: 'post',
    data: recommend_args,

  })
}
