nikang 6 жил өмнө
parent
commit
53d1cfe936

+ 3 - 0
src/modules/marking/views/MarkPaperCheck.vue

@@ -249,6 +249,7 @@ export default {
         courseCode: "",
         userId: "",
         workId: "",
+        examType: "",
         markRemark: ""
       },
       orgList: [],
@@ -312,6 +313,7 @@ export default {
         tag: "",
         courseCode: "",
         userId: "",
+        examType: "",
         markRemark: ""
       });
     },
@@ -409,6 +411,7 @@ export default {
         (this.currentPage - 1) +
         "/" +
         this.pageSize;
+      this.formSearch.examType = this.examType;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         console.log("查询的列表集合", response);
         this.tableData = response.data.list;

+ 31 - 37
src/modules/marking/views/TpScoreBoard.vue

@@ -543,7 +543,7 @@ export default {
       if (!this.markedResult.id) {
         //正常提交情况
         console.log("提交resultItems", this.resultItems);
-        this.$http
+        this.$httpWithMsg
           .post(
             MARKING_API +
               "/markResults?studentPaperId=" +
@@ -623,10 +623,10 @@ export default {
                     }
                   );
                 } else {
-                  this.$notify({
-                    message: error.response.data.desc,
-                    type: "error"
-                  });
+                  if (error.response.data.code == 403) {
+                    this.$loading().close();
+                    return;
+                  }
                   this.$emit("submitMark");
                   this.loading = false;
                   this.markTypeView = false;
@@ -650,41 +650,35 @@ export default {
         console.log("markedResult", this.markedResult);
         this.markedResult.resultItems = this.resultItems;
         this.markedResult.remark = remarkValue;
-        this.$http.put(MARKING_API + "/markResults", this.markedResult).then(
-          response => {
-            this.saveMarkSign();
-            console.log(response);
-            this.$notify({
-              message: "提交成功",
-              type: "success"
-            });
-            this.$emit("submitMark");
-            this.loading = false;
-            this.markTypeView = false;
-            this.problemView = false;
-            this.unusualType = "";
-          },
-          error => {
-            // 响应错误回调
-            console.log(error.response);
-            if (error.response.data.desc) {
-              this.$notify({
-                message: error.response.data.desc,
-                type: "error"
-              });
-            } else {
+        this.$httpWithMsg
+          .put(MARKING_API + "/markResults", this.markedResult)
+          .then(
+            response => {
+              this.saveMarkSign();
+              console.log(response);
               this.$notify({
-                message: "提交失败",
-                type: "error"
+                message: "提交成功",
+                type: "success"
               });
+              this.$emit("submitMark");
+              this.loading = false;
+              this.markTypeView = false;
+              this.problemView = false;
+              this.unusualType = "";
+            },
+            error => {
+              // 响应错误回调
+              if (error.response.data.code == 403) {
+                this.$loading().close();
+                return;
+              }
+              this.$emit("submitMark");
+              this.loading = false;
+              this.markTypeView = false;
+              this.problemView = false;
+              this.unusualType = "";
             }
-            this.$emit("submitMark");
-            this.loading = false;
-            this.markTypeView = false;
-            this.problemView = false;
-            this.unusualType = "";
-          }
-        );
+          );
       }
     },
     initKeyBoardMode() {