Browse Source

评卷参数设置

zhangjie 1 year ago
parent
commit
888d136b44

+ 14 - 1
src/assets/styles/pages.scss

@@ -885,8 +885,21 @@
 
 // modify-mark-params
 .modify-mark-params {
+  .el-dialog {
+    background-color: $--color-background;
+
+    &.is-fullscreen {
+      .el-dialog__body {
+        padding-top: 70px;
+      }
+    }
+    .el-dialog__title {
+      display: inline-block;
+      margin-right: 20px;
+    }
+  }
   .mark-body {
-    margin: 40px 0;
+    margin-bottom: 20px;
   }
   .structure-desc {
     margin-bottom: 10px;

+ 5 - 0
src/modules/stmms/api.js

@@ -1,5 +1,10 @@
 import { $postParam, $post } from "@/plugins/axios";
 
+export const examStructureClassListPage = (datas) => {
+  // examId,paperNumber
+  return $postParam("/api/admin/exam/structure/list_user_class", datas);
+};
+
 // upload structure
 export const examStructureListPage = (datas) => {
   return $postParam("/api/admin/exam/structure/list", datas);

+ 23 - 21
src/modules/stmms/components/SelectClassByCourse.vue

@@ -4,33 +4,36 @@
     :visible.sync="modalIsShow"
     append-to-body
     top="20px"
-    width="600px"
-    :title="dialogTitle"
+    width="650px"
+    title="选择班级"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     :show-close="false"
     @opened="visibleChange"
   >
-    <el-transfer v-model="value" :data="dataList" filterable></el-transfer>
+    <el-transfer
+      v-model="classIds"
+      :data="dataList"
+      :titles="['班级列表', '已选班级']"
+      filterable
+    ></el-transfer>
 
-    <div class="marker-footer">
+    <div slot="footer">
       <el-button type="primary" @click="confirm">确认</el-button>
       <el-button @click="cancel">取消</el-button>
     </div>
-
-    <div slot="footer"></div>
   </el-dialog>
 </template>
 
 <script>
-import { conditionListClazz } from "../../base/api";
+import { examStructureClassListPage } from "../api";
 
 export default {
-  name: "modify-marker-question",
+  name: "select-class-dialog",
   props: {
-    courseCode: {
-      type: String,
-      default: "",
+    filterData: {
+      type: Object,
+      default: null,
     },
     selectedIds: {
       type: Array,
@@ -70,14 +73,13 @@ export default {
     },
     // user
     async getClassData() {
-      const data = await conditionListClazz({
-        courseCode: this.courseCode,
-      });
+      if (!this.filterData) return;
+      const data = await examStructureClassListPage(this.filterData);
       this.dataList = data.map((item) => {
         return {
-          id: item.id,
-          key: item.id,
-          label: item.name,
+          id: item,
+          key: item,
+          label: item,
           disabled: false,
         };
       });
@@ -89,11 +91,11 @@ export default {
         return;
       }
 
-      const data = this.dataList.filter((item) =>
-        this.classIds.includes(item.id)
-      );
+      // const data = this.dataList.filter((item) =>
+      //   this.classIds.includes(item.id)
+      // );
 
-      this.$emit("confirm", data);
+      this.$emit("confirm", this.classIds);
       this.cancel();
     },
   },

+ 168 - 127
src/modules/stmms/components/markParam/MarkPaperGroup.vue

@@ -20,119 +20,128 @@
       </div>
     </div>
 
-    <el-table :data="groupInfo" border>
-      <el-table-column type="index" width="50"> </el-table-column>
-      <el-table-column label="评卷员">
-        <template slot-scope="scope">
-          <el-tag
-            v-for="user in scope.row.markerList"
-            :key="user.id"
-            class="tag-spin"
-            size="medium"
-          >
-            {{ user.name }}({{ user.orgName }})
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="评卷方式">
-        <template slot-scope="scope">
-          <el-radio-group v-model="scope.row.doubleRate">
-            <el-radio
-              v-for="(val, key) in MARK_TYPE"
-              :key="key"
-              :label="key * 1"
-              >{{ val }}</el-radio
+    <div class="part-box part-box-pad">
+      <el-table :data="groupInfo" border>
+        <el-table-column type="index" width="50"> </el-table-column>
+        <el-table-column label="评卷员">
+          <template slot-scope="scope">
+            <el-tag
+              v-for="user in scope.row.markerList"
+              :key="user.id"
+              class="tag-spin"
+              size="medium"
             >
-          </el-radio-group>
-          <span v-if="scope.row.doubleRate === 1">
-            仲裁阀值:<el-input-number
-              v-model="scope.row.arbitrateThreshold"
-              class="width-80"
-              size="small"
-              :min="0"
-              :max="999999"
-              :step="0.01"
-              step-strictly
-              :controls="false"
+              {{ user.name }}({{ user.orgName }})
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="评卷方式">
+          <template slot-scope="scope">
+            <el-radio-group v-model="scope.row.doubleRate">
+              <el-radio
+                v-for="(val, key) in MARK_TYPE"
+                :key="key"
+                :label="key * 1"
+                >{{ val }}</el-radio
+              >
+            </el-radio-group>
+            <span v-if="scope.row.doubleRate === 1">
+              仲裁阀值:<el-input-number
+                v-model="scope.row.arbitrateThreshold"
+                class="width-80"
+                size="small"
+                :min="0"
+                :max="999999"
+                :step="0.01"
+                step-strictly
+                :controls="false"
+              >
+              </el-input-number>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="评阅题目">
+          <template slot-scope="scope">
+            {{ scope.row.questions | questionsFilter }}
+          </template>
+        </el-table-column>
+        <el-table-column label="评卷区" width="80" align="center">
+          <template slot-scope="scope">
+            <i
+              v-if="scope.row.pictureConfigList.length"
+              class="el-icon-success color-success"
+            ></i>
+          </template>
+        </el-table-column>
+        <el-table-column class-name="action-column" label="操作" width="160px">
+          <template slot-scope="scope">
+            <el-button
+              class="btn-primary"
+              type="text"
+              @click="toEdit(scope.row)"
+              >编辑</el-button
             >
-            </el-input-number>
-          </span>
-        </template>
-      </el-table-column>
-      <el-table-column label="评阅题目">
-        <template slot-scope="scope">
-          {{ scope.row.questions | questionsFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column label="评卷区" width="80" align="center">
-        <template slot-scope="scope">
-          <i
-            v-if="scope.row.pictureConfigList.length"
-            class="el-icon-success color-success"
-          ></i>
-        </template>
-      </el-table-column>
-      <el-table-column class-name="action-column" label="操作" width="160px">
-        <template slot-scope="scope">
-          <el-button class="btn-primary" type="text" @click="toEdit(scope.row)"
-            >编辑</el-button
-          >
-          <el-button
-            class="btn-primary"
-            type="text"
-            :disabled="!paperList.length"
-            @click="toSetArea(scope.row)"
-            >评卷区</el-button
-          >
-          <el-button class="btn-danger" type="text" @click="toDelete(scope.row)"
-            >删除</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+            <el-button
+              class="btn-primary"
+              type="text"
+              :disabled="!paperList.length"
+              @click="toSetArea(scope.row)"
+              >评卷区</el-button
+            >
+            <el-button
+              class="btn-danger"
+              type="text"
+              @click="toDelete(scope.row)"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
 
-    <div>
+    <div class="mb-2">
       <span>分班阅卷:</span>
       <el-switch
-        v-model="openClassMark"
-        @change="openClassMarkChange"
+        v-model="openClassReading"
+        @change="openClassReadingChange"
       ></el-switch>
     </div>
 
-    <el-table v-if="openClassMark" :data="markerClassList" border>
-      <el-table-column type="index" width="50"> </el-table-column>
-      <el-table-column label="评卷员" width="120"> </el-table-column>
-      <el-table-column label="评卷员" width="120">
-        <template slot-scope="scope">
-          <el-tag class="tag-spin" size="medium">
-            {{ scope.row.marker.name }}({{ scope.row.marker.orgName }})
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="评卷班级">
-        <template slot-scope="scope">
-          <el-tag
-            v-for="item in scope.row.classList"
-            :key="item.id"
-            size="medium"
-            effect="dark"
-            type="info"
-          >
-            {{ item.label }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column class-name="action-column" label="操作" width="100">
-        <template slot-scope="scope">
-          <el-button
-            class="btn-primary"
-            type="text"
-            @click="toEditClass(scope.row)"
-            >选择班级</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+    <div v-if="openClassReading" class="part-box part-box-pad">
+      <el-table :data="markerClassList" border>
+        <el-table-column type="index" width="50"> </el-table-column>
+        <el-table-column label="评卷员" width="200">
+          <template slot-scope="scope">
+            <el-tag class="tag-spin" size="medium">
+              {{ scope.row.name }}({{ scope.row.orgName }})
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column label="评卷班级">
+          <template slot-scope="scope">
+            <el-tag
+              v-for="item in scope.row.className"
+              :key="item"
+              size="medium"
+              type="info"
+              class="mb-1 mr-1"
+            >
+              {{ item }}
+            </el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column class-name="action-column" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              class="btn-primary"
+              type="text"
+              @click="toEditClass(scope.row)"
+              >选择班级</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
 
     <!-- ModifyMarkerQuestion -->
     <modify-marker-question
@@ -154,7 +163,12 @@
     <!-- SelectClassByCourse -->
     <select-class-by-course
       ref="SelectClassByCourse"
-      :course-code="datas.basicPaperInfo.courseCode"
+      :filter-data="{
+        examId: datas.basicPaperInfo.examId,
+        paperNumber: datas.basicPaperInfo.paperNumber,
+      }"
+      :selected-ids="selectedClassIds"
+      :disable-ids="disabledClassIds"
       @confirm="classSelected"
     ></select-class-by-course>
   </div>
@@ -168,7 +182,7 @@ import { examStructureFindJpg } from "../../api";
 import { cardDetail } from "../../../card/api";
 
 export default {
-  name: "mark-paper-marker",
+  name: "mark-paper-group",
   components: { ModifyMarkerQuestion, ModifyMarkArea, SelectClassByCourse },
   props: {
     datas: {
@@ -178,6 +192,7 @@ export default {
           basicPaperInfo: {},
           paperStructureInfo: [],
           groupInfo: [],
+          classInfo: [],
         };
       },
     },
@@ -199,7 +214,7 @@ export default {
       paperList: [],
       cardPages: [],
       // 分班阅卷
-      openClassMark: false,
+      openClassReading: false,
       markerClassList: [],
       curMarkClass: {},
       selectedClassIds: [],
@@ -256,6 +271,18 @@ export default {
       this.objectiveQuestionCount =
         this.questionCount - this.subjectiveQuestionCount;
 
+      this.openClassReading = this.datas.basicPaperInfo.openClassReading;
+
+      if (this.openClassReading) {
+        this.markerClassList = this.datas.classInfo.map((item) => {
+          let nitem = { ...item };
+          nitem.className = nitem.className.split(",");
+          return nitem;
+        });
+        this.updateCasheMarkerClass();
+        this.initMarkerClassList();
+      }
+
       this.$emit("on-ready");
     },
     updateDisableQuestionIds(filterId) {
@@ -325,7 +352,7 @@ export default {
       this.updateGroupNumber();
 
       // 分班阅卷相关
-      if (!this.openClassMark) return;
+      if (!this.openClassReading) return;
       this.updateCasheMarkerClass();
       this.initMarkerClassList();
     },
@@ -418,7 +445,7 @@ export default {
       this.groupInfo.splice(pos, 1, row);
     },
     // 分班阅卷 --->
-    openClassMarkChange(val) {
+    openClassReadingChange(val) {
       if (val) {
         this.initMarkerClassList();
       } else {
@@ -431,8 +458,11 @@ export default {
       this.groupInfo.forEach((group) => {
         group.markerList.forEach((marker) => {
           markerClassList.push({
-            marker: { ...marker },
-            classList: this.casheMarkerClass[marker.id] || [],
+            id: marker.id,
+            loginName: marker.loginName,
+            name: marker.name,
+            orgName: marker.orgName,
+            className: this.casheMarkerClass[marker.id] || [],
           });
         });
       });
@@ -441,24 +471,17 @@ export default {
     updateCasheMarkerClass() {
       let casheMarkerClass = {};
       this.markerClassList.forEach((item) => {
-        casheMarkerClass[item.marker.id] = item.classList;
+        casheMarkerClass[item.id] = item.className;
       });
       this.casheMarkerClass = casheMarkerClass;
     },
     toEditClass(row) {
       this.curMarkClass = row;
-      this.selectedClassIds = row.classList.map((item) => item.id);
-      let disabledClassIds = [];
-      this.markerClassList
-        .filter((item) => item.marker.id !== row.marker.id)
-        .forEach((item) => {
-          disabledClassIds.push(...item.classList.map((item) => item.id));
-        });
-      this.disabledClassIds = disabledClassIds;
+      this.selectedClassIds = row.className;
       this.$refs.SelectClassByCourse.open();
     },
-    classSelected(classList) {
-      this.curMarkClass.classList = classList;
+    classSelected(className) {
+      this.curMarkClass.className = className;
     },
     // 分班阅卷 end --->
     checkData() {
@@ -474,6 +497,14 @@ export default {
         }
       });
 
+      if (this.openClassReading) {
+        this.markerClassList.forEach((item) => {
+          if (!item.className.length) {
+            errorMessages.push(`评卷员${item.name}的阅卷班级没有设置`);
+          }
+        });
+      }
+
       if (errorMessages.length) {
         this.$message.error(errorMessages.join("。"));
         return;
@@ -483,12 +514,22 @@ export default {
       this.$emit("next-step");
     },
     getData() {
-      return this.groupInfo.map((item) => {
-        return { ...item };
-      });
+      return {
+        groupInfo: this.groupInfo.map((item) => {
+          return { ...item };
+        }),
+        basicPaperInfo: Object.assign(this.datas.basicPaperInfo, {
+          openClassReading: this.openClassReading,
+        }),
+        classInfo: this.markerClassList.map((item) => {
+          let nitem = { ...item };
+          nitem.className = item.className.join();
+          return nitem;
+        }),
+      };
     },
     updateData() {
-      this.$emit("data-change", { groupInfo: this.getData() });
+      this.$emit("data-change", this.getData());
     },
   },
 };

+ 137 - 135
src/modules/stmms/components/markParam/MarkPaperStructure.vue

@@ -12,156 +12,158 @@
       </div>
     </div>
 
-    <el-table
-      ref="TableList"
-      :data="tableData"
-      border
-      :row-class-name="getRowClassName"
-    >
-      <el-table-column width="50" align="center">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-          <div
-            :class="[
-              'expand-btn',
-              { 'expand-btn-unexpand': !scope.row.expandSub },
-            ]"
-            @click="switchExpandSub(scope.row)"
-          >
-            <i
-              :class="scope.row.expandSub ? 'el-icon-minus' : 'el-icon-plus'"
-            ></i>
-          </div>
-        </template>
-      </el-table-column>
-      <template v-if="structureCanEdit">
-        <el-table-column prop="mainTitle" label="大题名称">
-          <span slot-scope="scope" v-if="scope.row.mainFirstSub">
-            <el-input
-              v-model.trim="scope.row.mainTitle"
-              size="small"
-              :maxlength="32"
-              clearable
-              @change="mainTitleChange(scope.row)"
-            ></el-input>
-          </span>
-        </el-table-column>
-        <el-table-column prop="type" label="题型" width="120">
+    <div class="part-box part-box-pad mb-0">
+      <el-table
+        ref="TableList"
+        :data="tableData"
+        border
+        :row-class-name="getRowClassName"
+      >
+        <el-table-column width="50" align="center">
           <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-            <el-select
-              v-model="scope.row.type"
-              placeholder="请选择"
-              class="width-full"
-              @change="qTypeChange(scope.row)"
+            <div
+              :class="[
+                'expand-btn',
+                { 'expand-btn-unexpand': !scope.row.expandSub },
+              ]"
+              @click="switchExpandSub(scope.row)"
             >
-              <el-option
-                v-for="item in QUESTION_TYPE_LIST"
-                :key="item.code"
-                :value="item.code"
-                :label="item.name"
-              >
-              </el-option>
-            </el-select>
+              <i
+                :class="scope.row.expandSub ? 'el-icon-minus' : 'el-icon-plus'"
+              ></i>
+            </div>
           </template>
         </el-table-column>
-        <el-table-column label="选项个数" width="100">
-          <template
-            slot-scope="scope"
-            v-if="scope.row.type <= 2 && scope.row.mainFirstSub"
-          >
+        <template v-if="structureCanEdit">
+          <el-table-column prop="mainTitle" label="大题名称">
+            <span slot-scope="scope" v-if="scope.row.mainFirstSub">
+              <el-input
+                v-model.trim="scope.row.mainTitle"
+                size="small"
+                :maxlength="32"
+                clearable
+                @change="mainTitleChange(scope.row)"
+              ></el-input>
+            </span>
+          </el-table-column>
+          <el-table-column prop="type" label="题型" width="120">
+            <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+              <el-select
+                v-model="scope.row.type"
+                placeholder="请选择"
+                class="width-full"
+                @change="qTypeChange(scope.row)"
+              >
+                <el-option
+                  v-for="item in QUESTION_TYPE_LIST"
+                  :key="item.code"
+                  :value="item.code"
+                  :label="item.name"
+                >
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="选项个数" width="100">
+            <template
+              slot-scope="scope"
+              v-if="scope.row.type <= 2 && scope.row.mainFirstSub"
+            >
+              <el-input-number
+                v-model="scope.row.optionCount"
+                class="width-full"
+                size="small"
+                :min="2"
+                :max="26"
+                :step="1"
+                step-strictly
+                :controls="false"
+                @change="optionCountChange(scope.row)"
+              ></el-input-number>
+            </template>
+          </el-table-column>
+        </template>
+        <template v-else>
+          <el-table-column prop="mainTitle" label="大题名称">
+            <span slot-scope="scope" v-if="scope.row.mainFirstSub">
+              {{ scope.row.mainTitle }}
+            </span>
+          </el-table-column>
+          <el-table-column prop="typeName" label="题型" width="120">
+            <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+              {{ scope.row.typeName }}
+            </template>
+          </el-table-column>
+        </template>
+        <el-table-column label="每题分值" width="100">
+          <template slot-scope="scope" v-if="scope.row.mainFirstSub">
             <el-input-number
-              v-model="scope.row.optionCount"
+              v-model="scoresPerTopic[scope.row.mainId]"
               class="width-full"
               size="small"
-              :min="2"
-              :max="26"
-              :step="1"
+              :min="0.5"
+              :max="500"
+              :step="0.5"
               step-strictly
               :controls="false"
-              @change="optionCountChange(scope.row)"
+              @change="(val) => scorePerTopicChange(val, scope.row)"
             ></el-input-number>
           </template>
         </el-table-column>
-      </template>
-      <template v-else>
-        <el-table-column prop="mainTitle" label="大题名称">
-          <span slot-scope="scope" v-if="scope.row.mainFirstSub">
-            {{ scope.row.mainTitle }}
-          </span>
-        </el-table-column>
-        <el-table-column prop="typeName" label="题型" width="120">
+        <el-table-column prop="mainNumber" label="大题号" width="80">
           <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-            {{ scope.row.typeName }}
+            <span>{{ scope.row.mainNumber }}</span>
           </template>
         </el-table-column>
-      </template>
-      <el-table-column label="每题分值" width="100">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-          <el-input-number
-            v-model="scoresPerTopic[scope.row.mainId]"
-            class="width-full"
-            size="small"
-            :min="0.5"
-            :max="500"
-            :step="0.5"
-            step-strictly
-            :controls="false"
-            @change="(val) => scorePerTopicChange(val, scope.row)"
-          ></el-input-number>
-        </template>
-      </el-table-column>
-      <el-table-column prop="mainNumber" label="大题号" width="80">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-          <span>{{ scope.row.mainNumber }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="subNumber"
-        label="小题号"
-        width="80"
-      ></el-table-column>
-      <el-table-column prop="totalScore" label="小题满分" width="105">
-        <template slot-scope="scope">
-          <el-input-number
-            v-model="scope.row.totalScore"
-            class="width-80"
-            size="small"
-            :min="0.5"
-            :max="500"
-            :step="0.5"
-            step-strictly
-            :controls="false"
-          ></el-input-number>
-        </template>
-      </el-table-column>
-      <el-table-column
-        v-if="structureCanEdit"
-        class-name="action-column"
-        label="操作"
-        width="200px"
-      >
-        <template slot-scope="scope">
-          <el-button
-            class="btn-primary"
-            type="text"
-            @click="toAddMain(scope.row)"
-            >新增大题</el-button
-          >
-          <el-button
-            class="btn-primary"
-            type="text"
-            @click="toAddSub(scope.row)"
-            >新增小题</el-button
-          >
-          <el-button
-            :disabled="tableData.length <= 1"
-            class="btn-danger"
-            type="text"
-            @click="toDeleteSub(scope.row)"
-            >删除</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+        <el-table-column
+          prop="subNumber"
+          label="小题号"
+          width="80"
+        ></el-table-column>
+        <el-table-column prop="totalScore" label="小题满分" width="105">
+          <template slot-scope="scope">
+            <el-input-number
+              v-model="scope.row.totalScore"
+              class="width-80"
+              size="small"
+              :min="0.5"
+              :max="500"
+              :step="0.5"
+              step-strictly
+              :controls="false"
+            ></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="structureCanEdit"
+          class-name="action-column"
+          label="操作"
+          width="200px"
+        >
+          <template slot-scope="scope">
+            <el-button
+              class="btn-primary"
+              type="text"
+              @click="toAddMain(scope.row)"
+              >新增大题</el-button
+            >
+            <el-button
+              class="btn-primary"
+              type="text"
+              @click="toAddSub(scope.row)"
+              >新增小题</el-button
+            >
+            <el-button
+              :disabled="tableData.length <= 1"
+              class="btn-danger"
+              type="text"
+              @click="toDeleteSub(scope.row)"
+              >删除</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
     <div class="total-info">
       试卷总分:<span>{{ paperTotalScore }}</span
       >分

+ 52 - 41
src/modules/stmms/components/markParam/MarkParamMarker.vue

@@ -1,49 +1,60 @@
 <template>
   <div class="mark-paper-marker">
-    <div class="box-justify part-box part-box-pad">
-      <div>
-        <p class="tips-info">
-          1.评卷过程中需要增加评卷员,可以在需要增加分组下绑定评卷员
-        </p>
-      </div>
-      <div>
-        <span
-          ><i class="el-icon-success color-success"></i>评卷员绑定成功!</span
-        >
-        <span
-          ><i class="el-icon-success color-danger"></i>
-          评卷员同步阅卷模块失败!</span
-        >
+    <div class="mark-body">
+      <div class="box-justify part-box part-box-pad">
+        <div>
+          <p class="tips-info">
+            1.评卷过程中需要增加评卷员,可以在需要增加分组下绑定评卷员
+          </p>
+        </div>
+        <div>
+          <span
+            ><i class="el-icon-success color-success"></i>评卷员绑定成功!</span
+          >
+          <span
+            ><i class="el-icon-success color-danger"></i>
+            评卷员同步阅卷模块失败!</span
+          >
+        </div>
       </div>
-    </div>
 
-    <el-table :data="groupInfo" border>
-      <el-table-column type="index" width="50"> </el-table-column>
-      <el-table-column label="评卷员">
-        <template slot-scope="scope">
-          <el-tag
-            v-for="user in scope.row.markerList"
-            :key="user.id"
-            class="tag-spin"
-            size="medium"
+      <div class="part-box part-box-pad">
+        <el-table :data="groupInfo" border>
+          <el-table-column type="index" width="50"> </el-table-column>
+          <el-table-column label="评卷员">
+            <template slot-scope="scope">
+              <el-tag
+                v-for="user in scope.row.markerList"
+                :key="user.id"
+                class="tag-spin"
+                size="medium"
+              >
+                {{ user.name }}({{ user.orgName }})
+              </el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="评阅题目">
+            <template slot-scope="scope">
+              {{ scope.row.questions | questionsFilter }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            class-name="action-column"
+            label="操作"
+            width="160px"
           >
-            {{ user.name }}({{ user.orgName }})
-          </el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="评阅题目">
-        <template slot-scope="scope">
-          {{ scope.row.questions | questionsFilter }}
-        </template>
-      </el-table-column>
-      <el-table-column class-name="action-column" label="操作" width="160px">
-        <template slot-scope="scope">
-          <el-button class="btn-primary" type="text" @click="toEdit(scope.row)"
-            >编辑</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
+            <template slot-scope="scope">
+              <el-button
+                class="btn-primary"
+                type="text"
+                @click="toEdit(scope.row)"
+                >编辑</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
 
     <div class="text-center mt-2">
       <!-- <el-button type="primary" :disabled="loading" @click="submit"

+ 31 - 29
src/modules/stmms/components/markParam/MarkParamMarkerLeader.vue

@@ -18,36 +18,38 @@
       </div>
     </div>
 
-    <table class="table">
-      <colgroup>
-        <col />
-        <col width="100" />
-      </colgroup>
-      <tr>
-        <th>科组长</th>
-        <th>操作</th>
-      </tr>
-      <tr>
-        <td>
-          <el-tag
-            v-for="user in users"
-            :key="user.id"
-            closable
-            :disable-transitions="false"
-            @close="toDeleteUser(user)"
-          >
-            {{ user.label }}
-          </el-tag>
-        </td>
-        <td>
-          <el-button class="btn-primary" type="text" @click="toEdit"
-            >编辑</el-button
-          >
-        </td>
-      </tr>
-    </table>
+    <div class="part-box part-box-pad">
+      <table class="table">
+        <colgroup>
+          <col />
+          <col width="100" />
+        </colgroup>
+        <tr>
+          <th>科组长</th>
+          <th>操作</th>
+        </tr>
+        <tr>
+          <td>
+            <el-tag
+              v-for="user in users"
+              :key="user.id"
+              closable
+              :disable-transitions="false"
+              @close="toDeleteUser(user)"
+            >
+              {{ user.label }}
+            </el-tag>
+          </td>
+          <td>
+            <el-button class="btn-primary" type="text" @click="toEdit"
+              >编辑</el-button
+            >
+          </td>
+        </tr>
+      </table>
+    </div>
 
-    <div class="text-center mt-2">
+    <div class="text-center">
       <el-button type="primary" :disabled="loading" @click="submit"
         >提交</el-button
       >

+ 78 - 77
src/modules/stmms/components/markParam/MarkParamObjectiveAnswer.vue

@@ -16,91 +16,92 @@
           ><i class="el-icon-success color-danger"></i>
           客观题标答同步阅卷模块失败!</span
         >
-        <el-button type="primary" @click="toAdd">新增</el-button>
       </div>
     </div>
 
-    <p class="tips-info mb-1">
-      <i class="el-icon-warning"></i> 客观题标答只能输入大写字母ABCDE...
-      ,判断题正确请输入A,错误输入B
-    </p>
-    <el-table
-      ref="TableList"
-      :data="tableData"
-      border
-      :row-class-name="getRowClassName"
-    >
-      <el-table-column width="50" align="center">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+    <div class="part-box part-box-pad">
+      <p class="tips-info mb-1">
+        <i class="el-icon-warning"></i> 客观题标答只能输入大写字母ABCDE...
+        ,判断题正确请输入A,错误输入B
+      </p>
+      <el-table
+        ref="TableList"
+        :data="tableData"
+        border
+        :row-class-name="getRowClassName"
+      >
+        <el-table-column width="50" align="center">
+          <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+            <div
+              :class="[
+                'expand-btn',
+                { 'expand-btn-unexpand': !scope.row.expandSub },
+              ]"
+              @click="switchExpandSub(scope.row)"
+            >
+              <i
+                :class="scope.row.expandSub ? 'el-icon-minus' : 'el-icon-plus'"
+              ></i>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="mainTitle" label="大题名称">
+          <span slot-scope="scope" v-if="scope.row.mainFirstSub">
+            {{ scope.row.mainTitle }}
+          </span>
+        </el-table-column>
+        <el-table-column prop="typeName" label="题型" width="120">
+          <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+            {{ scope.row.typeName }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="mainNumber" label="大题号" width="80">
+          <template slot-scope="scope" v-if="scope.row.mainFirstSub">
+            <span>{{ scope.row.mainNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="subNumber"
+          label="小题号"
+          width="80"
+        ></el-table-column>
+        <el-table-column prop="totalScore" label="小题满分" width="105">
+        </el-table-column>
+        <el-table-column label="答案" width="200px" class-name="answer-column">
           <div
-            :class="[
-              'expand-btn',
-              { 'expand-btn-unexpand': !scope.row.expandSub },
-            ]"
-            @click="switchExpandSub(scope.row)"
+            slot-scope="scope"
+            :class="['el-form-item', { 'is-error': scope.row.error }]"
           >
-            <i
-              :class="scope.row.expandSub ? 'el-icon-minus' : 'el-icon-plus'"
-            ></i>
-          </div>
-        </template>
-      </el-table-column>
-      <el-table-column prop="mainTitle" label="大题名称">
-        <span slot-scope="scope" v-if="scope.row.mainFirstSub">
-          {{ scope.row.mainTitle }}
-        </span>
-      </el-table-column>
-      <el-table-column prop="typeName" label="题型" width="120">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-          {{ scope.row.typeName }}
-        </template>
-      </el-table-column>
-      <el-table-column prop="mainNumber" label="大题号" width="80">
-        <template slot-scope="scope" v-if="scope.row.mainFirstSub">
-          <span>{{ scope.row.mainNumber }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="subNumber"
-        label="小题号"
-        width="80"
-      ></el-table-column>
-      <el-table-column prop="totalScore" label="小题满分" width="105">
-      </el-table-column>
-      <el-table-column label="答案" width="200px" class-name="answer-column">
-        <div
-          slot-scope="scope"
-          :class="['el-form-item', { 'is-error': scope.row.error }]"
-        >
-          <div class="el-form-item__content">
-            <el-input
-              v-model.trim="scope.row.answer"
-              placeholder="请输入答案"
-              :maxlength="scope.row.optionCount"
-              clearable
-              @change="validateAnswer(scope.row)"
-            ></el-input>
-            <div v-if="scope.row.error" class="el-form-item__error">
-              {{ scope.row.errMsg }}
+            <div class="el-form-item__content">
+              <el-input
+                v-model.trim="scope.row.answer"
+                placeholder="请输入答案"
+                :maxlength="scope.row.optionCount"
+                clearable
+                @change="validateAnswer(scope.row)"
+              ></el-input>
+              <div v-if="scope.row.error" class="el-form-item__error">
+                {{ scope.row.errMsg }}
+              </div>
             </div>
           </div>
-        </div>
-      </el-table-column>
-      <el-table-column label="判分规则" width="140px">
-        <template v-if="scope.row.type === 2" slot-scope="scope">
-          <el-select v-model="scope.row.objectivePolicy">
-            <el-option
-              v-for="(val, key) in QUESTION_SCORE_TYPE"
-              :key="key"
-              :value="key"
-              :label="val"
-            ></el-option>
-          </el-select>
-        </template>
-      </el-table-column>
-    </el-table>
+        </el-table-column>
+        <el-table-column label="判分规则" width="140px">
+          <template v-if="scope.row.type === 2" slot-scope="scope">
+            <el-select v-model="scope.row.objectivePolicy">
+              <el-option
+                v-for="(val, key) in QUESTION_SCORE_TYPE"
+                :key="key"
+                :value="key"
+                :label="val"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
 
-    <div class="text-center mt-2">
+    <div class="text-center">
       <el-button type="primary" :disabled="loading" @click="submit"
         >提交</el-button
       >

+ 25 - 1
src/modules/stmms/components/markParam/MarkParamStructure.vue

@@ -111,6 +111,7 @@ export default {
         structureCanEdit,
         paperStructureInfo,
         groupInfo,
+        classInfo,
         basicPaperInfo,
       } = this.markParamInfos;
 
@@ -118,11 +119,32 @@ export default {
         structureCanEdit,
         paperStructureInfo: deepCopy(paperStructureInfo),
         groupInfo: deepCopy(groupInfo),
-        basicPaperInfo: deepCopy(basicPaperInfo),
+        classInfo: deepCopy(classInfo),
+        basicPaperInfo: this.getBaseInfo(basicPaperInfo),
         paperStat: this.statPaperStructure(paperStructureInfo),
       };
       this.dataReady = true;
     },
+    getBaseInfo(baseInfo) {
+      return this.$objAssign(
+        {
+          id: null,
+          examPaperStructureId: baseInfo.id,
+          examId: null,
+          cardId: null,
+          thirdRelateId: null,
+          thirdRelateName: "",
+          courseName: "",
+          courseCode: "",
+          paperNumber: null,
+          paperType: "",
+          sequence: null,
+          openClassReading: null,
+          status: "",
+        },
+        baseInfo
+      );
+    },
     getQuestionType(topic) {
       // const questionType = {
       //   1: "SINGLE_ANSWER_QUESTION",
@@ -258,6 +280,7 @@ export default {
         const curStruct = this.getPaperStructData(data.paperStructureInfo);
         if (curStruct.join("") !== originStruct.join("")) {
           data.groupInfo = [];
+          data.classInfo = [];
           data.paperStat.structChanged = true;
         } else {
           // 更新分组中的试题信息
@@ -312,6 +335,7 @@ export default {
           ),
         },
         groupInfo: this.infos.groupInfo,
+        classInfo: this.infos.classInfo,
       };
       const res = await examStructureSubmit(datas).catch(() => false);
       this.loading = false;

+ 15 - 14
src/modules/stmms/components/markParam/MarkParamUploadAnswer.vue

@@ -17,22 +17,23 @@
           ><i class="el-icon-success color-danger"></i>
           主观题标答同步阅卷模块失败!</span
         >
-        <el-button type="primary" @click="toAdd">新增</el-button>
       </div>
     </div>
-    <el-form ref="modalFormComp" :model="infos" label-width="50px">
-      <div class="part-box">
-        <h3 class="mb-2">卷型{{ instance.paperType }}</h3>
-        <el-form-item prop="file" label="标答:">
-          <select-file
-            :format="fileFormat"
-            :disabled="loading"
-            @file-change="fileChange"
-          ></select-file>
-        </el-form-item>
-      </div>
-    </el-form>
-    <div class="text-center mt-2">
+    <div class="part-box part-box-pad">
+      <el-form ref="modalFormComp" :model="infos" label-width="50px">
+        <div class="part-box">
+          <h3 class="mb-2">卷型{{ instance.paperType }}</h3>
+          <el-form-item prop="file" label="标答:">
+            <select-file
+              :format="fileFormat"
+              :disabled="loading"
+              @file-change="fileChange"
+            ></select-file>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <div class="text-center">
       <el-button type="primary" :disabled="loading" @click="submit"
         >确认</el-button
       >

+ 14 - 32
src/modules/stmms/components/markParam/ModifyMarkParams.vue

@@ -10,7 +10,7 @@
     :before-close="beforeClose"
     @open="initData"
   >
-    <div class="box-justify" slot="title">
+    <div slot="title">
       <h2 class="el-dialog__title">评卷参数设置</h2>
       <span
         >课程名称:{{ instance.courseName }}({{ instance.courseCode }})</span
@@ -75,23 +75,23 @@ export default {
       curTab: "structure",
       tabs: [
         {
-          name: "设置试卷结构及分组",
+          name: "评卷参数设置",
           val: "structure",
         },
         {
-          name: "设置评卷员",
-          val: "marker",
+          name: "科组长设置",
+          val: "marker-leader",
         },
         {
-          name: "设置科组长",
-          val: "marker-leader",
+          name: "评卷员管理",
+          val: "marker",
         },
         {
-          name: "设置客观题标答",
+          name: "客观题标答设置",
           val: "objective-answer",
         },
         {
-          name: "上传标答文件",
+          name: "主观题标答设置",
           val: "upload-answer",
         },
       ],
@@ -122,17 +122,17 @@ export default {
       this.initStore();
 
       if (this.instance.paperInfoJson) {
-        const { paperStructureInfo, groupInfo, structureCanEdit } = JSON.parse(
-          this.instance.paperInfoJson
-        );
+        const { paperStructureInfo, groupInfo, classInfo, structureCanEdit } =
+          JSON.parse(this.instance.paperInfoJson);
         const infos = {
           structureCanEdit,
           paperStructureInfo: [
             ...paperStructureInfo.objectiveQuestionList,
             ...paperStructureInfo.subjectiveQuestionList,
           ],
-          groupInfo,
-          basicPaperInfo: this.getBaseInfo(this.instance),
+          groupInfo: groupInfo || [],
+          classInfo: classInfo || [],
+          basicPaperInfo: this.instance,
         };
         this.setMarkParamInfos(infos);
       } else {
@@ -158,25 +158,7 @@ export default {
 
       this.dataReady = true;
     },
-    getBaseInfo(baseInfo) {
-      return this.$objAssign(
-        {
-          id: null,
-          examPaperStructureId: baseInfo.id,
-          examId: null,
-          cardId: null,
-          thirdRelateId: null,
-          thirdRelateName: "",
-          courseName: "",
-          courseCode: "",
-          paperNumber: null,
-          paperType: "",
-          sequence: null,
-          status: "",
-        },
-        baseInfo
-      );
-    },
+
     parsePaperStructureFromCard(pages) {
       let structData = [];
       let curTopicId = 0;

+ 2 - 0
src/modules/stmms/components/markParam/store.js

@@ -4,6 +4,7 @@ const state = {
   markParamInfos: {
     basicPaperInfo: {},
     groupInfo: [],
+    classInfo: [],
     paperStructureInfo: [],
     structureCanEdit: false,
   },
@@ -25,6 +26,7 @@ const mutations = {
     state.markParamInfos = {
       basicPaperInfo: {},
       groupInfo: [],
+      classInfo: [],
       paperStructureInfo: [],
       structureCanEdit: false,
     };

+ 0 - 7
src/modules/stmms/views/UploadStructure.vue

@@ -61,13 +61,6 @@
             {{ scope.row.loginName }}({{ scope.row.realName }})
           </span></el-table-column
         >
-        <el-table-column prop="statusStr" label="状态" width="100">
-          <span
-            slot-scope="scope"
-            :class="{ 'color-danger': scope.row.status === 'INIT' }"
-            >{{ scope.row.statusStr }}</span
-          >
-        </el-table-column>
         <el-table-column
           class-name="action-column"
           label="操作"