import request from '@/utils/request'

// 学习任务-列表
export function getLearningList(query) {
  return request({
    url: '/exam/learningTask/learningList',
    method: 'get',
    params: query
  })
}

// 学习任务-状态数量
export function getStudyTaskStatusNum(query) {
  return request({
    url: '/exam/learningTask/getStudyTaskStatusNum',
    method: 'get',
    params: query
  })
}

// 学习任务-详情
export function getLearningDetails(query) {
  return request({
    url: '/exam/learningTask/learningDetailsHeader',
    method: 'get',
    params: query
  })
}

// 学习任务-课件列表
export function getLearningFileList(query) {
  return request({
    url: '/exam/learningTask/learningFileList',
    method: 'get',
    params: query
  })
}

// 更新学习进度
export function updateProgress(data) {
  return request({
    url: '/exam/learningTask/updateWebProgress',
    method: 'post',
    data
  })
}

// 学习任务-练习题目/考试题目
export function getWebQuestion(data) {
  return request({
    url: '/exam/learningTask/getWebQuestion',
    method: 'get',
    params: data
  })
}

// 提交练习-学习任务练习
export function updateQuestionAnswer(data) {
  return request({
    url: '/exam/learningTask/updateQuestionAnswer',
    method: 'post',
    data
  })
}

// 自主练习-列表
export function getSelfDirectedExerciseList(query) {
  return request({
    url: '/exam/webAutoPractice/selfDirectedExerciseList',
    method: 'get',
    params: query
  })
}

// 自主练习-题目
export function getWebTestQuestion(data) {
  return request({
    url: '/exam/webAutoPractice/getWebTestQuestion',
    method: 'get',
    params: data
  })
}

// 自主练习-提交
export function wenEndPractice(data) {
  return request({
    url: '/exam/webAutoPractice/wenEndPractice',
    method: 'post',
    data
  })
}

// 学习任务-考试-列表
export function getMyWebExamList(data) {
  return request({
    url: '/exam/webAutoPractice/myWebExamList',
    method: 'get',
    params: data
  })
}

// 考试任务-状态数量
export function getWebExamStatusCount(data) {
  return request({
    url: '/exam/webAutoPractice/getWebExamStatusCount',
    method: 'get',
    params: data
  })
}

// 考试任务-题目
export function getWebExamQuestion(data) {
  return request({
    url: '/exam/webAutoPractice/getWebExamQuestion',
    method: 'get',
    params: data
  })
}

// 考试任务-提交
export function webSubmitAnswer(data) {
  return request({
    url: '/exam/webAutoPractice/webSubmitAnswer',
    method: 'post',
    data
  })
}

// 学习任务-考试-详情
export function getWebQuestionDetail(data) {
  return request({
    url: '/exam/learningTask/getWebQuestionDetail',
    method: 'get',
    params: data
  })
}

// 培训任务-列表
export function getMyTrainingList(query) {
  return request({
    url: '/exam/learningTask/myTrainingList',
    method: 'get',
    params: query
  })
}

// 培训任务-签到
export function webTrainingSign(data) {
  return request({
    url: '/exam/learningTask/webTrainingSign',
    method: 'post',
    data
  })
}

// 培训任务-详情
export function webTrainingDetail(data) {
  return request({
    url: '/exam/learningTask/webTrainingDetail',
    method: 'get',
    params: data
  })
}