guhongwei 4 年之前
父节点
当前提交
3918dce26e
共有 1 个文件被更改,包括 27 次插入0 次删除
  1. 27 0
      src/views/train-plan/parts/class-table.vue

+ 27 - 0
src/views/train-plan/parts/class-table.vue

@@ -19,6 +19,11 @@
                 <p>{{ getProp(row, `teaname_day${index + 1}`) }}</p>
                 <p>{{ getPhone(row, `teaid_day${index + 1}`) }}</p>
               </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>
@@ -134,6 +139,7 @@ export default {
         { label: '礼仪课小组面试' },
         { label: '结业仪式' },
       ],
+      noticeList: [],
     };
   },
   created() {
@@ -161,6 +167,7 @@ export default {
         this.$set(this, `dateList`, x);
         arr = this.aData(arr);
         this.$set(this, `lessonList`, arr);
+        this.getTeacherNotice();
       }
     },
     async toSave() {
@@ -364,6 +371,8 @@ export default {
       var ids = NewArr.map(item => item.teaid);
       let res = await this.lessonteafetch(ids);
       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() {
@@ -438,6 +447,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']),