From 0fc8cf0e303cc5c9d456ccf3e2a6481e367b1a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 29 Aug 2022 14:23:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/studentInfo/index.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/views/system/studentInfo/index.vue b/src/views/system/studentInfo/index.vue index 25a9c88..454e80b 100644 --- a/src/views/system/studentInfo/index.vue +++ b/src/views/system/studentInfo/index.vue @@ -284,7 +284,11 @@ - + @@ -1006,15 +1010,16 @@ export default { this.form = response.data; this.classinfoName = this.form.className; 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) { this.parentlist.push(this.form.parentStudentInfoList[0]); } else if (this.form.parentStudentInfoList.length == 2) { this.parentlist.push(this.form.parentStudentInfoList[0]); this.parentlist.push(this.form.parentStudentInfoList[1]); } - console.log(this.parentlist); if (this.parentlist.length == 0) { this.parentInfoName = "请选择学生家长"; @@ -1069,7 +1074,8 @@ export default { // } this.form2.id = this.form.id; 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) { this.form2.parentIdList.push(this.form.parentStudentInfoList[0].id); } else if (this.form.parentStudentInfoList.length == 2) {