|
|
@ -429,17 +429,19 @@ const EmployeeAuth = (props) => { |
|
|
|
<h2>权限范围:</h2> |
|
|
|
<Checkbox style={{ float: 'left', marginTop: 17, }} checked={allChecked} onChange={(value) => { onChangeAll(value) }}>全部权限</Checkbox> |
|
|
|
</div> |
|
|
|
{treeList.map(e => { |
|
|
|
return <div className='codeList'> |
|
|
|
{treeList.map((e, index) => { |
|
|
|
return <div className={`codeList`}> |
|
|
|
<Checkbox onChange={(value) => { onChangeOne(value, e) }} style={{ borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} checked={two[e.id]} key={e.id} value={e.id}>{e.name}</Checkbox> |
|
|
|
{e.child.map(i => { |
|
|
|
return <div> |
|
|
|
<Checkbox value={i.id} style={{ borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} key={i.id} checked={two[i.id]} onChange={(value) => { onCheckAllChange(value, e) }}>{i.name}</Checkbox> |
|
|
|
<CheckboxGroup style={{ width: '100%', borderBottom: '1px solid #f2f2f2', padding: '10px 10px' }} direction='horizontal' value={checkedList}> |
|
|
|
<Checkbox value={i.id} style={{ borderBottom: '1px solid #f2f2f2', padding: '10px 10px 10px 35px' }} key={i.id} checked={two[i.id]} onChange={(value) => { onCheckAllChange(value, e) }}>{i.name}</Checkbox> |
|
|
|
{i.child.length ? |
|
|
|
<CheckboxGroup style={{ width: '100%', borderBottom: '1px solid #f2f2f2', padding: '10px 10px 10px 60px' }} direction='horizontal' value={checkedList}> |
|
|
|
{ |
|
|
|
i.child.map(s => (<Checkbox onChange={(value) => { checkItem(value, e) }} key={s.id} value={s.id} >{s.name}</Checkbox>)) |
|
|
|
} |
|
|
|
</CheckboxGroup> |
|
|
|
</CheckboxGroup> : '' |
|
|
|
} |
|
|
|
</div> |
|
|
|
})} |
|
|
|
|
|
|
|