/**
 * 数据上传接口
 */
import request from '@/utils/request'
import qs from 'qs'

// 查询待上传列表
export function getWaitUploadList(params) {
  return request({
    url: '/irisUploadLog/waitUploadList',
    method: 'get',
    params
  })
}
// 查询上传记录
export function getUploadRecords(params) {
  return request({
    url: '/irisUploadLog/records',
    method: 'get',
    params
  })
}
// 查询上传记录详情
export function getRecordsDetail(params) {
  return request({
    url: '/irisUploadLog/detail',
    method: 'get',
    params
  })
}
// 单个上传
export function uploadOneData(params) {
  return request({
    url: '/irisUploadLog/uploadOne',
    method: 'post',
    params
  })
}
// 批量上传
export function uploadBatchData(irIds) {
  return request({
    url: '/irisUploadLog/batchUpload',
    method: 'post',
    params: {
      irIds: irIds
    },
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false })
    }
  })
}
