lrf402788946 преди 5 години
родител
ревизия
91f65d3f4f
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/views/classes/bedroom.vue

+ 3 - 1
src/views/classes/bedroom.vue

@@ -32,6 +32,7 @@ import dataTable from '@frame/components/data-table';
 import dataForm from '@frame/components/form';
 import detailFrame from '@frame/layout/admin/detail-frame';
 const { mapActions: bedroom } = createNamespacedHelpers('bedroom'); //班级
+const { mapActions: student } = createNamespacedHelpers('student');
 export default {
   metaInfo: { title: '寝室安排' },
   name: 'bedroom',
@@ -55,6 +56,7 @@ export default {
     this.search();
   },
   methods: {
+    ...student({ getStudentList: 'query', updateStudent: 'update', removeClass: 'removeClass' }),
     ...bedroom(['getClassList']),
     async search() {
       let res = await this.getClassList(this.id);
@@ -66,7 +68,7 @@ export default {
     async turnSave({ data }) {
       let res = await this.updateStudent(data);
       if (this.$checkRes(res, `转寝成功`, res.errmsg || `转寝失败`)) {
-        this.getStudent();
+        this.search();
         this.toClose();
       }
     },