|
@@ -131,7 +131,11 @@ export default {
|
|
|
"resetExamQuestionDirty"
|
|
|
]),
|
|
|
async initData() {
|
|
|
- const [exam, paperStruct, examQuestionListData] = await Promise.all([
|
|
|
+ const [
|
|
|
+ examData,
|
|
|
+ paperStructData,
|
|
|
+ examQuestionListData
|
|
|
+ ] = await Promise.all([
|
|
|
this.$http.get("/api/ecs_exam_work/exam/" + this.$route.params.examId),
|
|
|
this.$http.get(
|
|
|
"/api/ecs_oe_student/examRecordPaperStruct/getExamRecordPaperStruct?examRecordDataId=" +
|
|
@@ -139,18 +143,21 @@ export default {
|
|
|
),
|
|
|
this.$http.get("/api/ecs_oe_student/examQuestion/findExamQuestionList")
|
|
|
]);
|
|
|
+ const [exam, paperStruct] = [examData.data, paperStructData.data];
|
|
|
+
|
|
|
+ let examQuestionList = examQuestionListData.data;
|
|
|
|
|
|
if (
|
|
|
- exam.data === undefined ||
|
|
|
- paperStruct.data === undefined ||
|
|
|
- examQuestionListData.data === undefined
|
|
|
+ exam === undefined ||
|
|
|
+ paperStruct === undefined ||
|
|
|
+ examQuestionListData === undefined
|
|
|
) {
|
|
|
this.$Message.error("获取试卷信息失败");
|
|
|
this.logout();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (exam.data.examType === "PRACTICE") {
|
|
|
+ if (exam.examType === "PRACTICE") {
|
|
|
const practiceType = (await this.$http.get(
|
|
|
"/api/ecs_exam_work/exam/examOrgProperty/" +
|
|
|
this.$route.params.examId +
|
|
@@ -162,7 +169,7 @@ export default {
|
|
|
// init subNumber
|
|
|
let questionId = null;
|
|
|
let i = 1;
|
|
|
- let examQuestionList = examQuestionListData.data;
|
|
|
+
|
|
|
examQuestionList = examQuestionList.map(eq => {
|
|
|
if (questionId == eq.questionId) {
|
|
|
eq.subNumber = i++;
|
|
@@ -212,7 +219,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.updateExamState({
|
|
|
- exam: exam.data,
|
|
|
+ exam: exam,
|
|
|
paperStruct: paperStruct,
|
|
|
examQuestionList: examQuestionList
|
|
|
});
|