lrf402788946 преди 4 години
родител
ревизия
ed1be79cdc
променени са 1 файла, в които са добавени 28 реда и са изтрити 1 реда
  1. 28 1
      src/views/train-plan/parts/class-table.vue

+ 28 - 1
src/views/train-plan/parts/class-table.vue

@@ -16,6 +16,11 @@
             <el-row>
               <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">
+                <el-link :type="wordColor(getNoticeResult(getProp(row, `teaid_day${index + 1}`)))">
+                  {{ getNoticeResult(getProp(row, `teaid_day${index + 1}`)) }}
+                </el-link>
+              </el-col>
             </el-row>
           </template>
         </el-table-column>
@@ -131,6 +136,7 @@ export default {
         { label: '礼仪课小组面试' },
         { label: '结业仪式' },
       ],
+      noticeList: [],
     };
   },
   created() {
@@ -157,6 +163,7 @@ export default {
         this.$set(this, `dateList`, x);
         arr = this.aData(arr);
         this.$set(this, `lessonList`, arr);
+        this.getTeacherNotice();
       }
     },
     async toSave() {
@@ -346,12 +353,14 @@ export default {
         arr.map(i => i.time)
       );
     },
-    //教师列表,课程列表
+    //教师列表,课程列表,通知信息
     async getOtherList() {
       let res = await this.getSubject();
       if (this.$checkRes(res)) this.$set(this, `subjectList`, res.data);
       res = await this.getTeacher({ status: '4' });
       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 });
+      if (this.$checkRes(res)) this.$set(this, `noticeList`, res.data);
     },
     //关闭抽屉
     toClose() {
@@ -421,6 +430,24 @@ export default {
     toConfirm() {
       this.$emit('toConfirm', _.get(this.lessonInfo, `_id`));
     },
+    getNoticeResult(teaid) {
+      let word = '';
+      if (teaid) {
+        const { notified } = this.noticeList;
+        const r = notified.find(f => f.notifiedid == teaid);
+        if (!r) word = '未绑定微信';
+        else {
+          word = r.status == '0' ? '未确认' : '已确认';
+        }
+      }
+      return word;
+    },
+    wordColor(word) {
+      let type = 'danger';
+      if (word == '未确认') type = 'warning';
+      if (word == '已确认') type = 'success';
+      return type;
+    },
   },
   computed: {
     ...mapState(['user']),