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; }