|
@@ -1173,12 +1173,11 @@ export default {
|
|
|
} catch (err) {}
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
- if (this.isSubmit ||
|
|
|
- (to.path == "/home" && !this.$store.state.userInfo)) {
|
|
|
+ if (this.isSubmit || (to.path == "/home" && !this.$store.state.userInfo)) {
|
|
|
//交卷
|
|
|
next();
|
|
|
} else {
|
|
|
- next(false)
|
|
|
+ next(false);
|
|
|
//离开
|
|
|
if (this.bankType == 1) {
|
|
|
let ansCount = this.questionOverNum(true); //已答题数
|
|
@@ -2170,32 +2169,32 @@ export default {
|
|
|
message: "交卷成功"
|
|
|
});
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- this.$router.replace({
|
|
|
- path: "/mock-report",
|
|
|
- query: {
|
|
|
- subscribeId: this.subscribeId,
|
|
|
- eachExamId: this.eachExamId,
|
|
|
- examId: this.examId,
|
|
|
- recordId: this.recordId
|
|
|
- }
|
|
|
- });
|
|
|
- }, 1000);
|
|
|
+ //错题集id提交(客观题)
|
|
|
+ this.$request
|
|
|
+ .mockWrongRecord({
|
|
|
+ eachExamId: this.eachExamId,
|
|
|
+ examId: this.examId,
|
|
|
+ questionIds: form.questionIds,
|
|
|
+ recordId: this.recordId
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.replace({
|
|
|
+ path: "/mock-report",
|
|
|
+ query: {
|
|
|
+ subscribeId: this.subscribeId,
|
|
|
+ eachExamId: this.eachExamId,
|
|
|
+ examId: this.examId,
|
|
|
+ recordId: this.recordId
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 1000);
|
|
|
+ })
|
|
|
+ .catch(err => {});
|
|
|
})
|
|
|
.catch(err => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
-
|
|
|
- //错题集id提交(客观题)
|
|
|
- this.$request
|
|
|
- .mockWrongRecord({
|
|
|
- eachExamId: this.eachExamId,
|
|
|
- examId: this.examId,
|
|
|
- questionIds: form.questionIds,
|
|
|
- recordId: this.recordId
|
|
|
- })
|
|
|
- .then(res => {})
|
|
|
- .catch(err => {});
|
|
|
},
|
|
|
|
|
|
/**
|