liting2017 7 years ago
parent
commit
10b231b7cf
1 changed files with 4 additions and 2 deletions
  1. 4 2
      js/component/manageCenter/set/userManagementS/newRole.jsx

+ 4 - 2
js/component/manageCenter/set/userManagementS/newRole.jsx

@@ -62,7 +62,7 @@ const Newrole = Form.create()(React.createClass({
 					url: globalConfig.context + '/api/admin/role',
 					data: {
 						data:JSON.stringify({
-							'id':this.state.id?this.state.id:null,
+							'id':this.state.ids?this.state.ids:null,
 							'roleName': this.state.roleName,
 							'permissions': selectAllId
 						})
@@ -73,7 +73,8 @@ const Newrole = Form.create()(React.createClass({
 					});
 					if(!data.error.length) {
 						message.success('保存成功!');
-						this.handleCancel()
+						this.handleOk()
+						
 					} else {
 						message.warning(data.error[0].message);
 					}
@@ -107,6 +108,7 @@ const Newrole = Form.create()(React.createClass({
                 	)
                 })
                 this.setState({
+					ids:record.id,
                 	roleName:thisData[0].rname,
                 	checkedKeys:idList,	
                 });