Jelajahi Sumber

审核课表

lrf402788946 4 tahun lalu
induk
melakukan
19b9343e4c
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  1. 9 1
      src/views/train-plan/term-lesson.vue

+ 9 - 1
src/views/train-plan/term-lesson.vue

@@ -8,6 +8,9 @@
         <el-col :span="2">
           <el-button type="primary" size="mini" @click="allSave">保存期课表</el-button>
         </el-col>
+        <el-col :span="2">
+          <el-button type="primary" size="mini" plain @click="toStatus">确定课表</el-button>
+        </el-col>
       </el-row>
       <el-row type="flex" v-loading="loading" style="min-height:500px">
         <el-col :span="8" v-for="(i, index) in list" :key="index">
@@ -106,7 +109,7 @@ export default {
     );
   },
   methods: {
-    ...lesson({ getLesson: 'query', plupdate: 'pluralUpdate', autoArrange: 'arrange' }),
+    ...lesson({ getLesson: 'query', plupdate: 'pluralUpdate', autoArrange: 'arrange', confirmLesson: 'confirmLesson' }),
     ...classes({ getClass: 'query', pcupdate: 'pluralUpdate' }),
 
     ...subject({ getSubject: 'query' }),
@@ -672,6 +675,11 @@ export default {
         }
       }
     },
+    async toStatus() {
+      let lessonIds = this.lessonList.map(i => i.id);
+      const res = await this.confirmLesson(lessonIds);
+      this.$checkRes(res, '课表确定成功', res.errmsg || '课表确定失败');
+    },
   },
   computed: {
     ...mapState(['user', 'defaultOption']),