Commit 73ee590bb13540ecea342400dfe7fd939f0871a7
1 parent
6bbcc7ac
学生管理问题
Showing
1 changed file
with
4 additions
and
3 deletions
src/views/basic/setUp/student.vue
@@ -445,7 +445,7 @@ export default { | @@ -445,7 +445,7 @@ export default { | ||
445 | oldClassId: "", | 445 | oldClassId: "", |
446 | className: "", | 446 | className: "", |
447 | classId: "", | 447 | classId: "", |
448 | - classList: "", | 448 | + classList: [], |
449 | studentCode: "", | 449 | studentCode: "", |
450 | }, | 450 | }, |
451 | rulesStuCla: { | 451 | rulesStuCla: { |
@@ -588,7 +588,8 @@ export default { | @@ -588,7 +588,8 @@ export default { | ||
588 | //学生调班可选班级 | 588 | //学生调班可选班级 |
589 | chooseClassisDisabled(classId) { | 589 | chooseClassisDisabled(classId) { |
590 | let isDisabled = false; | 590 | let isDisabled = false; |
591 | - let classIds = this.formStuCla.classList.map((item) => item.id); | 591 | + console.log(this.formStuCla) |
592 | + let classIds = this.formStuCla?.classList?.map((item) => item.id); | ||
592 | if (classId != this.formStuCla.oldClassId && classIds.includes(classId)) { | 593 | if (classId != this.formStuCla.oldClassId && classIds.includes(classId)) { |
593 | isDisabled = true; | 594 | isDisabled = true; |
594 | } | 595 | } |
@@ -774,7 +775,7 @@ export default { | @@ -774,7 +775,7 @@ export default { | ||
774 | changeClazz() { | 775 | changeClazz() { |
775 | let grade = ""; | 776 | let grade = ""; |
776 | let classType = ""; | 777 | let classType = ""; |
777 | - this.formStuCla.classList.map((item) => { | 778 | + this.formStuCla.classList?.map((item) => { |
778 | if (this.formStuCla.oldClassId == item.id) { | 779 | if (this.formStuCla.oldClassId == item.id) { |
779 | classType = item.classType; | 780 | classType = item.classType; |
780 | grade = item.grade; | 781 | grade = item.grade; |