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) }} 分
@@ -105,7 +105,7 @@ import { deepClone } from "utils";
export default {
data() {
return {
- questionList:[],
+ questionList: [],
form: {
//答题卡详情
title: "",
@@ -130,7 +130,7 @@ export default {
},
},
created() {
- this._QueryDetail()
+ this._QueryDetail();
},
methods: {
linkBack() {
@@ -201,37 +201,38 @@ export default {
sub.correctAnswer = arrs.sort().join("");
}
},
- async save(){
- let questionList = this.form.questionList.map(item=>{
- item.score = null
- return item
- })
- //更新答题卡
- const { data, status, message } = await this.$request.modifyPaper({
- paperId:this.form.id,
- questionList:questionList
- });
+ async save() {
+ let questionList = this.form.questionList.map((item) => {
+ item.score = null;
+ items.questionId = "";
+ items.questionIndex = "";
+ return item;
+ });
+ //更新答题卡
+ const { data, status, info } = await this.$request.modifyPaper({
+ paperId: this.form.id,
+ questionList: questionList,
+ });
if (status == 0) {
this.$router.push({
- path:"/examinationPaper"
- })
+ path: "/examinationPaper",
+ });
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
async _QueryDetail() {
//查询年级列表
- const { data, status, message } = await this.$request.fetchPaperDetail({
- paperId:this.$route.query.paperId
+ const { data, status, info } = await this.$request.fetchPaperDetail({
+ paperId: this.$route.query.paperId,
});
if (status == 0) {
- this.form = deepClone(data)
- this.questionList = deepClone(data.questionList)
- this.form.questionList.map(item=>{
- item.score = ""
- })
+ this.form = deepClone(data);
+ this.form.questionList.map((item) => {
+ item.score = "";
+ });
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
},
diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue
index ddf47dc..ce7582a 100644
--- a/src/views/examinationPaper/index.vue
+++ b/src/views/examinationPaper/index.vue
@@ -235,7 +235,7 @@ export default {
},
async saveShare() {
//修改分享范围
- const { data, status, message } = await this.$request.modifyPaper({
+ const { data, status, info } = await this.$request.modifyPaper({
paperId: that.shareForm.id,
sharingType: that.shareForm.share,
});
@@ -245,12 +245,12 @@ export default {
this.shareForm.share = 1;
dialogVisible = false;
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
async recovery(item) {
//归档
- const { data, status, message } = await this.$request.modifyPaper({
+ const { data, status, info } = await this.$request.modifyPaper({
paperId: item.id,
status: 2,
});
@@ -259,7 +259,7 @@ export default {
this.page = 1;
this._QueryData(type);
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
//切换班级
@@ -269,7 +269,7 @@ export default {
},
// 查找答题卡类型
async _QueryTypeList() {
- const { data, status, message } = await this.$request.fetchTypeNames({
+ const { data, status, info } = await this.$request.fetchTypeNames({
classId: this.query.classId,
});
if (status === 0) {
@@ -285,12 +285,12 @@ export default {
label: "--",
});
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
// 查找班级
async _QueryClassList() {
- const { data, status, message } = await this.$request.fetchClassList();
+ const { data, status, info } = await this.$request.fetchClassList();
console.log(status)
if (status === 0) {
if (!!data.list) {
@@ -303,12 +303,12 @@ export default {
this.query.classId = this.classList[0]?.value;
}
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
// 查找科目
async _QuerySubjectList() {
- const { data, status, message } = await this.$request.fetchSubjectList({
+ const { data, status, info } = await this.$request.fetchSubjectList({
classId: this.query.classId,
});
if (status === 0) {
@@ -320,7 +320,7 @@ export default {
});
this.query.subjectName = this.subjectList[0]?.value;
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
async _QueryData(type) {
@@ -347,7 +347,7 @@ export default {
return;
}
this.loading = true;
- const { data, status, message } = await this.$request.fetchPaperList({
+ const { data, status, info } = await this.$request.fetchPaperList({
...query,
status: 1,
page: this.page,
@@ -358,7 +358,7 @@ export default {
this.total = data.total;
this.tableData = (data.list && [...data.list]) || [];
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
},
diff --git a/src/views/examinationPaper/recycle.vue b/src/views/examinationPaper/recycle.vue
index 6e3a129..d3f81a3 100644
--- a/src/views/examinationPaper/recycle.vue
+++ b/src/views/examinationPaper/recycle.vue
@@ -186,7 +186,7 @@ export default {
methods: {
async modify(obj) {
//恢复答题卡
- const { data, status, message } = await this.$request.modifyPaper({
+ const { data, status, info } = await this.$request.modifyPaper({
paperId: obj.id,
status: 1,
});
@@ -194,19 +194,19 @@ export default {
let type = this.query.title ? 1 : 0;
this._QueryData(type);
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
async remove(obj) {
//删除答题卡
- const { data, status, message } = await this.$request.delPaper({
+ const { data, status, info } = await this.$request.delPaper({
paperId: obj.id,
});
if (status == 0) {
let type = this.query.title ? 1 : 0;
this._QueryData(type);
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
//切换班级
@@ -232,7 +232,7 @@ export default {
query[key] = null;
}
}
- const { data, status, message } = await this.$request.fetchPaperList({
+ const { data, status, info } = await this.$request.fetchPaperList({
...query,
status:2
});
@@ -241,12 +241,12 @@ export default {
this.total = data.total;
this.tableData = (data.list && [...data.list]) || [];
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
// 查找班级
async _QueryClassList() {
- const { data, status, message } = await this.$request.fetchClassList();
+ const { data, status, info } = await this.$request.fetchClassList();
console.log(status);
if (status === 0) {
if (!!data.list) {
@@ -259,12 +259,12 @@ export default {
this.query.classId = this.classList[0]?.value;
}
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
// 查找科目
async _QuerySubjectList() {
- const { data, status, message } = await this.$request.fetchSubjectList({
+ const { data, status, info } = await this.$request.fetchSubjectList({
classId: this.query.classId,
});
if (status === 0) {
@@ -276,12 +276,12 @@ export default {
});
this.query.subjectName = this.subjectList[0]?.value;
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
// 查找答题卡类型
async _QueryTypeList() {
- const { data, status, message } = await this.$request.fetchTypeNames({
+ const { data, status, info } = await this.$request.fetchTypeNames({
classId: this.query.classId,
});
if (status === 0) {
@@ -297,7 +297,7 @@ export default {
label: "--",
});
} else {
- this.$message.error(message);
+ this.$message.error(info);
}
},
},
diff --git a/src/views/layout/header/header.vue b/src/views/layout/header/header.vue
index d8094c5..e37892d 100644
--- a/src/views/layout/header/header.vue
+++ b/src/views/layout/header/header.vue
@@ -129,9 +129,9 @@ export default {
this.$store.dispatch("permissions", this);
},
async logOut() {
- const { data } = await this.$request.logout();
- if (data.status == 0) {
- if (data.data) {
+ const { data,status } = await this.$request.logout();
+ if (status == 0) {
+ if (data) {
window.location.href = data;
} else {
this.$router.push({
diff --git a/src/views/portrait/index.vue b/src/views/portrait/index.vue
index d0f86cb..d427429 100644
--- a/src/views/portrait/index.vue
+++ b/src/views/portrait/index.vue
@@ -1,5 +1,11 @@
- 学生画像
+
+
+
+ {{ "学生画像" }}
+
+
+