|
@@ -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() {
|