import request from '@/utils/request'

// 查询打分算法验证任务列表
export function listScoretask(query) {
  return request({
    url: '/biz/scoretask/list',
    method: 'get',
    params: query
  })
}

// 查询打分算法验证任务详细
export function getScoretask(id) {
  return request({
    url: '/biz/scoretask/' + id,
    method: 'get'
  })
}

// 新增打分算法验证任务
export function addScoretask(data) {
  return request({
    url: '/biz/scoretask',
    method: 'post',
    data: data
  })
}

// 修改打分算法验证任务
export function updateScoretask(data) {
  return request({
    url: '/biz/scoretask',
    method: 'put',
    data: data
  })
}

// 删除打分算法验证任务
export function delScoretask(id) {
  return request({
    url: '/biz/scoretask/' + id,
    method: 'delete'
  })
}

export function verification(taskid) {
  return request({
    url: '/biz/scoretaskdetail/verification',
    method: 'get',
    params: { taskid: taskid }
  })
}
export function getTraindataset(scorequery){
  return request({
    url:'/biz/score/list',
    method:'get',
    params: scorequery
  })
}

// 更新验证任务详情
export function updateDetails(dataset) {
  return request({
    url: '/biz/scoretaskdetail/updateDetails',
    method: 'post',
    data: dataset,

  })
}

//得到运行验证任务详情
export function getUpdatedDetails(taskids,pageNum,pageSize){
  return request({
    url:`/biz/scoretaskdetail/getUpdatedDetails?pageNum=${pageNum}&pageSize=${pageSize}`,
    method:'post',
    data: taskids,
  })
}

