import request from '@/utils/request'

// 查询 ROUND
export function getRound(params) {
  return request({
    url: '/front/elective/classes/round',
    method: 'get',
    params
  })
}

// 查询分班配置
export function getSettings(params) {
  return request({
    url: '/front/elective/classes/settings',
    method: 'get',
    params
  })
}

// 保存分班配置
export function saveSettings(query,data) {
  return request({
    url: '/front/elective/classes/settings',
    method: 'post',
    params: query,
    data: data
  })
}

// 应用分班配置
export function applySettings(params) {
  return request({
    url: '/front/elective/classes/settings/apply',
    method: 'post',
    params
  })
}

// 分派名单查询
export function classesResult(params) {
  return request({
    url: '/front/elective/classes/result',
    method: 'get',
    params
  })
}

// 分派转移
export function resultDispatch(data) {
  return request({
    url: '/front/elective/classes/result/dispatch',
    method: 'post',
    data
  })
}

// 锁定分班
export function lockDispatch(params) {
  return request({
    url: '/front/elective/classes',
    method: 'post',
    params
  })
}

export function getClass(params) {
  return request({
    url: '/front/elective/classes/list',
    method: 'get',
    params
  })
}

export function getDispatchResult(params) {
  return request({
    url: '/mock/front/report/getDispatchResult',
    method: 'get',
    params
  })
}
