|
@@ -100,11 +100,14 @@ class TeaplanService extends CrudService {
|
|
|
}
|
|
|
// 遍历所有批次信息
|
|
|
// 将全年计划中的批次信息取出放在一个数组中
|
|
|
- const teaListKfp = [];
|
|
|
+ let teaListKfp = [];
|
|
|
+ let teaListAll = headteacherList;
|
|
|
for (const term of trainplan.termnum) {
|
|
|
for (const batch of term.batchnum) {
|
|
|
- let teaListAll = [];
|
|
|
- teaListAll = headteacherList;
|
|
|
+ if (teaListAll.length === 0) {
|
|
|
+ teaListAll = teaListKfp;
|
|
|
+ teaListKfp = [];
|
|
|
+ }
|
|
|
for (const teaplan of teaplanList) {
|
|
|
if (teaplan.nodate && (teaplan.nodate).length > 0) {
|
|
|
// 遍历班主任全年计划表中的不能上课的日期
|
|
@@ -144,6 +147,7 @@ class TeaplanService extends CrudService {
|
|
|
_class.headteacherid = _tea.id;
|
|
|
_.remove(teaListAll_, item => item.id === _tea.id);
|
|
|
_.remove(teaListAll, item => item.id === _tea.id);
|
|
|
+ teaListKfp.push(_tea);
|
|
|
index = index + 1;
|
|
|
break;
|
|
|
}
|