🐛 fix: 子账号字段不存在报错

This commit is contained in:
wangsongsole 2023-04-27 17:20:07 +08:00
parent 799a288849
commit 425f667dff
1 changed files with 3 additions and 4 deletions

View File

@ -46,7 +46,6 @@ export default class addUserinfo extends React.Component {
};
}
componentDidMount(e) {}
componentWillMount() {
let _self = this;
this.getCompanyFn(); //获取公司
@ -67,10 +66,10 @@ export default class addUserinfo extends React.Component {
real_name: acceptData.real_name,
company: companys.find((o) => o.key == acceptData.company_id),
deparment: {
key: acceptData.department.id,
text: acceptData.department.department_name
key: acceptData.department?.id,
text: acceptData.department?.department_name
},
post: { key: acceptData.job.id, text: acceptData.job.job_name }
post: { key: acceptData.job?.id, text: acceptData.job?.job_name }
};
let ruleIds = formInfo.rowData.rule.map((item) => item.id);
this.setState({ ruleId: ruleIds });