|
@@ -123,6 +123,18 @@ export default {
|
|
|
if (!termid) return;
|
|
|
let lessonList = [];
|
|
|
let classList = [];
|
|
|
+ let classes = await this.getClass({ termid });
|
|
|
+ if (this.$checkRes(classes)) {
|
|
|
+ classList = classes.data;
|
|
|
+ for (let cla of classList) {
|
|
|
+ cla = await this.searchClassPerson(cla);
|
|
|
+ }
|
|
|
+ if (classList.length <= 0) {
|
|
|
+ this.$message.error('班级未生成,无法查询课表,请先进行学生分班');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$set(this, `classList`, classList);
|
|
|
+ }
|
|
|
let lessons = await this.getLesson({ termid });
|
|
|
if (this.$checkRes(lessons)) {
|
|
|
lessonList = lessons.data;
|
|
@@ -132,14 +144,7 @@ export default {
|
|
|
}
|
|
|
this.$set(this, `lessonList`, lessonList);
|
|
|
}
|
|
|
- let classes = await this.getClass({ termid });
|
|
|
- if (this.$checkRes(classes)) {
|
|
|
- classList = classes.data;
|
|
|
- for (let cla of classList) {
|
|
|
- cla = await this.searchClassPerson(cla);
|
|
|
- }
|
|
|
- this.$set(this, `classList`, classList);
|
|
|
- }
|
|
|
+
|
|
|
let unusualList = classList.filter(f => f.type != '0');
|
|
|
let usualList = classList.filter(f => f.type == '0');
|
|
|
let usualRes = this.dealList(usualList, lessonList);
|