|
@@ -313,25 +313,12 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
|
|
+ async mounted() {
|
|
|
//获取成绩信息
|
|
//获取成绩信息
|
|
|
- let getResultIntervel = setInterval(() => {
|
|
|
|
|
- if (this.course.id) {
|
|
|
|
|
- clearInterval(getResultIntervel);
|
|
|
|
|
- getStudentFinaleResult(this.course.id)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- this.data = res.data;
|
|
|
|
|
- this.isResultLoading = false;
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- this.isResultLoading = false;
|
|
|
|
|
- this.$toast.open({
|
|
|
|
|
- message: e.message || "服务器错误,请稍后再试",
|
|
|
|
|
- type: "is-danger"
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }, 800);
|
|
|
|
|
|
|
+ const resultData = await getStudentFinaleResult(
|
|
|
|
|
+ this.$route.params.courseId
|
|
|
|
|
+ );
|
|
|
|
|
+ this.data = resultData;
|
|
|
//统计学生分数
|
|
//统计学生分数
|
|
|
let studentResultStatistics = this.studenResultStatistics(this.data);
|
|
let studentResultStatistics = this.studenResultStatistics(this.data);
|
|
|
//绘制图表
|
|
//绘制图表
|