guhongwei 4 роки тому
батько
коміт
6dfb039980
1 змінених файлів з 28 додано та 0 видалено
  1. 28 0
      src/views/classes/parts/class-table.vue

+ 28 - 0
src/views/classes/parts/class-table.vue

@@ -16,6 +16,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>
@@ -126,6 +131,7 @@ export default {
         { label: '礼仪课小组面试' },
         { label: '结业仪式' },
       ],
+      noticeList: [],
     };
   },
   created() {
@@ -356,6 +362,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() {
@@ -430,6 +438,26 @@ export default {
     toConfirm() {
       this.$emit('toConfirm', _.get(this.lessonInfo, `_id`));
     },
+    getNoticeResult(teaid) {
+      let word = '';
+      if (teaid) {
+        const { notified } = this.noticeList;
+        if (notified) {
+          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']),