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