|
@@ -1036,7 +1036,7 @@ export default {
|
|
|
|
|
|
this.fullscreenLoading = true;
|
|
|
this.$http.post(url, this.genPaper).then(
|
|
|
- () => {
|
|
|
+ (res) => {
|
|
|
this.$notify({
|
|
|
message: "组卷成功",
|
|
|
type: "success",
|
|
@@ -1046,7 +1046,7 @@ export default {
|
|
|
// this.$router.push({
|
|
|
// path: "/edit_paper/" + paperId + "/gen_paper",
|
|
|
// });
|
|
|
- this.back();
|
|
|
+ this.back(res.data.status);
|
|
|
},
|
|
|
(error) => {
|
|
|
this.$notify({
|
|
@@ -1079,7 +1079,7 @@ export default {
|
|
|
this.genPaper.frozenPaperIds.push(element);
|
|
|
});
|
|
|
this.$http.post(url, this.genPaper).then(
|
|
|
- () => {
|
|
|
+ (res) => {
|
|
|
this.$notify({
|
|
|
message: "组卷成功",
|
|
|
type: "success",
|
|
@@ -1091,7 +1091,7 @@ export default {
|
|
|
// path: "/edit_paper/" + paperId + "/gen_paper",
|
|
|
// });
|
|
|
// } else {
|
|
|
- this.back();
|
|
|
+ this.back(res.data.status);
|
|
|
// }
|
|
|
},
|
|
|
(error) => {
|
|
@@ -1108,8 +1108,28 @@ export default {
|
|
|
this.curSelect = val;
|
|
|
this.searchPaper();
|
|
|
},
|
|
|
- back() {
|
|
|
- this.$router.push({ path: "/questions/gen_paper/1" });
|
|
|
+ back(status) {
|
|
|
+ if ("PASS" == status) {
|
|
|
+ this.$notify({
|
|
|
+ message: "上传成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.$router.push({ path: "/questions/gen_paper/1" });
|
|
|
+ } else {
|
|
|
+ this.$confirm("已开启审核功能.是否跳转到待审列表?", "上传成功", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/questions/exam_paper_pending_trial/0",
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$router.push({ path: "/questions/gen_paper/1" });
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
removePaper(id) {
|
|
|
for (let [index, paper] of this.selectPapers.entries()) {
|