Browse Source

随考随阅

xiatian 1 month ago
parent
commit
6c655bb080

+ 2 - 1
src/modules/marking/routes/routes.js

@@ -46,7 +46,8 @@ export default [
         component: MarkSettingMain,
       },
       {
-        path: "mark_setting_fast/:workId/:name/:courseCode/:courseName", //评卷快速设置主页面
+        path: "mark_setting_fast", //评卷快速设置主页面
+        name: "MarkSettingFast",
         component: MarkSettingFast,
       },
       {

+ 3 - 1
src/modules/marking/views/MarkSettingFast.vue

@@ -122,6 +122,7 @@ export default {
       workId: "",
       examName: "",
       courseCode: "",
+      courseId: "",
       markTasks: {
         workId: "",
         userId: [],
@@ -148,6 +149,7 @@ export default {
     this.workId = this.$route.params.workId;
     this.examName = this.$route.params.name;
     this.courseCode = this.$route.params.courseCode;
+    this.courseId = this.$route.params.courseId;
     this.initMarker();
     this.searchSelectedMarker();
     //校验评卷工作是否开始,如果开始则不能删除评卷员
@@ -170,7 +172,7 @@ export default {
         this.markTasks = {
           workId: this.workId,
           userIds: this.selectedIds,
-          courseCode: this.courseCode,
+          courseId: this.courseId,
         };
         this.loading = true;
         this.$http.post(MARKING_LOGIC_API + "/markTasks", this.markTasks).then(

+ 8 - 11
src/modules/marking/views/MarkSettingMain.vue

@@ -178,7 +178,6 @@
               <template slot-scope="scope">
                 <div class="pull-left">
                   <el-button
-                    v-if="scope.row.totalCount > 0"
                     type="primary"
                     size="mini"
                     plain
@@ -378,17 +377,15 @@ export default {
     },
     fastSetting(index, row) {
       this.paperId = row.pk;
-      var url =
-        "/marking/mark_setting_fast/" +
-        this.$route.params.workId +
-        "/" +
-        encodeURIComponent(this.$route.params.name) +
-        "/" +
-        encodeURIComponent(row.code) +
-        "/" +
-        encodeURIComponent(row.name);
       this.$router.push({
-        path: url,
+        name: "MarkSettingFast",
+        params: {
+          workId: this.$route.params.workId,
+          name: this.$route.params.name,
+          courseCode: row.code,
+          courseName: row.name,
+          courseId: row.courseId,
+        },
       });
     },
     filterSetting() {