import request from '@/utils/request'

// 审批阅卷班级列表
export function listTestPaperRecord(query) {
  return request({
    url: '/school-paper/testPaperRecord/getPhaseList',
    method: 'get',
    params: query
  })
}
// 审批阅卷学生列表
export function listgetClassList(query) {
  return request({
    url: '/school-paper/testPaperRecord/getClassList',
    method: 'get',
    params: query
  })
}
// 查询答题记录详细
export function getTestPaperRecord(query) {
  return request({
    url: '/school-paper/testPaperRecordDetail/getStudentAnswerRecordList',
    method: 'get',
    params: query
  })
}

// 新增答题记录
export function addTestPaperRecord(data) {
  return request({
    url: '/school-paper/testPaperRecord',
    method: 'post',
    data: data
  })
}

// 修改答题记录
export function updateTestPaperRecord(data) {
  return request({
    url: '/school-paper/testPaperRecordDetail',
    method: 'put',
    data: data
  })
}
// 批卷完成
// export function completeReadOver(query) {
//   return request({
//     url: '',
//     method: 'get',
//     data: query
//   })
// }
export function completeReadOver(query) {
  return request({
    url: '/school-paper/testPaperRecord/completeReadOver',
    method: 'get',
    params: query
  })
}
// 删除答题记录
export function delTestPaperRecord(id) {
  return request({
    url: '/school-paper/testPaperRecord/' + id,
    method: 'delete'
  })
}
