|
@@ -15,7 +15,10 @@
|
|
<template v-slot="{ row, $index }">
|
|
<template v-slot="{ row, $index }">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24">{{ getProp(row, `subname_day${index + 1}`) }}</el-col>
|
|
<el-col :span="24">{{ getProp(row, `subname_day${index + 1}`) }}</el-col>
|
|
- <el-col :span="24" v-if="getProp(row, `teaname_day${index + 1}`)">{{ getProp(row, `teaname_day${index + 1}`) }}</el-col>
|
|
|
|
|
|
+ <el-col :span="24" v-if="getProp(row, `teaname_day${index + 1}`)">
|
|
|
|
+ <p>{{ getProp(row, `teaname_day${index + 1}`) }}</p>
|
|
|
|
+ <p>{{ getPhone(row, `teaid_day${index + 1}`) }}</p>
|
|
|
|
+ </el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-link :type="wordColor(getNoticeResult(getProp(row, `teaid_day${index + 1}`)))">
|
|
<el-link :type="wordColor(getNoticeResult(getProp(row, `teaid_day${index + 1}`)))">
|
|
{{ getNoticeResult(getProp(row, `teaid_day${index + 1}`)) }}
|
|
{{ getNoticeResult(getProp(row, `teaid_day${index + 1}`)) }}
|
|
@@ -146,7 +149,7 @@ export default {
|
|
...mapUtil(['fetch']),
|
|
...mapUtil(['fetch']),
|
|
...lesson(['query', 'create', 'update']),
|
|
...lesson(['query', 'create', 'update']),
|
|
...subject({ getSubject: 'query' }),
|
|
...subject({ getSubject: 'query' }),
|
|
- ...teacher({ getTeacher: 'query' }),
|
|
|
|
|
|
+ ...teacher({ getTeacher: 'query', lessonteafetch: 'lessonteafetch' }),
|
|
...school({ getSchool: 'query' }),
|
|
...school({ getSchool: 'query' }),
|
|
async search() {
|
|
async search() {
|
|
let res = await this.fetch({ model: 'lesson', classid: _.get(this.classInfo, '_id') });
|
|
let res = await this.fetch({ model: 'lesson', classid: _.get(this.classInfo, '_id') });
|
|
@@ -158,6 +161,7 @@ export default {
|
|
this.$set(this, `lessonInfo`, _.omit(res.data, ['lessons']));
|
|
this.$set(this, `lessonInfo`, _.omit(res.data, ['lessons']));
|
|
let arr = _.get(res.data, `lessons`, []);
|
|
let arr = _.get(res.data, `lessons`, []);
|
|
this.$set(this, `oLessonList`, _.cloneDeep(arr));
|
|
this.$set(this, `oLessonList`, _.cloneDeep(arr));
|
|
|
|
+ this.seachTeacher();
|
|
let x = this.getX(JSON.parse(JSON.stringify(arr)));
|
|
let x = this.getX(JSON.parse(JSON.stringify(arr)));
|
|
this.getY(JSON.parse(JSON.stringify(arr)));
|
|
this.getY(JSON.parse(JSON.stringify(arr)));
|
|
this.$set(this, `dateList`, x);
|
|
this.$set(this, `dateList`, x);
|
|
@@ -353,11 +357,19 @@ export default {
|
|
arr.map(i => i.time)
|
|
arr.map(i => i.time)
|
|
);
|
|
);
|
|
},
|
|
},
|
|
- //教师列表,课程列表,通知信息
|
|
|
|
|
|
+ //课程列表
|
|
async getOtherList() {
|
|
async getOtherList() {
|
|
let res = await this.getSubject();
|
|
let res = await this.getSubject();
|
|
if (this.$checkRes(res)) this.$set(this, `subjectList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `subjectList`, res.data);
|
|
- res = await this.getTeacher({ status: '4' });
|
|
|
|
|
|
+ // res = await this.getTeacher({ status: '4' });
|
|
|
|
+ // if (this.$checkRes(res)) this.$set(this, `teacherList`, res.data);
|
|
|
|
+ },
|
|
|
|
+ // 教师列表
|
|
|
|
+ async seachTeacher() {
|
|
|
|
+ let arr = this.oLessonList.filter(item => item.teaid != null);
|
|
|
|
+ let NewArr = _.uniqBy(arr, 'teaid');
|
|
|
|
+ var ids = NewArr.map(item => item.teaid);
|
|
|
|
+ let res = await this.lessonteafetch(ids);
|
|
if (this.$checkRes(res)) this.$set(this, `teacherList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `teacherList`, res.data);
|
|
res = await this.fetch({ model: 'notice', classid: this.classInfo.id, type: '4', planid: this.classInfo.planid, termid: this.classInfo.termid });
|
|
res = await this.fetch({ model: 'notice', classid: this.classInfo.id, type: '4', planid: this.classInfo.planid, termid: this.classInfo.termid });
|
|
if (this.$checkRes(res)) this.$set(this, `noticeList`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `noticeList`, res.data);
|
|
@@ -392,6 +404,11 @@ export default {
|
|
getProp(data, prop) {
|
|
getProp(data, prop) {
|
|
return _.get(data, prop);
|
|
return _.get(data, prop);
|
|
},
|
|
},
|
|
|
|
+ // 手机号
|
|
|
|
+ getPhone(data, prop) {
|
|
|
|
+ let teacher = this.teacherList.find(f => f.id == _.get(data, prop));
|
|
|
|
+ if (teacher) return teacher.phone;
|
|
|
|
+ },
|
|
//时间处理
|
|
//时间处理
|
|
hsavetime(type) {
|
|
hsavetime(type) {
|
|
let { index } = this.form;
|
|
let { index } = this.form;
|