解决公司id匹配无值

This commit is contained in:
red-deng-deng 2021-11-27 22:45:24 +08:00
parent 5ea0e6cf67
commit 85a127ede8
2 changed files with 4 additions and 3 deletions

View File

@ -52,12 +52,13 @@ export default class adduserinfo extends React.Component{
mobile:acceptData.mobile,
password:'yxxt2021',
real_name:acceptData.real_name,
company:_.find(companys, function(o) { return o.key==acceptData.company_id }),
company:companys.find(o=>o.key==acceptData.company_id),
deparment:{key:acceptData.department.id,text:acceptData.department.department_name},
post:{key:acceptData.job.id,text:acceptData.job.job_name},
station:{key:acceptData.role.id,text:acceptData.role.role_name},
}
let img={}
console.log(61,data);
img.src=acceptData.head;
this.setState({model:data,disabled:true,defaultFileList:[img],id:acceptData.id,headImg:acceptData.head});
//若有公司id静默获取部门

View File

@ -138,8 +138,8 @@ export default class addrole extends React.Component{
</FormItem>
<FormItem labelname="数据权限分组" >
<RadioGroup onChange={this.authchange} value={this.state.model.account_type}>
<RadioButton value={1} >管理员</RadioButton>
<RadioButton value={5} >普通账号</RadioButton>
<RadioButton value={1} >所有数据</RadioButton>
<RadioButton value={5} >该账号数据</RadioButton>
</RadioGroup>
</FormItem>
<FormItem labelname="设置权限" prop="setrole" id="setrole">