🐛 fix: 子账号字段不存在报错
This commit is contained in:
parent
799a288849
commit
425f667dff
|
@ -46,7 +46,6 @@ export default class addUserinfo extends React.Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(e) {}
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
let _self = this;
|
let _self = this;
|
||||||
this.getCompanyFn(); //获取公司
|
this.getCompanyFn(); //获取公司
|
||||||
|
@ -67,10 +66,10 @@ export default class addUserinfo extends React.Component {
|
||||||
real_name: acceptData.real_name,
|
real_name: acceptData.real_name,
|
||||||
company: companys.find((o) => o.key == acceptData.company_id),
|
company: companys.find((o) => o.key == acceptData.company_id),
|
||||||
deparment: {
|
deparment: {
|
||||||
key: acceptData.department.id,
|
key: acceptData.department?.id,
|
||||||
text: acceptData.department.department_name
|
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);
|
let ruleIds = formInfo.rowData.rule.map((item) => item.id);
|
||||||
this.setState({ ruleId: ruleIds });
|
this.setState({ ruleId: ruleIds });
|
||||||
|
|
Loading…
Reference in New Issue