180 lines
4.3 KiB
JavaScript
180 lines
4.3 KiB
JavaScript
import request from '@/utils/request';
|
|
|
|
/** 裁判退出仿真*/
|
|
export function refereeExitSimulation(group) {
|
|
return request({
|
|
url: `/api/v1/competition/room/${group}/refree`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
/** 裁判进入仿真 */
|
|
export function refereeEnterSimulation(group) {
|
|
return request({
|
|
url: `/api/v1/competition/room/${group}/refree`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
/** 裁判查询竞赛人员的房间列表 */
|
|
export function refereeGetCompetitionList(id) {
|
|
return request({
|
|
url: `/api/v1/competition/${id}/room`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 参赛者创建演练房间 */
|
|
export function participantCreatTrainingRoom(id, data) {
|
|
return request({
|
|
url: `/api/v1/competition/${id}/room`,
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
/** 参赛者完成竞赛 */
|
|
export function participantCompleteCompetition(id, group) {
|
|
return request({
|
|
url: `/api/v1/competition/${id}/room/${group}`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
|
|
/** 分页获取地图下的实操列表 */
|
|
export function getQuestionListByMapId(params) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
// 加载试卷
|
|
export function loadingPaper(competitionId, data) {
|
|
return request({
|
|
url: `/api/v1/competition/${competitionId}/testPaper`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
/** 竞赛报名 */
|
|
export function postSignUp(id, data) {
|
|
return request({
|
|
url: `/api/race/${id}/signUp`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 查询用户是否已经报名该竞赛 */
|
|
export function getIsSignUp(raceId, params = {}) {
|
|
return request({
|
|
url: `/api/race/${raceId}/isSignUp`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 分页查询竞赛报名人员 */
|
|
export function getRaceUserList(params) {
|
|
return request({
|
|
url: `/api/race/${params.raceId}/raceUser/page`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 裁判打分 */
|
|
export function putRefereeScoring(data) {
|
|
return request({
|
|
url: `/api/v1/competition/referee/scoring`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 提交试卷 */
|
|
export function postCompetitionTheory(data) {
|
|
return request({
|
|
url: `/api/v1/competitionTheory/submit`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 查询本竞赛用的实操列表 */
|
|
export function getCompetitionPractical(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/competition/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 查询竞赛报名人员详情 */
|
|
export function getRaceUserById(raceId) {
|
|
return request({
|
|
url: `/api/race/${raceId}/raceUser`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 查询加载的实操题 */
|
|
export function getPracticalQuestion(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/competition/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 查询加载的理论题 */
|
|
export function getTheoryQuestion(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionTheory/competition/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 查询理论题作答详情 */
|
|
export function getCompetitionDetail(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionTheory/detail/competition/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 根据id查询竞赛信息 */
|
|
export function getRaceById(id) {
|
|
return request({
|
|
url: `/api/race/${id}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 退出当前赛场 */
|
|
export function quitCurrentRace(id, params) {
|
|
return request({
|
|
url: `/api/v1/competition/${id}/room`,
|
|
method: 'delete',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 查看加载的竞赛试题 */
|
|
export function getTestPaperDatail(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competition/${competitionId}/testPaper`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 提交实操结果 */
|
|
export function submitPracticalCompetition(group, competitionId, data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
|
|
method: 'put',
|
|
data
|
|
});
|
|
}
|
|
/** 开始实操竞赛 */
|
|
export function startPracticalCompetition(group, competitionId, data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${group}/${competitionId}/start`
|
|
});
|
|
}
|