210 lines
5.5 KiB
JavaScript
210 lines
5.5 KiB
JavaScript
import request from '@/utils/request';
|
|
|
|
// 以下drts项目使用
|
|
|
|
/** 项目获取试题列表 */
|
|
export function getItemListByProjectCode(projectCode, params) {
|
|
return request({
|
|
url: `api/v1/competitionTheory/project/${projectCode}`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 项目更新练习的试题的进度列表 */
|
|
export function updatePracticeQuestionProgress(projectCode, params) {
|
|
return request({
|
|
url: `/api/questionProgress/project/${projectCode}`,
|
|
method: 'post',
|
|
params
|
|
});
|
|
}
|
|
|
|
/** 项目更新练习的试题的进度列表 */
|
|
export function getPracticeQuestionProgress(projectCode) {
|
|
return request({
|
|
url: `/api/questionProgress/project/${projectCode}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 项目提交试卷 */
|
|
export function submitPracticeQuestionData(projectCode, data) {
|
|
return request({
|
|
url: `/api/v1/competitionTheory/project/${projectCode}/submit`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 获取场景列表 */
|
|
export function getCompetitionPracticalScene(params) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical`,
|
|
method: 'get',
|
|
params: params
|
|
});
|
|
}
|
|
|
|
/** 添加场景 */
|
|
export function addCompetitionPracticalScene(data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 删除场景 */
|
|
export function deleteCompetitionPracticalScene(sceneId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${sceneId}`,
|
|
method: 'delete'
|
|
});
|
|
}
|
|
|
|
/** 更新场景 */
|
|
export function updateCompetitionPracticalScene(data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical`,
|
|
method: 'PUT',
|
|
data
|
|
});
|
|
}
|
|
/** 获取场景 */
|
|
export function getCompetitionPracticalSceneById(id) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/detail/${id}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 更新步骤数据 */
|
|
export function updateCompetitionPracticalStep(data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/detail`,
|
|
method: 'POST',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 加载场景 */
|
|
export function loadCompetitionPracticalScene(group, id) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/load/${group}/${id}`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 场景开始演出 */
|
|
export function competitionPracticalSceneStart(group, memberId, mode) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/start/${group}?memberId=${memberId}&mode=${mode}`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 退出场景 */
|
|
export function competitionPracticalSceneExit(group) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/exit/${group}`,
|
|
method: 'PUT'
|
|
});
|
|
}
|
|
|
|
/** 结束场景 */
|
|
export function competitionPracticalSceneFinish(group, data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/finish/${group}`,
|
|
method: 'PUT',
|
|
data
|
|
});
|
|
}
|
|
|
|
/** 获取空白运营数据 */
|
|
export function getEmptyOperationalStatistics(group) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/detail/os/${group}`,
|
|
method: 'GET'
|
|
});
|
|
}
|
|
|
|
/** 草稿场景数据导入*/
|
|
export function postSceneImport(scriptId, name, data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${scriptId}/import?name=${name}`,
|
|
method: 'post',
|
|
data: data,
|
|
time: 60000
|
|
});
|
|
}
|
|
|
|
/** 草稿场景数据导出 */
|
|
export function getSceneExport(id) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/${id}/export`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
|
|
/** 查询国赛剧本权限 */
|
|
export function queryCompetitionPracticalPermissions(params) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/query/permissions`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
}
|
|
/** 国赛获取支付二维码 */
|
|
export function getPayQrCode(mapId, monthAmount) {
|
|
return request( {
|
|
url: `/api/v1/competitionPractical/purchasePermission?mapId=${mapId}&monthAmount=${monthAmount}`,
|
|
method: 'post'
|
|
});
|
|
}
|
|
/** 场景语音训练上传录音文件 */
|
|
export function uploadAudioFilesInSence(competitionId, cmdEvaRuleId, actionId, file) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/${competitionId}/${cmdEvaRuleId}/${actionId}`,
|
|
method: 'post',
|
|
data: file
|
|
});
|
|
}
|
|
/** 场景语音训练更新录音文件 */
|
|
export function updateAuidoFilesInSence( recordId, file) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/${recordId}`,
|
|
method: 'put',
|
|
data: file
|
|
});
|
|
}
|
|
/** 查询语音录制 */
|
|
export function getAudioFilesList(userId, competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/query/${userId}/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 场景语音校验 */
|
|
export function audioFilesCheck(recordId, data) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/check/${recordId}`,
|
|
method: 'post',
|
|
data
|
|
});
|
|
}
|
|
/** 语音录制校验整个场景 */
|
|
export function audioFilesCheckAllSence(competitionId, userId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/check/${competitionId}/${userId}`,
|
|
method: 'get'
|
|
});
|
|
}
|
|
/** 查询有场景录音数据的用户 */
|
|
export function getHavaAudoUserList(competitionId) {
|
|
return request({
|
|
url: `/api/v1/competitionPractical/voice/record/users/${competitionId}`,
|
|
method: 'get'
|
|
});
|
|
}
|