|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
- <el-dialog title="绑定班级" :visible.sync="classVisible" width="30%" center>
|
|
|
- <el-form label-position="right" label-width="80px" :model="bindClassTeacherForm">
|
|
|
+ <el-dialog title="绑定班级" :visible.sync="classVisible" width="30%" center>
|
|
|
+ <el-form v-loading="load" label-position="right" label-width="80px" :model="bindClassTeacherForm">
|
|
|
<el-form-item label="老师姓名" prop="teacherName">
|
|
|
<el-input v-model="bindClassTeacherForm.teacherName" disabled placeholder="请输入老师姓名" />
|
|
|
</el-form-item>
|
|
@@ -31,7 +31,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { listClazzOption } from '@/api/system/clazz'
|
|
|
-import {teacherBindClass} from '@/api/system/teacher_class_relation'
|
|
|
+import {teacherBindClass, searchTeacherBindClass} from '@/api/system/teacher_class_relation'
|
|
|
export default {
|
|
|
props: {
|
|
|
dictTables: {
|
|
@@ -48,15 +48,27 @@ export default {
|
|
|
// 班级下拉列表
|
|
|
clazzOption: [],
|
|
|
bindOptionLoding: false,
|
|
|
- classVisible: false
|
|
|
+ classVisible: false,
|
|
|
+ load: true,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
/** 绑定班级按钮操作 */
|
|
|
handleBindClass(row) {
|
|
|
// this.reset();
|
|
|
+ this.load = true
|
|
|
this.classVisible = true
|
|
|
this.bindClassTeacherForm = row
|
|
|
+
|
|
|
+ // 发送请求
|
|
|
+ searchTeacherBindClass(row.id).then(res => {
|
|
|
+ this.bindClassTeacherForm.classId = res.data
|
|
|
+ this.searchClassOption(true)
|
|
|
+ }).finally(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.load = false
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
},
|
|
|
submitBindClassForm() {
|
|
|
let fomrData = {
|
|
@@ -69,8 +81,9 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
|
this.classVisible = false;
|
|
|
this.bindClassTeacherForm = {}
|
|
|
+
|
|
|
// 父组件调用刷新列表方法
|
|
|
- this.$$emit('ok')
|
|
|
+ this.$emit('ok')
|
|
|
})
|
|
|
},
|
|
|
/** 懒加载班级列表 */
|