|
@@ -957,6 +957,45 @@ export default {
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
|
|
+ confirmGenPaperMType() {
|
|
|
|
+ if (!this.genPaper.paperName) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "试卷名称不能为空!",
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (this.paperDetailStructs.length == 0) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "请选择试卷结构!",
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var url = QUESTION_API + "/genPaper/manual";
|
|
|
|
+
|
|
|
|
+ this.fullscreenLoading = true;
|
|
|
|
+ this.$http.post(url, this.genPaper).then(
|
|
|
|
+ (response) => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "组卷成功",
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ this.fullscreenLoading = false;
|
|
|
|
+ let paperId = response.data.paper.id;
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/edit_paper/" + paperId + "/gen_paper",
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ (error) => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: error.response.data.msg,
|
|
|
|
+ type: "error",
|
|
|
|
+ });
|
|
|
|
+ this.fullscreenLoading = false;
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
confirmGenPaper() {
|
|
confirmGenPaper() {
|
|
if (!this.checkGenPaper()) {
|
|
if (!this.checkGenPaper()) {
|
|
return false;
|
|
return false;
|