Commit 73ee590bb13540ecea342400dfe7fd939f0871a7

Authored by 梁保满
1 parent 6bbcc7ac

学生管理问题

src/views/basic/setUp/student.vue
... ... @@ -445,7 +445,7 @@ export default {
445 445 oldClassId: "",
446 446 className: "",
447 447 classId: "",
448   - classList: "",
  448 + classList: [],
449 449 studentCode: "",
450 450 },
451 451 rulesStuCla: {
... ... @@ -588,7 +588,8 @@ export default {
588 588 //学生调班可选班级
589 589 chooseClassisDisabled(classId) {
590 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 593 if (classId != this.formStuCla.oldClassId && classIds.includes(classId)) {
593 594 isDisabled = true;
594 595 }
... ... @@ -774,7 +775,7 @@ export default {
774 775 changeClazz() {
775 776 let grade = "";
776 777 let classType = "";
777   - this.formStuCla.classList.map((item) => {
  778 + this.formStuCla.classList?.map((item) => {
778 779 if (this.formStuCla.oldClassId == item.id) {
779 780 classType = item.classType;
780 781 grade = item.grade;
... ...