瀏覽代碼

题卡答案解析

zhangjie 1 年之前
父節點
當前提交
c1253372c7

+ 26 - 24
src/modules/card/components/CardBuildDialog.vue

@@ -194,17 +194,14 @@ export default {
     rebuildPaperQuestionNumber(paperJson) {
       // 如果一个大题有多个套题,那么套题的小题需要将强制转成为小题号连续
       paperJson.details.forEach((detail) => {
-        const isOnlyOneQuestion = detail.questions.length === 1;
+        let qno = 1;
         detail.questions.forEach((question) => {
-          let qno = 1;
-          if (
-            question.subQuestions &&
-            question.subQuestions.length &&
-            !isOnlyOneQuestion
-          ) {
+          if (question.subQuestions && question.subQuestions.length) {
             question.subQuestions.forEach((subq) => {
               subq.number = qno++;
             });
+          } else {
+            question.number = qno++;
           }
         });
       });
@@ -223,25 +220,30 @@ export default {
       const objectiveQuestionTypes = [1, 2, 3];
       paperJson.details.forEach((detail) => {
         detail.questions.forEach((question) => {
-          if (objectiveQuestionTypes.includes(question.structType)) {
-            const qno = `${detail.number}-${question.number}`;
-            if (!infos[qno]) {
-              infos[qno] = { answer: null, score: null };
-            }
-            infos[qno].score = question.score;
-            return;
-          }
-
           if (question.subQuestions && question.subQuestions.length) {
             question.subQuestions.forEach((subq) => {
-              if (objectiveQuestionTypes.includes(subq.structType)) {
-                const qno = `${detail.number}-${subq.number}`;
-                if (!infos[qno]) {
-                  infos[qno] = { answer: null, score: null };
-                }
-                infos[qno].score = subq.score;
+              const qno = `${detail.number}-${subq.number}`;
+              if (!infos[qno]) {
+                infos[qno] = {
+                  answer: null,
+                  score: null,
+                  objective: false,
+                };
               }
+              infos[qno].score = subq.score;
+              infos[qno].objective = objectiveQuestionTypes.includes(
+                subq.structType
+              );
             });
+          } else {
+            const qno = `${detail.number}-${question.number}`;
+            if (!infos[qno]) {
+              infos[qno] = { answer: null, score: null, objective: false };
+            }
+            infos[qno].score = question.score;
+            infos[qno].objective = objectiveQuestionTypes.includes(
+              question.structType
+            );
           }
         });
       });
@@ -250,7 +252,7 @@ export default {
           if (question.subQuestions && question.subQuestions.length) {
             question.subQuestions.forEach((subq) => {
               const qno = `${detail.number}-${subq.number}`;
-              if (infos[qno]) {
+              if (infos[qno].objective) {
                 infos[qno].answer = this.getObjectiveQuestionAnswer(
                   subq.answer
                 );
@@ -258,7 +260,7 @@ export default {
             });
           } else {
             const qno = `${detail.number}-${question.number}`;
-            if (infos[qno]) {
+            if (infos[qno].objective) {
               infos[qno].answer = this.getObjectiveQuestionAnswer(
                 question.answer
               );

+ 212 - 143
src/modules/card/components/datas/card2.json

@@ -174,7 +174,7 @@
               "columnNumber": 2,
               "isSimple": false,
               "sign": "head",
-              "id": "element-prg2kiq89g63jc9g",
+              "id": "element-jrvl8qto5tvc3c16",
               "createId": "496044678022430720",
               "createTime": 1709515518156,
               "updateId": null,
@@ -264,7 +264,7 @@
               "columnGap": 20,
               "showForbidArea": false,
               "makeMethod": "SELF",
-              "key": "7adiaitohokkn6n8",
+              "key": "bnlb1bbiipmmjian",
               "isCovered": false,
               "fieldInfos": {
                 "studentName": "${studentName}",
@@ -287,12 +287,12 @@
               "typeName": "客观题",
               "isColumnFirst": false,
               "sign": "objective",
-              "id": "element-61ie5qchbcj5esug",
-              "key": "26079udo95lucl5o"
+              "id": "element-u1e0kdd1vgjkko98",
+              "key": "tq4go3c8a0hve8ua"
             },
             {
-              "id": "element-pff28i9g8fmksqvg",
-              "key": "35t9qgpgdgv28f9g",
+              "id": "element-plq6rg8gjd5msh5k",
+              "key": "quuqls48v2lulggg",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -320,8 +320,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-ip51qeegbj00b3io",
-                "key": "dqcui4fgg39om6uo",
+                "id": "element-7ahcpe9gc3mea7rg",
+                "key": "psggmcbouv20hspg",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -353,8 +353,8 @@
               "elementSerialNo": 0
             },
             {
-              "id": "element-lls6p75ub8ai4ovg",
-              "key": "ggdp1kng4p3734ls",
+              "id": "element-jb2a33el7o3at56g",
+              "key": "7lk1pcson6sradg8",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -382,8 +382,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-a5kvfl8rr19s2s9g",
-                "key": "unpdsds7s8rdeabg",
+                "id": "element-42t7ojbg63mubheg",
+                "key": "9hundmkg2iveu3sg",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -415,8 +415,8 @@
               "elementSerialNo": 1
             },
             {
-              "id": "element-j50muang4nakva1o",
-              "key": "hec7cd68pqlhtp9o",
+              "id": "element-c967naagd8r10tb8",
+              "key": "lsho6e5o7ou1jvgo",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -444,8 +444,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-he0mtomf040qum18",
-                "key": "dj5p49g88j3ac08o",
+                "id": "element-6mis38jv3ol0oih8",
+                "key": "k6oqo70o126oehfg",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -477,8 +477,8 @@
               "elementSerialNo": 2
             },
             {
-              "id": "element-nigf354opplr6fig",
-              "key": "bijuk628tcgkh5uo",
+              "id": "element-0v8epp9sh8g0ht88",
+              "key": "hnhnbvfgd3m0asei",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -506,8 +506,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-he0mtomf040qum18",
-                "key": "dj5p49g88j3ac08o",
+                "id": "element-6mis38jv3ol0oih8",
+                "key": "k6oqo70o126oehfg",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -558,12 +558,12 @@
               "typeName": "客观题",
               "isColumnFirst": true,
               "sign": "objective",
-              "id": "element-qdfeeh2gr5se970g",
-              "key": "dgr0d5k8aqc2387g"
+              "id": "element-3o7bru98v534vejo",
+              "key": "ffm6usf8cs6ilh9s"
             },
             {
-              "id": "element-1ameeoq8882e7hgg",
-              "key": "htecjfsg95q3235g",
+              "id": "element-i2qersh8a4l6h9ng",
+              "key": "urho03noku8isaeg",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -591,8 +591,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-8hug311o6f5a246o",
-                "key": "knuufda85kvk3t8d",
+                "id": "element-rh2qt8881ojdfimg",
+                "key": "hjf3to4oijuegm5o",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -624,8 +624,8 @@
               "elementSerialNo": 4
             },
             {
-              "id": "element-k1kh6qjos478j2k8",
-              "key": "fpjfctboua5d5ero",
+              "id": "element-4e77eno87dene7fu",
+              "key": "srm10asptnc0pm1o",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -653,8 +653,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-uaiigif80a2fufgg",
-                "key": "hkno51kolf9l4bbo",
+                "id": "element-602o9cno2ej3f3lc",
+                "key": "7v491t58fgspg33n",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -686,8 +686,8 @@
               "elementSerialNo": 5
             },
             {
-              "id": "element-e5r43mhgfu6hbvko",
-              "key": "a8gdt7eo97nf2c49",
+              "id": "element-6ma3g20n0k58o7vo",
+              "key": "gcbt0fd8jv1pkv3o",
               "type": "FILL_QUESTION",
               "x": 0,
               "y": 0,
@@ -715,8 +715,8 @@
               "pageSize": "A3",
               "columnNumber": 2,
               "parent": {
-                "id": "element-br1jved8569sikho",
-                "key": "84kbg06g4q0ao66a",
+                "id": "element-mer0i7aov7s0kt05",
+                "key": "kgal5o7rima5f42m",
                 "type": "FILL_QUESTION",
                 "x": 0,
                 "y": 0,
@@ -757,12 +757,12 @@
               "typeName": "主观题",
               "isColumnFirst": false,
               "sign": "subjective",
-              "id": "element-ltnfofh13mi1uoto",
-              "key": "lp5ri82qdnkjcfet"
+              "id": "element-h0hosaaoku4s7cr8",
+              "key": "j30qbo66g4813ufa"
             },
             {
-              "id": "element-3ntmvg2djo33cfro",
-              "key": "gmh3e4q897acm4i1",
+              "id": "element-latjrftop5r1ol88",
+              "key": "e43rk1bot8u5nv01",
               "type": "FILL_LINE",
               "x": 0,
               "y": 0,
@@ -789,8 +789,8 @@
               "isCovered": false,
               "optionCount": 1,
               "parent": {
-                "id": "element-j08kf19occhfbca8",
-                "key": "mbrp1n187u0cvh8g",
+                "id": "element-ddr7l7g8tbcrvier",
+                "key": "3sfi8qqocfau7ge6",
                 "type": "FILL_LINE",
                 "x": 0,
                 "y": 0,
@@ -836,8 +836,8 @@
               "serialNumber": 1,
               "elements": [],
               "parent": {
-                "id": "element-nh97giuo1t96b5uu",
-                "key": "gubr82abck43lp1o",
+                "id": "element-riu17j8ocqffn9r7",
+                "key": "7loas25pmk6g3n18",
                 "type": "EXPLAIN",
                 "sign": "subjective",
                 "topicNo": 3,
@@ -845,8 +845,8 @@
                 "startNumber": 1,
                 "questionsCount": 3
               },
-              "id": "element-eghcnho8m9tp2j1o",
-              "key": "gdtjlb6oa5ojdo4g",
+              "id": "element-gktkua28krkf6rpo",
+              "key": "pib39ena3hj5kejo",
               "elementSerialNo": 8
             }
           ]
@@ -3650,8 +3650,8 @@
               "typeName": "主观题",
               "isColumnFirst": true,
               "sign": "subjective",
-              "id": "element-i15ihr8g4u5csehg",
-              "key": "ilj6j0iea9mmjgdo"
+              "id": "element-3kg7nf481lq273b8",
+              "key": "nobdusp81i4eepm8"
             },
             {
               "type": "EXPLAIN",
@@ -3669,8 +3669,8 @@
               "serialNumber": 2,
               "elements": [],
               "parent": {
-                "id": "element-nh97giuo1t96b5uu",
-                "key": "gubr82abck43lp1o",
+                "id": "element-riu17j8ocqffn9r7",
+                "key": "7loas25pmk6g3n18",
                 "type": "EXPLAIN",
                 "sign": "subjective",
                 "topicNo": 3,
@@ -3678,8 +3678,8 @@
                 "startNumber": 1,
                 "questionsCount": 3
               },
-              "id": "element-aseb7k58rgapuno8",
-              "key": "6mamkchlndmivlqg",
+              "id": "element-5dp86jioj6cjlcr8",
+              "key": "a1v9hmh874uvpdp8",
               "elementSerialNo": 9
             },
             {
@@ -3698,8 +3698,8 @@
               "serialNumber": 3,
               "elements": [],
               "parent": {
-                "id": "element-nh97giuo1t96b5uu",
-                "key": "gubr82abck43lp1o",
+                "id": "element-riu17j8ocqffn9r7",
+                "key": "7loas25pmk6g3n18",
                 "type": "EXPLAIN",
                 "sign": "subjective",
                 "topicNo": 3,
@@ -3707,8 +3707,8 @@
                 "startNumber": 1,
                 "questionsCount": 3
               },
-              "id": "element-qlrrv42ghve936oo",
-              "key": "8iuffrfjav0v1gk8",
+              "id": "element-f1atgig8rjntnnpn",
+              "key": "pbq5ofho872ak5bg",
               "elementSerialNo": 10
             }
           ]
@@ -3795,199 +3795,268 @@
   "answers": {
     "1-1": {
       "answer": "",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "1-2": {
       "answer": "",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "1-3": {
       "answer": "",
-      "score": 2
+      "score": 2,
+      "objective": true
+    },
+    "2-1": {
+      "answer": null,
+      "score": 2,
+      "objective": false
+    },
+    "3-1": {
+      "answer": null,
+      "score": 10,
+      "objective": false
+    },
+    "3-2": {
+      "answer": null,
+      "score": 10,
+      "objective": false
+    },
+    "3-3": {
+      "answer": null,
+      "score": 10,
+      "objective": false
     },
     "4-1": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "4-2": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "4-3": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "4-4": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "4-5": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "4-6": {
       "answer": "B",
-      "score": 2
+      "score": 2,
+      "objective": true
     },
     "5-1": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "5-2": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "5-3": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "5-4": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "5-5": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-1": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-2": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-3": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-4": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-5": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-6": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-7": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-8": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-9": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "6-10": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-1": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-2": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-3": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-4": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-5": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-6": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-7": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-8": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-9": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "7-10": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-1": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-2": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-3": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-4": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-5": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-6": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-7": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-8": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-9": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-10": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-11": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-12": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-13": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-14": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     },
     "8-15": {
-      "answer": "",
-      "score": 2
+      "answer": null,
+      "score": 2,
+      "objective": false
     }
   }
 }

File diff suppressed because it is too large
+ 143 - 30
src/modules/card/components/datas/paper.json


+ 1 - 1
src/modules/mark/views/MarkSetting.vue

@@ -127,7 +127,7 @@
 <script>
 import { markSettingListPage } from "../api";
 import ModifyMarkSetting from "../components/ModifyMarkSetting.vue";
-import ModifyMarkParams from "../components/markParam/ModifyMarkParams";
+import ModifyMarkParams from "../components/markParam/ModifyMarkParams.vue";
 
 export default {
   name: "mark-setting",

Some files were not shown because too many files changed in this diff