lrf402788946 5 лет назад
Родитель
Сommit
2ab06217a8
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      src/views/plan/lesson-plan.vue

+ 2 - 3
src/views/plan/lesson-plan.vue

@@ -288,7 +288,6 @@ export default {
       } else this.$message.warning('请选择所授科目');
     },
     setTea({ data }) {
-      //需要检查申请教师的数据内容
       let { id, name } = data;
       this.$set(this.form, `teaid`, id);
       this.$set(this.form, `teaname`, name);
@@ -311,8 +310,8 @@ export default {
           let form = JSON.parse(JSON.stringify(this.form));
           let lesson = _.pick(form, ['day', 'subname', 'teaname', 'subid', 'teaid', 'date', 'week']);
           // 整理列表所需要的数据
-          let res = this.classList.find(f => f.class === form.class);
-          let classIndex = this.classList.findIndex(f => f.class === form.class);
+          let res = this.classList.find(f => f.classid === form.classid);
+          let classIndex = this.classList.findIndex(f => f.classid === form.classid);
           let index = res.lessons.findIndex(f => f.date === form.date);
           this.$set(this.classList[classIndex].lessons, index, lesson);
           this.drawerClose();