Browse Source

增加角色新加权限

HW 3 years ago
parent
commit
cc62d09833

+ 5 - 5
js/component/dataDic.js

@@ -1550,12 +1550,12 @@ module.exports = {
     {
       value: "3",
       key: "已存在自己私有客户库",
-      color:'#108ee9'
+      color:'#ef7f7f'
     },
     {
       value: "12",
       key: "已存在他人私有客户库",
-      color:'#108ee9'
+      color:'#ef7f7f'
     },
     {
       value: "4",
@@ -1585,12 +1585,12 @@ module.exports = {
     {
       value: "10",
       key: "已存在自己渠道库",
-      color:'#461ddb'
+      color:'#775dd9'
     },
     {
       value: "11",
       key: "已存在他人渠道库",
-      color:'#461ddb'
+      color:'#775dd9'
     },
     {
       value: "8",
@@ -1600,7 +1600,7 @@ module.exports = {
     {
       value: "9",
       key: "客户名称含过滤关键词",
-      color:'#461ddb'
+      color:'#66277b'
     },
   ],
   //账户状态

+ 1 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/duplicateData.jsx

@@ -65,7 +65,7 @@ class DuplicateData extends Component{
                     dataIndex: "status",
                     key: "status",
                     render: (text) => (
-                        getChannelAllocationStatus(text)
+                        getChannelAllocationStatus(text,true)
                     )
                 },
             ],

+ 1 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/statisticalDetails.jsx

@@ -155,6 +155,7 @@ class StatisticalDetails extends Component{
     }
 
     tableRowClick(record) {
+        this.category();
         this.setState({
             rowData:record,
             modalVisible: true,
@@ -167,7 +168,6 @@ class StatisticalDetails extends Component{
     componentWillReceiveProps (nextProps){
         if(nextProps.visible){
             this.loadData(1,nextProps);
-            this.category();
         }
     }
 

+ 20 - 12
js/component/manageCenter/set/userManagementS/newRole.jsx

@@ -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;

+ 4 - 5
js/component/manageCenter/set/userManagementS/user.jsx

@@ -91,7 +91,6 @@ const User = Form.create()(React.createClass({
 		this.setState({
 			userDetaile:false,
 			loading: true,
-			page:pageNo
 		});
 		var admin=window.adminData.isSuperAdmin||'';
 		var departmentId=window.adminData.departmentId||'';
@@ -152,7 +151,6 @@ const User = Form.create()(React.createClass({
 				this.setState({
 					dataSourceData: theArr,
 					paginations: this.state.paginations,
-					selectedRowKeys:[]
 				});
 			}.bind(this),
 		}).always(function() {
@@ -296,15 +294,16 @@ const User = Form.create()(React.createClass({
 	//关闭离职一键转交
 	handleCancel(){
 		this.setState({
-			visible: false
+			visible: false,
+			selectedRowKeys:[]
+		},()=>{
+			this.loadData(this.state.page);
 		});
-		this.resets();
 	},
 	//一键离职
 	examineOK(record){
 		console.log(record);
         this.setState({
-            selectedRowKeys: [],
             loading: true
         });
         $.ajax({

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.70",
+  "version": "1.1.71",
   "description": "",
   "main": "index.js",
   "scripts": {