diff --git a/src/api/contest.js b/src/api/contest.js
index 10aaa2467..c5013e53c 100644
--- a/src/api/contest.js
+++ b/src/api/contest.js
@@ -329,3 +329,22 @@ export function getTaskTree(paperId, moduleId) {
method: 'get'
});
}
+
+/** 竞赛开始训练
+ * @param {String} paperId 试卷id
+ * @param {String} moduleId 模块id
+ */
+export function beginContestExercise(paperId, moduleId) {
+ return request({
+ url: `/api/race/${paperId}/${moduleId}`,
+ method: 'POST'
+ });
+}
+
+/** 竞赛完成训练 */
+export function finishContestExercise() {
+ return request({
+ url: '/api/race/finish',
+ method: 'PUT'
+ });
+}
diff --git a/src/api/race.js b/src/api/race.js
index c5f6bc3ef..43e444dd8 100644
--- a/src/api/race.js
+++ b/src/api/race.js
@@ -15,3 +15,20 @@ export function selectQuestionTypeNum(companyId) {
method: 'get'
});
}
+
+/** 加载场景 */
+export function loadRace(simulationId, sceneId) {
+ return request({
+ url: `/api/race/${simulationId}/load/${sceneId}`,
+ method: 'put'
+ });
+
+}
+/** 完成任务 */
+export function overTask(taskId, data) {
+ return request({
+ url: `/api/race/${taskId}/finish`,
+ method: 'put',
+ data
+ });
+}
diff --git a/src/scripts/cmdPlugin/newValidateHandler.js b/src/scripts/cmdPlugin/newValidateHandler.js
index 11435304f..c4ce288c8 100644
--- a/src/scripts/cmdPlugin/newValidateHandler.js
+++ b/src/scripts/cmdPlugin/newValidateHandler.js
@@ -84,8 +84,9 @@ class ValidateHandler {
valid = ((operate.val).toString() === stepOperation.val.toString()) && valid;
}
const opParam = operate.param === undefined ? {} : operate.param;
+ const stepParam = stepOperation.params === undefined ? {} : stepOperation.params;
if ((opParam || stepOperation.params) && !opParam.hasOwnProperty('fileBase64Str')) {
- valid = this.checkParamConsistent(opParam, stepOperation.params, operate.operation) && valid;
+ valid = this.checkParamConsistent(opParam, stepParam, operate.operation) && valid;
}
if (valid && store.state.trainingNew.voiceStepIndex > -1) {
diff --git a/src/store/modules/trainingNew.js b/src/store/modules/trainingNew.js
index 6301a8d56..8f0dec7b1 100644
--- a/src/store/modules/trainingNew.js
+++ b/src/store/modules/trainingNew.js
@@ -21,7 +21,8 @@ const training = {
voiceStepIndex: -1,
examSwitch: false, // 考试开始结束标注
stepRecord: [], // 操作记录
- joinTrainingInfo: null
+ joinTrainingInfo: null,
+ isRecord: false
},
getters: {
teachMode: (state) => {
@@ -131,6 +132,9 @@ const training = {
},
setJoinTrainingInfo: (state, joinTrainingInfo) => {
state.joinTrainingInfo = joinTrainingInfo;
+ },
+ setIsRecord: (state, flag) => {
+ state.isRecord = flag;
}
},
actions: {
@@ -234,6 +238,9 @@ const training = {
},
setJoinTrainingInfo: ({ commit }, joinTrainingInfo ) => {
commit('setJoinTrainingInfo', joinTrainingInfo);
+ },
+ setIsRecord: ({ commit }, flag) => {
+ commit('setIsRecord', flag);
}
}
};
diff --git a/src/views/contest/ScoringSettlement.vue b/src/views/contest/ScoringSettlement.vue
index 306518861..919bd8a88 100644
--- a/src/views/contest/ScoringSettlement.vue
+++ b/src/views/contest/ScoringSettlement.vue
@@ -1,13 +1,86 @@
-