zhangjie 5 years ago
parent
commit
3238580eff
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/modules/card/components/PaperParams.vue

+ 10 - 1
src/modules/card/components/PaperParams.vue

@@ -210,6 +210,7 @@ export default {
         data.sumScore = this.getTopicSumScore(data);
         objectives.push(data);
       });
+
       // 主观题
       subjectiveList.forEach(item => {
         const topic = item.parent || item;
@@ -248,13 +249,20 @@ export default {
         group[0] = question;
 
         if (numPerColumn + j <= topic.questionsCount) {
-          group[1] = { ...question, questionNo: numPerColumn + j };
+          group[1] = {
+            questionNo: numPerColumn + j,
+            score:
+              this.cacheScores[`${topic.topicNo}-${numPerColumn + j}`] || 1,
+            answers:
+              topic.type === "FILL_QUESTION" && topic.isMultiply ? [] : ""
+          };
         } else {
           group[1] = { questionNo: "" };
         }
 
         questions.push(group);
       }
+
       return questions;
     },
     getObjectiveTopicName(data) {
@@ -319,6 +327,7 @@ export default {
           });
         }
       });
+
       this.cacheScores = cacheScores;
     },
     // import