From 6fffbd556aac41cd9f86c4e8e6e788c1be7f9b76 Mon Sep 17 00:00:00 2001 From: 阿宝 Date: Mon, 12 Dec 2022 09:12:41 +0800 Subject: [PATCH] 组卷接口调整 --- src/views/examinationPaper/add.vue | 26 ++++++++++++++------------ src/views/examinationPaper/edit.vue | 57 +++++++++++++++++++++++++++++---------------------------- src/views/examinationPaper/index.vue | 24 ++++++++++++------------ src/views/examinationPaper/recycle.vue | 24 ++++++++++++------------ src/views/layout/header/header.vue | 6 +++--- src/views/portrait/index.vue | 8 +++++++- 6 files changed, 77 insertions(+), 68 deletions(-) diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index f5551e6..7c0129a 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -764,7 +764,7 @@ export default { return; } //添加测验类型 - const { data, status, message } = await this.$request.addPaperType({ + const { data, status, info } = await this.$request.addPaperType({ typeName: this.answerTypeName, }); if (status == 0) { @@ -773,7 +773,7 @@ export default { this.answerTypeName = ""; this.$message.success("添加成功"); } else { - this.$message.error(message); + this.$message.error(info); } }, async save() { @@ -789,7 +789,7 @@ export default { items.questionIndex = indexs + 1; }); }); - const { data, status, message } = await this.$request.addPaper({ + const { data, status, info } = await this.$request.addPaper({ ...this.form, }); this.saceLoading = false; @@ -798,7 +798,7 @@ export default { path: "/examinationPaper", }); } else { - this.$message.error(message); + this.$message.error(info); } }, async changeGrade() { @@ -807,7 +807,9 @@ export default { }, async _CreatedTypeList() { //测验类型查询 - const { data, status, message } = await this.$request.fetchTypeNames(); + const { data, status, info } = await this.$request.fetchTypeNames( + {gradeName :grade} + ); if (status == 0) { this.answerTypeList = [...data.list] || []; this.answerTypeList.unshift({ @@ -818,12 +820,12 @@ export default { this.form.tagId = this.answerTypeList[0].id || ""; } } else { - this.$message.error(message); + this.$message.error(info); } }, async _GradeList() { //查询年级列表 - const { data, status, message } = await this.$request.fetchGradeList(); + const { data, status, info } = await this.$request.fetchGradeList(); if (status == 0) { this.gradeList = [...data.gradeNames] || []; if (this.type != 2) { @@ -831,12 +833,12 @@ export default { } this._QuerySubjectList(this.gradeList[0]); } else { - this.$message.error(message); + this.$message.error(info); } }, async _QuerySubjectList(grade) { //查询科目列表 - const { data, status, message } = await this.$request.fetchSubjectList( + const { data, status, info } = await this.$request.fetchSubjectList( {gradeName :grade} ); if (status === 0) { @@ -850,12 +852,12 @@ export default { this.form.subjectName = this.subjectList[0].value; } } else { - this.$message.error(message); + this.$message.error(info); } }, async _QueryDetail() { //查询年级列表 - const { data, status, message } = await this.$request.fetchPaperDetail({ + const { data, status, info } = await this.$request.fetchPaperDetail({ paperId: this.$route.query.paperId, }); if (status == 0) { @@ -883,7 +885,7 @@ export default { }; }); } else { - this.$message.error(message); + this.$message.error(info); } }, }, diff --git a/src/views/examinationPaper/edit.vue b/src/views/examinationPaper/edit.vue index a98c609..a3e9fe8 100644 --- a/src/views/examinationPaper/edit.vue +++ b/src/views/examinationPaper/edit.vue @@ -16,11 +16,11 @@

{{ setBigNum(index) }}、 - + 共 {{ setScore(question) }} 分