From 14b376967e92f619156b34f69c0c0dc00afe0ac7 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Thu, 6 Jun 2024 14:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=91=98=E4=BF=A1=E6=81=AF=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiExpand/editExpand.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/components/resiExpand/editExpand.vue b/src/views/components/resiExpand/editExpand.vue index 5090a7b7a..9a7898d99 100644 --- a/src/views/components/resiExpand/editExpand.vue +++ b/src/views/components/resiExpand/editExpand.vue @@ -296,10 +296,12 @@ export default { this.form[childItem.pformName][childItem.formName] = childItem.value || []; } else if (childItem.itemType === 'cascader1') { await this.getOrgTree(); - let maxId = this.formList.filter(item => item.formId == 'parymemberInfoDto')[0].form[0].children.filter(item => item.formName == 'partyOrgId')[0].opction[0].id; - let orgId = JSON.parse(JSON.stringify(childItem.orgPath.split(':'))); - orgId = orgId.slice(orgId.findIndex(item => item === maxId), orgId.length - 1) - this.form[childItem.pformName][childItem.formName] = orgId; + if(childItem.orgPath){ + let maxId = this.formList.filter(item => item.formId == 'parymemberInfoDto')[0].form[0].children.filter(item => item.formName == 'partyOrgId')[0].opction[0].id; + let orgId = JSON.parse(JSON.stringify(childItem.orgPath.split(':'))); + orgId = orgId.slice(orgId.findIndex(item => item === maxId), orgId.length - 1) + this.form[childItem.pformName][childItem.formName] = orgId; + } } else { this.form[childItem.pformName][childItem.formName] = childItem.value != null ? childItem.value : null; }