|
@@ -177,6 +177,9 @@ export default {
|
|
|
let lessons = await this.getLesson({ termid });
|
|
|
if (this.$checkRes(lessons)) {
|
|
|
lessonList = lessons.data;
|
|
|
+ // 因为操作不当,lesson会产生垃圾数据;所以这里要过滤下,只保留当前班级的lesson
|
|
|
+ const classids = this.classList.map(f => f._id);
|
|
|
+ lessonList = lessonList.filter(f => classids.includes(f.classid));
|
|
|
if (lessonList.length <= 0) {
|
|
|
this.toArrange(false);
|
|
|
return;
|
|
@@ -439,7 +442,8 @@ export default {
|
|
|
// 确定课表
|
|
|
async toStatus() {
|
|
|
let lessonIds = this.lessonList.map(i => i.id);
|
|
|
- const res = await this.confirmLesson(lessonIds);
|
|
|
+ const classids = this.classList.map(f => f._id);
|
|
|
+ const res = await this.confirmLesson({ ids: lessonIds, classids });
|
|
|
this.$checkRes(res, '课表确定成功', res.errmsg || '课表确定失败');
|
|
|
},
|
|
|
// 获取消息
|