|
@@ -19,6 +19,7 @@
|
|
|
:data="i"
|
|
|
:batch="`${index + 1}`"
|
|
|
:noticeList="noticeList"
|
|
|
+ :teacherList="inteaList"
|
|
|
@lesson="toLesson"
|
|
|
@other="toOther"
|
|
|
@toOneClass="toOneClass"
|
|
@@ -32,6 +33,7 @@
|
|
|
:data="i"
|
|
|
:batch="`${index + 1}`"
|
|
|
:noticeList="noticeList"
|
|
|
+ :teacherList="inteaList"
|
|
|
@lesson="toLesson"
|
|
|
@other="toOther"
|
|
|
@toOneClass="toOneClass"
|
|
@@ -104,6 +106,8 @@ export default {
|
|
|
subjectList: [],
|
|
|
//该期通知列表
|
|
|
noticeList: [],
|
|
|
+ //已经选择的教师列表
|
|
|
+ inteaList: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -137,7 +141,7 @@ export default {
|
|
|
...director({ getDirector: 'fetch' }),
|
|
|
...school({ getSchool: 'query' }),
|
|
|
...location({ getLocationList: 'query' }),
|
|
|
- ...teacher({ getTeacherList: 'query', getTeacher: 'fetch' }),
|
|
|
+ ...teacher({ getTeacherList: 'query', getTeacher: 'fetch', getTeachers: 'lessonteafetch' }),
|
|
|
...dirPlan({ dirQuery: 'getDirTeacher' }),
|
|
|
...mapDept({ getDept: 'query' }),
|
|
|
...teaplan(['findTeacher']),
|
|
@@ -176,6 +180,7 @@ export default {
|
|
|
this.$set(this, `list`, usualRes);
|
|
|
this.$set(this, `unusualList`, unusualRes);
|
|
|
this.toGetNoticeList();
|
|
|
+ this.toGetTeachers();
|
|
|
this.loading = false;
|
|
|
},
|
|
|
dealList(classList, lessonList) {
|
|
@@ -413,6 +418,7 @@ export default {
|
|
|
if (this.formType == 'usual') this.$set(this.list[batch - 1], index, { batch, ...info });
|
|
|
else this.$set(this.unusualList[batch - 1], index, { batch, ...info });
|
|
|
this.toClose();
|
|
|
+ this.toGetTeachers();
|
|
|
},
|
|
|
toClose() {
|
|
|
this.lDrawer = false;
|
|
@@ -707,6 +713,23 @@ export default {
|
|
|
const res = await this.getNoticeList({ planid, termid, type: '4' });
|
|
|
if (this.$checkRes(res)) this.$set(this, `noticeList`, res.data);
|
|
|
},
|
|
|
+ async toGetTeachers() {
|
|
|
+ let list = this.list
|
|
|
+ .flat()
|
|
|
+ .filter(f => f.type === 'lesson')
|
|
|
+ .filter(f => {
|
|
|
+ let keys = Object.keys(f);
|
|
|
+ return keys.find(f => f.startsWith('id_'));
|
|
|
+ });
|
|
|
+ let arr = [];
|
|
|
+ list.map(i => {
|
|
|
+ let keys = Object.keys(i).filter(f => f.startsWith('id_'));
|
|
|
+ keys.map(k => arr.push(i[k]));
|
|
|
+ });
|
|
|
+ arr = _.compact(_.uniq(arr));
|
|
|
+ const res = await this.getTeachers(arr);
|
|
|
+ if (this.$checkRes(arr)) this.$set(this, `inteaList`, res.data);
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user', 'defaultOption']),
|