理论考试缓存调整
This commit is contained in:
parent
f21751fcd3
commit
2abe815c87
@ -52,7 +52,6 @@ export default {
|
||||
passScore: 10
|
||||
},
|
||||
examQuestions: [],
|
||||
theoryAnswers: [],
|
||||
theoryAnswersMap: {},
|
||||
countdownTime: '00:00:00',
|
||||
theoryExamTime: 0,
|
||||
@ -113,6 +112,7 @@ export default {
|
||||
if (resp.data) {
|
||||
this.examQuestions = resp.data.questions.map((el, i) => {
|
||||
el.index = i;
|
||||
el.answer = this.theoryAnswersMap[el.id];
|
||||
return el;
|
||||
});
|
||||
this.theoryExamTime = resp.data.theoryExamTime * 60;
|
||||
@ -175,9 +175,13 @@ export default {
|
||||
}
|
||||
},
|
||||
doEnd() {
|
||||
const theoryAnswers = [];
|
||||
for (const key in this.theoryAnswersMap) {
|
||||
theoryAnswers.push({questionId: key, answerOptionId: this.theoryAnswersMap[key]});
|
||||
}
|
||||
const params = {
|
||||
competitionId: this.$route.query.raceId,
|
||||
theoryAnswers: this.theoryAnswers
|
||||
theoryAnswers: theoryAnswers
|
||||
};
|
||||
postCompetitionTheory(params).then(()=>{
|
||||
this.$router.push({ path: `/jsxt/result`, query: { type: 'theory', raceId:this.$route.query.raceId } });
|
||||
|
Loading…
Reference in New Issue
Block a user