|
@@ -69,6 +69,7 @@ const Newrole = Form.create()(React.createClass({
|
|
|
data:JSON.stringify({
|
|
|
'id':this.state.ids?this.state.ids:null,
|
|
|
'roleName': this.state.roleName,
|
|
|
+ 'roleType': this.state.roleType,
|
|
|
'permissions': selectAllId.checked?selectAllId.checked:selectAllId
|
|
|
})
|
|
|
}
|
|
@@ -98,7 +99,7 @@ const Newrole = Form.create()(React.createClass({
|
|
|
id: record.id
|
|
|
},
|
|
|
success: function (data) {
|
|
|
- let thisData = data.data;
|
|
|
+ let thisData = data.data;
|
|
|
if (!thisData) {
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
@@ -114,14 +115,15 @@ const Newrole = Form.create()(React.createClass({
|
|
|
this.setState({
|
|
|
ids:record.id,
|
|
|
roleName:thisData[0].rname,
|
|
|
- checkedKeys:idList,
|
|
|
- });
|
|
|
+ roleType:thisData[0].roleType,
|
|
|
+ checkedKeys:idList,
|
|
|
+ });
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
|
- this.setState({
|
|
|
+ this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
- }.bind(this));
|
|
|
+ }.bind(this));
|
|
|
}
|
|
|
},
|
|
|
handleOk(e) {
|
|
@@ -150,6 +152,7 @@ const Newrole = Form.create()(React.createClass({
|
|
|
checkedKeys: [],
|
|
|
datauser: {},
|
|
|
roleName:'',
|
|
|
+ roleType:'',
|
|
|
ids:'',
|
|
|
})
|
|
|
}
|
|
@@ -192,7 +195,7 @@ const Newrole = Form.create()(React.createClass({
|
|
|
<Modal maskClosable={false} visible={this.state.visible}
|
|
|
onOk={this.handleOk} onCancel={this.handleCancel}
|
|
|
width='1000px'
|
|
|
- title={!this.props.userDetaile?'添加角色':'编辑角色'}
|
|
|
+ title={!this.props.userDetaile?'添加角色':'编辑角色'}
|
|
|
footer=''
|
|
|
className="admin-desc-content">
|
|
|
<Form layout="horizontal" onSubmit={this.handleSubmit} id="demand-form" style={{paddingBottom:'40px'}} required="required">
|
|
@@ -201,16 +204,21 @@ const Newrole = Form.create()(React.createClass({
|
|
|
<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="角色名称" >
|
|
|
+ label="角色名称" >
|
|
|
<Input placeholder="角色名称" value={this.state.roleName} onChange={(e)=>{this.setState({roleName:e.target.value})}} style={{width:'200px'}} required="required"/>
|
|
|
<span className="mandatory">*</span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
- label="" >
|
|
|
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
|
|
|
- <Button className="set-submit" type="ghost" onClick={this.handleCancel}>返回</Button>
|
|
|
+ label="" >
|
|
|
+ <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
|
|
|
+ <Button className="set-submit" type="ghost" onClick={this.handleCancel}>返回</Button>
|
|
|
</FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="权限编号" >
|
|
|
+ <Input placeholder="权限编号" value={this.state.roleType} onChange={(e)=>{this.setState({roleType:e.target.value})}} style={{width:'200px'}}/>
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
<div className="clearfix" style={{marginLeft:'90px'}}>
|
|
|
<Tree
|
|
@@ -230,10 +238,10 @@ const Newrole = Form.create()(React.createClass({
|
|
|
</div>
|
|
|
</Spin>
|
|
|
</Form >
|
|
|
- </Modal>
|
|
|
+ </Modal>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
}));
|
|
|
|
|
|
-export default Newrole;
|
|
|
+export default Newrole;
|