zhangjie 3 anos atrás
pai
commit
8307008214

+ 38 - 1
src/modules/base/components/ModifyClazzSimpleStudent.vue

@@ -31,6 +31,12 @@
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
         <div class="part-box-action">
         <div class="part-box-action">
+          <el-button
+            type="danger"
+            icon="el-icon-circle-plus-outline"
+            @click="toBatchDelete"
+            >批量删除</el-button
+          >
           <el-button
           <el-button
             type="primary"
             type="primary"
             icon="el-icon-circle-plus-outline"
             icon="el-icon-circle-plus-outline"
@@ -41,7 +47,16 @@
       </div>
       </div>
 
 
       <div class="part-box part-box-pad">
       <div class="part-box part-box-pad">
-        <el-table ref="TableList" :data="studentList">
+        <el-table
+          ref="TableList"
+          :data="studentList"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            type="selection"
+            width="55"
+            align="center"
+          ></el-table-column>
           <el-table-column
           <el-table-column
             type="index"
             type="index"
             label="序号"
             label="序号"
@@ -112,6 +127,7 @@ export default {
       current: 1,
       current: 1,
       size: this.GLOBAL.pageSize,
       size: this.GLOBAL.pageSize,
       total: 0,
       total: 0,
+      multipleSelection: [],
       studentList: [],
       studentList: [],
       curStudent: {}
       curStudent: {}
     };
     };
@@ -147,9 +163,13 @@ export default {
       this.total = data.total;
       this.total = data.total;
     },
     },
     toPage(page) {
     toPage(page) {
+      this.multipleSelection = [];
       this.current = page;
       this.current = page;
       this.getList();
       this.getList();
     },
     },
+    handleSelectionChange(val) {
+      this.multipleSelection = val.map(item => item.id);
+    },
     toAdd() {
     toAdd() {
       this.curStudent = { teachClazzId: this.clazz.id };
       this.curStudent = { teachClazzId: this.clazz.id };
       this.$refs.ModifyStudentSimple.open();
       this.$refs.ModifyStudentSimple.open();
@@ -164,6 +184,23 @@ export default {
           this.deletePageLastItem();
           this.deletePageLastItem();
         })
         })
         .catch(() => {});
         .catch(() => {});
+    },
+    toBatchDelete() {
+      if (!this.multipleSelection.length) {
+        this.$message.error("请选择要删除的学生");
+        return;
+      }
+
+      this.$confirm(`确定要删除选中的这些学生吗?`, "提示", {
+        type: "warning"
+      })
+        .then(async () => {
+          await deleteStudentSimple(this.multipleSelection);
+          this.$message.success("操作成功!");
+          this.deletePageLastItem(this.multipleSelection.length);
+          this.multipleSelection = [];
+        })
+        .catch(() => {});
     }
     }
   }
   }
 };
 };

+ 1 - 0
src/modules/base/components/SelectClassStudent.vue

@@ -49,6 +49,7 @@
       ref="TableList"
       ref="TableList"
       :data="dataList"
       :data="dataList"
       border
       border
+      max-height="440"
       @selection-change="handleSelectionChange"
       @selection-change="handleSelectionChange"
     >
     >
       <el-table-column
       <el-table-column

+ 2 - 2
src/modules/stmms/components/markParam/MarkPaperMarker.vue

@@ -67,7 +67,7 @@
           {{ scope.row.questions | questionsFilter }}
           {{ scope.row.questions | questionsFilter }}
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="答题区" width="80" align="center">
+      <el-table-column label="评卷区" width="80" align="center">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <i
           <i
             v-if="scope.row.pictureConfigList.length"
             v-if="scope.row.pictureConfigList.length"
@@ -84,7 +84,7 @@
             class="btn-primary"
             class="btn-primary"
             type="text"
             type="text"
             @click="toSetArea(scope.row)"
             @click="toSetArea(scope.row)"
-            >答题区</el-button
+            >评卷区</el-button
           >
           >
           <el-button class="btn-danger" type="text" @click="toDelete(scope.row)"
           <el-button class="btn-danger" type="text" @click="toDelete(scope.row)"
             >删除</el-button
             >删除</el-button

+ 4 - 0
src/modules/stmms/components/markParam/ModifyMarkArea.vue

@@ -17,6 +17,10 @@
         <el-button @click="cancel">取消</el-button>
         <el-button @click="cancel">取消</el-button>
       </div>
       </div>
     </div>
     </div>
+    <div class="tips-info">
+      <i class="el-icon-warning"></i>
+      按住鼠标左键拖动,框选评卷区域。可以设置多个评卷区域。当不设置评卷区域时,评卷时将展示答题卡所有答题区。
+    </div>
     <div v-if="modalIsShow" class="area-container">
     <div v-if="modalIsShow" class="area-container">
       <area-cropper
       <area-cropper
         v-for="(paper, index) in paperList"
         v-for="(paper, index) in paperList"

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

@@ -274,7 +274,7 @@ export default {
       );
       );
       if (hasGroupNoPic) {
       if (hasGroupNoPic) {
         const confirm = await this.$confirm(
         const confirm = await this.$confirm(
-          `当前评卷员分组中存在没有设置答题区的分组, 确定要提交吗?`,
+          `当前评卷员分组中存在没有设置评卷区的分组, 确定要提交吗?`,
           "提示",
           "提示",
           {
           {
             type: "warning"
             type: "warning"

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

@@ -67,7 +67,12 @@
       </el-table-column>
       </el-table-column>
       <el-table-column label="答案" width="200px">
       <el-table-column label="答案" width="200px">
         <template slot-scope="scope">
         <template slot-scope="scope">
-          <answer-popover v-model="scope.row.answer"></answer-popover>
+          <el-input
+            v-model.trim="scope.row.answer"
+            placeholder="请输入答案"
+            maxlength="26"
+            clearable
+          ></el-input>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
@@ -77,12 +82,10 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import AnswerPopover from "./AnswerPopover.vue";
 import { updateObjectiveAnswer } from "../../api";
 import { updateObjectiveAnswer } from "../../api";
 
 
 export default {
 export default {
   name: "modify-objective-answer",
   name: "modify-objective-answer",
-  components: { AnswerPopover },
   props: {
   props: {
     instance: {
     instance: {
       type: Object,
       type: Object,
@@ -155,12 +158,24 @@ export default {
     checkData() {
     checkData() {
       let errorMessages = [];
       let errorMessages = [];
       this.tableData.forEach(item => {
       this.tableData.forEach(item => {
-        let errorMsg = ``;
-        if (!item.answer) {
-          errorMsg += `第${item.mainNumber}大题,第${item.subNumber}小题,答案不能为空,`;
+        let errorMsg = "";
+        if (item.answer) {
+          if (!/^[A-Z]{1,26}$/.test(item.answer)) {
+            errorMsg += `答案只能输入英文大写字母`;
+          } else {
+            const ansSet = new Set(item.answer.split(""));
+            if (ansSet.size !== item.answer.length) {
+              errorMsg += `答案不能重复`;
+            }
+          }
+        } else {
+          errorMsg += `答案不能为空`;
         }
         }
+
         if (errorMsg) {
         if (errorMsg) {
-          errorMessages.push(errorMsg);
+          errorMessages.push(
+            `第${item.mainNumber}大题,第${item.subNumber}小题,${errorMsg}`
+          );
         }
         }
       });
       });
       if (errorMessages.length) {
       if (errorMessages.length) {

+ 15 - 5
src/modules/stmms/views/UploadStructure.vue

@@ -28,6 +28,7 @@
         <el-table-column
         <el-table-column
           prop="thirdRelateId"
           prop="thirdRelateId"
           label="云阅卷考试ID"
           label="云阅卷考试ID"
+          width="120"
         ></el-table-column>
         ></el-table-column>
         <el-table-column
         <el-table-column
           prop="thirdRelateName"
           prop="thirdRelateName"
@@ -39,13 +40,17 @@
           </span>
           </span>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
         <el-table-column prop="paperNumber" label="试卷编号"></el-table-column>
-        <el-table-column prop="paperType" label="试卷类型"></el-table-column>
+        <el-table-column
+          prop="paperType"
+          label="试卷类型"
+          width="100"
+        ></el-table-column>
         <el-table-column prop="status" label="状态" width="100">
         <el-table-column prop="status" label="状态" width="100">
           <template slot-scope="scope">
           <template slot-scope="scope">
             {{ scope.row.status | markTaskSyncStatusFilter }}
             {{ scope.row.status | markTaskSyncStatusFilter }}
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column class-name="action-column" label="操作" width="180px">
+        <el-table-column class-name="action-column" label="操作" width="220px">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-button
             <el-button
               class="btn-primary"
               class="btn-primary"
@@ -102,17 +107,17 @@
     <UploadPaperAnswerDialog
     <UploadPaperAnswerDialog
       ref="UploadPaperAnswerDialog"
       ref="UploadPaperAnswerDialog"
       :instance="curTask"
       :instance="curTask"
-      @modified="getList"
+      @modified="delayUpdateList"
     />
     />
     <ModifyMarkParams
     <ModifyMarkParams
       ref="ModifyMarkParams"
       ref="ModifyMarkParams"
       :instance="curTask"
       :instance="curTask"
-      @modified="getList"
+      @modified="delayUpdateList"
     />
     />
     <ModifyObjectiveAnswer
     <ModifyObjectiveAnswer
       ref="ModifyObjectiveAnswer"
       ref="ModifyObjectiveAnswer"
       :instance="curTask"
       :instance="curTask"
-      @modified="getList"
+      @modified="delayUpdateList"
     />
     />
   </div>
   </div>
 </template>
 </template>
@@ -157,6 +162,11 @@ export default {
     // });
     // });
   },
   },
   methods: {
   methods: {
+    delayUpdateList() {
+      setTimeout(() => {
+        this.getList();
+      }, 1000);
+    },
     async getList() {
     async getList() {
       if (!this.checkPrivilege("list", "list")) return;
       if (!this.checkPrivilege("list", "list")) return;
       const datas = {
       const datas = {