rt-sim-training-client/src/api/management/userexam.js

77 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-07-25 10:30:30 +08:00
import request from '@/utils/request';
2019-09-04 19:06:55 +08:00
/** 获取用户试题列表*/
2019-07-25 10:30:30 +08:00
export function generateExamList(examId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${examId}/generate`,
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 刷新考题列表*/
export function refreshExamList(userExamId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${userExamId}`,
method: 'get'
});
2019-07-25 10:30:30 +08:00
}
/** 提交一个考题*/
export function finishOneExamQuestion(data) {
2019-08-08 14:32:32 +08:00
return request({
url: '/api/userExam/finish',
method: 'put',
data: data
});
2019-07-25 10:30:30 +08:00
}
/** 考试完成提交*/
export function submitExam(examId) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${examId}/submit`,
method: 'put'
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 获取用户考试列表*/
2019-07-25 10:30:30 +08:00
export function getPublishExam(data) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/list`,
method: 'get',
params: data
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 删除用户考试*/
2019-07-25 10:30:30 +08:00
export function delPublishExam(id) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${id}`,
method: 'delete'
});
2019-07-25 10:30:30 +08:00
}
2019-08-08 14:32:32 +08:00
/** 删除用户实训*/
2019-07-25 10:30:30 +08:00
export function delTrainingList() {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/list`,
method: 'delet'
});
2019-07-25 10:30:30 +08:00
}
/** 设置试卷失效 */
export function setExamGive(id) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${id}/abandon`,
method: 'put'
});
2019-07-25 10:30:30 +08:00
}
export function updateExam(data) {
2019-08-08 14:32:32 +08:00
return request({
url: `/api/userExam/${data.id}`,
method: 'put',
data: data
});
}