角色编辑更新接口
This commit is contained in:
parent
2288ae7b1c
commit
0b84d0f24a
|
@ -41,6 +41,7 @@ export default class addrole extends React.Component{
|
|||
submit(){
|
||||
let roleFlag=this.refs.roleform.validator();
|
||||
let self=this;
|
||||
|
||||
if(this.refs.roletree.state.checkedKeys.length<1){
|
||||
Notify.error('请至少选中一个模块权限')
|
||||
}else{
|
||||
|
@ -125,7 +126,7 @@ export default class addrole extends React.Component{
|
|||
value={this.state.model.role} placeholder={"请输入角色"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'520px'} alignment={'left'}/>
|
||||
</FormItem>
|
||||
<FormItem labelname="设置权限" prop="setrole" id="setrole">
|
||||
<Tree ref="roletree"/>
|
||||
<Tree ref="roletree" rules={this.state.menuList.rule_id}/>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</Card>
|
||||
|
|
|
@ -30,6 +30,7 @@ export default class tree extends React.Component{
|
|||
}
|
||||
componentWillMount(){
|
||||
this.getMenuFn();
|
||||
this.setState({checkedKeys:this.props.rules});
|
||||
}
|
||||
render(){
|
||||
const { checkedKeys, disabledCheckedKeys } = this.state;
|
||||
|
|
Loading…
Reference in New Issue