|
@@ -97,6 +97,15 @@ export default {
|
|
|
},
|
|
|
visibleChange() {
|
|
|
this.modalForm = this.$objAssign(initModalForm, this.instance);
|
|
|
+ const hasTeacher = this.teachers.find(
|
|
|
+ (item) => item.id === this.instance.teacherId
|
|
|
+ );
|
|
|
+ if (!hasTeacher) {
|
|
|
+ this.modalForm.teacherId = null;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.modalFormComp.validateField("teacherId");
|
|
|
+ });
|
|
|
+ }
|
|
|
this.isSubmit = false;
|
|
|
},
|
|
|
cancel() {
|