|
@@ -92,6 +92,10 @@ export default {
|
|
|
this.buildRenderGroupStructList();
|
|
|
});
|
|
|
},
|
|
|
+ checkIsMatches(structType) {
|
|
|
+ const matchesTypes = [8, 9, 10];
|
|
|
+ return matchesTypes.includes(structType);
|
|
|
+ },
|
|
|
parsePaperStruct(data) {
|
|
|
const paperStructJson = data.paperStructJson
|
|
|
? JSON.parse(data.paperStructJson)
|
|
@@ -148,7 +152,9 @@ export default {
|
|
|
detail.questions.forEach((question) => {
|
|
|
let k = `${detail.number}-${question.number}`;
|
|
|
if (question.subQuestions) {
|
|
|
+ const isMatches = this.checkIsMatches(question.structType);
|
|
|
question.subQuestions.forEach((sq) => {
|
|
|
+ if (isMatches) sq.options = [];
|
|
|
const sqk = `${k}-${sq.number}`;
|
|
|
sq.answer = isEmpty(answerMap[sqk]) ? null : answerMap[sqk];
|
|
|
const stdAns = studentAnsMap[sqk] || {
|
|
@@ -257,6 +263,14 @@ export default {
|
|
|
);
|
|
|
renderStructList.push(...bodys);
|
|
|
|
|
|
+ const isMatches = this.checkIsMatches(question.structType);
|
|
|
+ if (isMatches && question.options && question.options.length) {
|
|
|
+ question.options.forEach((op) => {
|
|
|
+ const obodys = this.parseTopicOption(op.body, op.number);
|
|
|
+ renderStructList.push(...obodys);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
question.subQuestions.forEach((sq) => {
|
|
|
const contents = this.parseSimpleQuestion(sq, false);
|
|
|
renderStructList.push(...contents);
|