Browse Source

Merge branch 'dev_v4.0.2' of http://git.qmth.com.cn/examcloud-frontend/examcloud-admin-web into dev_v4.0.2

qinchao 4 years ago
parent
commit
bc9ecb928b
2 changed files with 57 additions and 6 deletions
  1. 55 6
      src/modules/marking/views/MarkPaperCheck.vue
  2. 2 0
      src/modules/oe/views/examSummary.vue

+ 55 - 6
src/modules/marking/views/MarkPaperCheck.vue

@@ -154,6 +154,16 @@
           </el-form>
 
           <div class="block-seperator"></div>
+          <span>操作:</span>
+          <el-button
+            type="danger"
+            icon="el-icon-arrow-left"
+            size="mini"
+            :disabled="noBatchSelected"
+            @click="bachBackRefresh"
+            >打回
+          </el-button>
+          <div style="width: 100%;margin-bottom: 10px;"></div>
           <!-- 页面列表 -->
           <el-table
             stripe
@@ -162,7 +172,9 @@
             :data="tableData"
             border
             style="width: 100%"
+            @selection-change="selectChange"
           >
+            <el-table-column type="selection" width="50"></el-table-column>
             <el-table-column
               label="试卷ID"
               width="150"
@@ -279,6 +291,7 @@ import Viewer from "viewerjs";
 export default {
   data() {
     return {
+      selectedIds: [],
       formSearch: {
         orgCode: "",
         studentName: "",
@@ -327,9 +340,18 @@ export default {
         courseSelect.push({ code: course.code, courseInfo: courseInfo });
       }
       return courseSelect;
+    },
+    noBatchSelected() {
+      return this.selectedIds.length === 0;
     }
   },
   methods: {
+    selectChange(rows) {
+      this.selectedIds = [];
+      rows.forEach(element => {
+        this.selectedIds.push(element.id);
+      });
+    },
     viewPicture(imagesClass, index) {
       const viewer = new Viewer(document.querySelector(imagesClass), {
         container: "#app",
@@ -607,14 +629,41 @@ export default {
         return (c == "x" ? r : (r & 0x3) | 0x8).toString(16);
       });
     },
+
+    //批量打回
+    bachBackRefresh() {
+      this.$confirm("确定打回?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          var url = MARKING_API + "/markResults/reject";
+          this.$http.post(url, this.selectedIds).then(() => {
+            this.searchMarkPaperCheck();
+          });
+        })
+        .catch(() => {
+          /*ignore*/
+        });
+    },
     //打回
     backRefresh(row) {
-      var userId = this.user.userId;
-      var url =
-        MARKING_API + "/markResults/" + row.id + "/reject?creatorId=" + userId;
-      this.$http.post(url).then(() => {
-        this.searchMarkPaperCheck();
-      });
+      this.$confirm("确定打回?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          var url = MARKING_API + "/markResults/reject";
+          var markResultIds = [row.id];
+          this.$http.post(url, markResultIds).then(() => {
+            this.searchMarkPaperCheck();
+          });
+        })
+        .catch(() => {
+          /*ignore*/
+        });
     },
     operaQuery() {
       let formData = this.$route.query;

+ 2 - 0
src/modules/oe/views/examSummary.vue

@@ -625,6 +625,7 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/statistic/by/org/export", {
           params: {
             examId: this.examId,
+            examStageId: this.examStageId,
             orgId: this.orgId
           },
           responseType: "arraybuffer",
@@ -653,6 +654,7 @@ export default {
         .get("/api/ecs_oe_admin/exam/student/courseProgress/list/export", {
           params: {
             examId: this.examId,
+            examStageId: this.examStageId,
             courseId: this.courseId
           },
           responseType: "arraybuffer",