zhangjie 2 år sedan
förälder
incheckning
785445bb85

+ 15 - 15
src/modules/stmms/components/markParam/MarkPaperStructure.vue

@@ -13,7 +13,7 @@
       :row-class-name="getRowClassName"
     >
       <el-table-column width="50" align="center">
-        <template slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
           <div
             :class="[
               'expand-btn',
@@ -28,7 +28,7 @@
         </template>
       </el-table-column>
       <el-table-column prop="mainTitle" label="大题名称">
-        <span slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <span slot-scope="scope" v-if="scope.row.mainFirstSub">
           <el-input
             v-model.trim="scope.row.mainTitle"
             size="small"
@@ -39,7 +39,7 @@
         </span>
       </el-table-column>
       <el-table-column prop="qType" label="类型" width="160">
-        <template slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
           <el-radio-group
             v-model="scope.row.qType"
             size="mini"
@@ -55,7 +55,7 @@
         </template>
       </el-table-column>
       <el-table-column prop="mainNumber" label="大题号" width="80">
-        <template slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
           <span>{{ scope.row.mainNumber }}</span>
         </template>
       </el-table-column>
@@ -163,16 +163,16 @@ export default {
         mainNumber: 1,
         subNumber: 1,
         totalScore: undefined,
-        isMainFirstSub: true,
+        mainFirstSub: true,
         expandSub: true
       });
     },
     getRowClassName({ row }) {
       let classNames = [];
-      if (row.isMainFirstSub) {
+      if (row.mainFirstSub) {
         classNames.push("row-main-first-sub");
       }
-      if (!row.isMainFirstSub && !row.expandSub) {
+      if (!row.mainFirstSub && !row.expandSub) {
         classNames.push("row-unexpand-sub");
       }
       return classNames.join(" ");
@@ -199,7 +199,7 @@ export default {
         mainNumber: row.mainNumber + 1,
         subNumber: 1,
         totalScore: row.totalScore,
-        isMainFirstSub: true,
+        mainFirstSub: true,
         expandSub: true
       });
       this.updateMainData();
@@ -225,7 +225,7 @@ export default {
         mainNumber: row.mainNumber,
         subNumber: row.subNumber + 1,
         totalScore: row.totalScore,
-        isMainFirstSub: false,
+        mainFirstSub: false,
         expandSub: row.expandSub
       });
       this.updateSubData(row.mainId);
@@ -244,7 +244,7 @@ export default {
       this.tableData
         .filter(item => item.mainId === row.mainId)
         .forEach((item, index) => {
-          item.isMainFirstSub = !index;
+          item.mainFirstSub = !index;
         });
       this.updateSubData(row.mainId);
       this.updateMainData();
@@ -252,17 +252,17 @@ export default {
     switchExpandSub(row) {
       row.expandSub = !row.expandSub;
       this.tableData
-        .filter(item => item.mainId === row.mainId && !item.isMainFirstSub)
+        .filter(item => item.mainId === row.mainId && !item.mainFirstSub)
         .forEach(item => (item.expandSub = row.expandSub));
     },
     mainTitleChange(row) {
       this.tableData
-        .filter(item => item.mainId === row.mainId && !item.isMainFirstSub)
+        .filter(item => item.mainId === row.mainId && !item.mainFirstSub)
         .forEach(item => (item.mainTitle = row.mainTitle));
     },
     qTypeChange(row) {
       this.tableData
-        .filter(item => item.mainId === row.mainId && !item.isMainFirstSub)
+        .filter(item => item.mainId === row.mainId && !item.mainFirstSub)
         .forEach(item => (item.qType = row.qType));
     },
     checkData() {
@@ -275,7 +275,7 @@ export default {
       // }
 
       // const objectiveNos = this.tableData
-      //   .filter(item => item.isMainFirstSub && item.qType === "objective")
+      //   .filter(item => item.mainFirstSub && item.qType === "objective")
       //   .map(item => item.mainNumber);
       // const unValid = objectiveNos.some(
       //   (no, index) => objectiveNos[0] + index !== no
@@ -288,7 +288,7 @@ export default {
       let errorMessages = [];
       this.tableData.forEach(item => {
         let errorMsg = ``;
-        if (item.isMainFirstSub) {
+        if (item.mainFirstSub) {
           let errorFields = [];
           if (!item.mainTitle) {
             errorFields.push("大题名称");

+ 1 - 1
src/modules/stmms/components/markParam/ModifyMarkerQuestion.vue

@@ -378,7 +378,7 @@ export default {
       let paperStructs = [];
       let struct = null;
       this.paperStructure.forEach(item => {
-        if (item.isMainFirstSub) {
+        if (item.mainFirstSub) {
           if (struct) paperStructs.push(struct);
           struct = {
             mainId: item.mainId,

+ 7 - 7
src/modules/stmms/components/markParam/ModifyObjectiveAnswer.vue

@@ -34,7 +34,7 @@
       :row-class-name="getRowClassName"
     >
       <el-table-column width="50" align="center">
-        <template slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
           <div
             :class="[
               'expand-btn',
@@ -49,12 +49,12 @@
         </template>
       </el-table-column>
       <el-table-column prop="mainTitle" label="大题名称">
-        <span slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <span slot-scope="scope" v-if="scope.row.mainFirstSub">
           {{ scope.row.mainTitle }}
         </span>
       </el-table-column>
       <el-table-column prop="mainNumber" label="大题号" width="80">
-        <template slot-scope="scope" v-if="scope.row.isMainFirstSub">
+        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
           <span>{{ scope.row.mainNumber }}</span>
         </template>
       </el-table-column>
@@ -121,7 +121,7 @@ export default {
         if (nitem.mainNumber !== curMainNumber) {
           curMainId = this.$randomCode();
           curMainNumber = nitem.mainNumber;
-          nitem.isMainFirstSub = true;
+          nitem.mainFirstSub = true;
         }
         nitem.id = this.$randomCode();
         nitem.mainId = curMainId;
@@ -141,10 +141,10 @@ export default {
     },
     getRowClassName({ row }) {
       let classNames = [];
-      if (row.isMainFirstSub) {
+      if (row.mainFirstSub) {
         classNames.push("row-main-first-sub");
       }
-      if (!row.isMainFirstSub && !row.expandSub) {
+      if (!row.mainFirstSub && !row.expandSub) {
         classNames.push("row-unexpand-sub");
       }
       return classNames.join(" ");
@@ -152,7 +152,7 @@ export default {
     switchExpandSub(row) {
       row.expandSub = !row.expandSub;
       this.tableData
-        .filter(item => item.mainId === row.mainId && !item.isMainFirstSub)
+        .filter(item => item.mainId === row.mainId && !item.mainFirstSub)
         .forEach(item => (item.expandSub = row.expandSub));
     },
     checkData() {

+ 1 - 1
src/modules/stmms/components/markParam/ModifyPaperMarker.vue

@@ -29,7 +29,7 @@ import MarkPaperMarker from "./MarkPaperMarker.vue";
 import { calcSum } from "@/plugins/utils";
 
 export default {
-  name: "modify-mark-params",
+  name: "modify-paper-marker",
   components: { MarkPaperMarker },
   props: {
     instance: {

+ 12 - 12
src/modules/stmms/components/markParam/paramData.js

@@ -8,7 +8,7 @@ export default {
       mainNumber: 1,
       subNumber: 1,
       totalScore: 1,
-      isMainFirstSub: true,
+      mainFirstSub: true,
       expandSub: true
     },
     {
@@ -19,7 +19,7 @@ export default {
       mainNumber: 1,
       subNumber: 2,
       totalScore: 1,
-      isMainFirstSub: false,
+      mainFirstSub: false,
       expandSub: true
     },
     {
@@ -30,7 +30,7 @@ export default {
       mainNumber: 1,
       subNumber: 3,
       totalScore: 1,
-      isMainFirstSub: false,
+      mainFirstSub: false,
       expandSub: true
     },
     {
@@ -41,7 +41,7 @@ export default {
       mainNumber: 2,
       subNumber: 1,
       totalScore: 1,
-      isMainFirstSub: true,
+      mainFirstSub: true,
       expandSub: true
     },
     {
@@ -52,7 +52,7 @@ export default {
       mainNumber: 2,
       subNumber: 2,
       totalScore: 1,
-      isMainFirstSub: false,
+      mainFirstSub: false,
       expandSub: true
     },
     {
@@ -63,7 +63,7 @@ export default {
       mainNumber: 2,
       subNumber: 3,
       totalScore: 1,
-      isMainFirstSub: false,
+      mainFirstSub: false,
       expandSub: true
     }
   ],
@@ -86,7 +86,7 @@ export default {
           mainNumber: 1,
           subNumber: 1,
           totalScore: 1,
-          isMainFirstSub: true,
+          mainFirstSub: true,
           expandSub: true
         },
         {
@@ -97,7 +97,7 @@ export default {
           mainNumber: 1,
           subNumber: 2,
           totalScore: 1,
-          isMainFirstSub: false,
+          mainFirstSub: false,
           expandSub: true
         },
         {
@@ -108,7 +108,7 @@ export default {
           mainNumber: 1,
           subNumber: 3,
           totalScore: 1,
-          isMainFirstSub: false,
+          mainFirstSub: false,
           expandSub: true
         }
       ],
@@ -131,7 +131,7 @@ export default {
           mainNumber: 2,
           subNumber: 1,
           totalScore: 1,
-          isMainFirstSub: true,
+          mainFirstSub: true,
           expandSub: true
         },
         {
@@ -142,7 +142,7 @@ export default {
           mainNumber: 2,
           subNumber: 2,
           totalScore: 1,
-          isMainFirstSub: false,
+          mainFirstSub: false,
           expandSub: true
         },
         {
@@ -153,7 +153,7 @@ export default {
           mainNumber: 2,
           subNumber: 3,
           totalScore: 1,
-          isMainFirstSub: false,
+          mainFirstSub: false,
           expandSub: true
         }
       ],