liting2017 7 years ago
parent
commit
cfaded66ec

+ 1 - 0
js/component/manageCenter/set/userManagement/member.jsx

@@ -43,6 +43,7 @@ const Member = React.createClass({
                             createTime: thisdata.createTime,
                             number: thisdata.number,
                             province: thisdata.province,
+                            city:thisdata.city,
                             position: thisdata.position,
                             departmentName:thisdata.departmentName,
                             departmentId:thisdata.departmentId,

+ 18 - 5
js/component/manageCenter/set/userManagement/modal.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Tag, Modal, Input, Spin, Switch, Select, message, Popconfirm, Button, Cascader, Icon } from 'antd';
-import { provinceSelect, provinceList, getProvince } from '../../../NewDicProvinceList.js';
+import { provinceSelect, provinceList, getProvince ,citySelect} from '../../../NewDicProvinceList.js';
 import { companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -148,7 +148,9 @@ const TheModal = React.createClass({
 					'email': this.state.email,
 					'mobile': this.state.mobile,
 					'position': this.state.position,
-					'locations': theArr,
+					//'locations': theArr,
+					'province':this.state.addressSearch.length?this.state.addressSearch[0]:'',
+					'city':this.state.addressSearch.length?this.state.addressSearch[1]:'',
 					'departmentId':departmentIds,
 					'superiorId': this.state.superiorId
 				}),
@@ -344,6 +346,10 @@ const TheModal = React.createClass({
 				this.loadLocations(nextProps.data.id);
 			}
 		};
+		let proCity=[];
+		let province=nextProps.data ? parseInt(nextProps.data.province) : '';
+		let city = nextProps.data ? parseInt(nextProps.data.city) : '';
+		proCity.push(province,city);
 		let nextState = {
 			visible: nextProps.show,
 			id: nextProps.data ? nextProps.data.id : '',
@@ -351,6 +357,8 @@ const TheModal = React.createClass({
 			email: nextProps.data ? nextProps.data.email : '',
 			mobile: nextProps.data ? nextProps.data.mobile : '',
 			position: nextProps.data ? nextProps.data.position : '',
+			addressSearch:proCity,
+			addressProvince:nextProps.data ? nextProps.data.province : '',
 			department: nextProps.data ? nextProps.data.departmentName : '',
 			departmentId:nextProps.data ? nextProps.data.departmentId : '',
 			superiorId: nextProps.data ? nextProps.data.superiorId : '',
@@ -440,7 +448,8 @@ const TheModal = React.createClass({
                     onOk={this.postData}
                     onCancel={this.handleCancel} >
                     <Spin spinning={this.state.loading} >
-                        {this.state.theSwitch ? <div className="modal-box">
+                        {this.state.theSwitch ? 
+                        	<div className="modal-box">
                             <ul className="modal-content clearfix">
                                 <li className="list">
                                     <span className='modal-text'>名字</span>
@@ -496,7 +505,7 @@ const TheModal = React.createClass({
                             </ul>
                             <div>
                                 <span className='modal-text' style={{ verticalAlign: 'top' }}>地区</span>
-                                {window.showPermissionList && window.showRoleList ? <div style={{ display: 'inline-block', width: '88%' }}>
+                              {/*  {window.showPermissionList && window.showRoleList ? <div style={{ display: 'inline-block', width: '88%' }}>
                                     {this.state.locations.map((item, i) => {
                                         return <ProvinceAdd
                                             provinceList={this.state.provinceList}
@@ -516,7 +525,11 @@ const TheModal = React.createClass({
                                                 return getProvince(c) + ' '
                                             }) : '')}</Tag>
                                         })}
-                                    </div>}
+                                    </div>}*/}
+                                               
+				                <Cascader options={citySelect()}  value={this.state.addressSearch} placeholder="选择城市"
+			    				   onChange={(e,pre) => { this.setState({ addressSearch: e }) }} />	                 
+			                   
                             </div>
                         </div> : <div className="modal-box">
                                 <ul className="modal-content clearfix">

+ 1 - 3
js/component/manageCenter/set/userManagementS/addjurisdiction.jsx

@@ -94,9 +94,7 @@ const Addjurisdiction = Form.create()(React.createClass({
 			if (e) {
             contactLists.map(function (item) {
                 if (item.name == e.toString()) {
-                    theType=true
-                }else{
-                	theType=false
+                    theType=item.id
                 }
            });     
    	    }

+ 1 - 1
js/component/manageCenter/set/userManagementS/jurisdiction.jsx

@@ -154,7 +154,7 @@ const Jurisdiction = Form.create()(React.createClass({
 			crossDomain: false,
 			url: globalConfig.context + '/api/admin/addPermission',
 			data: {
-				superId: this.state.ids,
+				superId: this.state.preName,
 				name: this.state.name, //接口名称
 				url: this.state.url //接口路径
 			}

+ 2 - 2
js/component/manageCenter/set/userManagementS/roles.jsx

@@ -17,7 +17,7 @@ const Roles=Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + '/api/roles',
+            url: globalConfig.context + '/api/role',
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
@@ -178,7 +178,7 @@ const Roles=Form.create()(React.createClass({
 	                    <Button style={{ background: "red", border: "none", color: "#fff" }}
 	                        disabled={!hasSelected}
 	                        onClick={this.delectRow}>删除<Icon type="minus" /></Button>
-	                    <Button type="primary" className="addButton" onClick={this.addClick} >新增用户<Icon type="user" /></Button>
+	                    <Button type="primary" className="addButton" disabled onClick={this.addClick} >新增用户<Icon type="user" /></Button>
 	                </div>
 	                <div className="patent-table">
 	                    <Spin spinning={this.state.loading}>