修改bug

This commit is contained in:
曹辉 2022-08-29 14:23:07 +08:00
parent 7aef176fe7
commit 0fc8cf0e30

View File

@ -284,7 +284,11 @@
<el-input v-model="form.studentName" placeholder="请输入学生姓名" /> <el-input v-model="form.studentName" placeholder="请输入学生姓名" />
</el-form-item> </el-form-item>
<el-form-item label="学生编号" prop="studentNumber"> <el-form-item label="学生编号" prop="studentNumber">
<el-input v-model="form.studentNumber" placeholder="请输入学生编号" maxlength="20" /> <el-input
v-model="form.studentNumber"
placeholder="请输入学生编号"
maxlength="20"
/>
</el-form-item> </el-form-item>
<el-form-item label="学生性别" prop="studentSex"> <el-form-item label="学生性别" prop="studentSex">
<el-radio-group v-model="form.studentSex"> <el-radio-group v-model="form.studentSex">
@ -1006,15 +1010,16 @@ export default {
this.form = response.data; this.form = response.data;
this.classinfoName = this.form.className; this.classinfoName = this.form.className;
this.classinfoId = this.form.classId; this.classinfoId = this.form.classId;
console.log(this.form);
if (this.form.parentStudentInfoList.length == 0) { if (this.form.parentStudentInfoList == null) {
} else if (this.form.parentStudentInfoList.length == 0) {
} else if (this.form.parentStudentInfoList.length == 1) { } else if (this.form.parentStudentInfoList.length == 1) {
this.parentlist.push(this.form.parentStudentInfoList[0]); this.parentlist.push(this.form.parentStudentInfoList[0]);
} else if (this.form.parentStudentInfoList.length == 2) { } else if (this.form.parentStudentInfoList.length == 2) {
this.parentlist.push(this.form.parentStudentInfoList[0]); this.parentlist.push(this.form.parentStudentInfoList[0]);
this.parentlist.push(this.form.parentStudentInfoList[1]); this.parentlist.push(this.form.parentStudentInfoList[1]);
} }
console.log(this.parentlist);
if (this.parentlist.length == 0) { if (this.parentlist.length == 0) {
this.parentInfoName = "请选择学生家长"; this.parentInfoName = "请选择学生家长";
@ -1069,7 +1074,8 @@ export default {
// } // }
this.form2.id = this.form.id; this.form2.id = this.form.id;
this.form2.classId = this.form.classId; this.form2.classId = this.form.classId;
if (this.form.parentStudentInfoList.length == 0) { if (this.form.parentStudentInfoList == null) {
} else if (this.form.parentStudentInfoList.length == 0) {
} else if (this.form.parentStudentInfoList.length == 1) { } else if (this.form.parentStudentInfoList.length == 1) {
this.form2.parentIdList.push(this.form.parentStudentInfoList[0].id); this.form2.parentIdList.push(this.form.parentStudentInfoList[0].id);
} else if (this.form.parentStudentInfoList.length == 2) { } else if (this.form.parentStudentInfoList.length == 2) {