|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
import ReactDom from 'react-dom';
|
|
import ReactDom from 'react-dom';
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import ajax from 'jquery/src/ajax/xhr.js';
|
|
import $ from 'jquery/src/ajax';
|
|
import $ from 'jquery/src/ajax';
|
|
-import { Form, Radio, Icon, Button, Input, Select, AutoComplete, Spin, Table, Switch, message, DatePicker, Modal, Upload } from 'antd';
|
|
|
|
|
|
+import { Form, Radio, Icon, Button, Input, Select, AutoComplete, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm } from 'antd';
|
|
import Newuser from "./newUser.jsx"
|
|
import Newuser from "./newUser.jsx"
|
|
import './userMangagement.less'
|
|
import './userMangagement.less'
|
|
import { techAuditStatusList, station, post } from '../../../dataDic.js';
|
|
import { techAuditStatusList, station, post } from '../../../dataDic.js';
|
|
@@ -149,9 +149,90 @@ const User = Form.create()(React.createClass({
|
|
key: 'status',
|
|
key: 'status',
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
+ column: [{
|
|
|
|
+ title: '用户编号',
|
|
|
|
+ dataIndex: 'userNo',
|
|
|
|
+ key: 'userNo',
|
|
|
|
+ }, {
|
|
|
|
+ title: '登录用户名',
|
|
|
|
+ dataIndex: 'mobile',
|
|
|
|
+ key: 'mobile',
|
|
|
|
+ }, {
|
|
|
|
+ title: '角色',
|
|
|
|
+ dataIndex: 'roles',
|
|
|
|
+ key: 'roles',
|
|
|
|
+ }, {
|
|
|
|
+ title: '用户姓名',
|
|
|
|
+ dataIndex: 'name',
|
|
|
|
+ key: 'name',
|
|
|
|
+ }, {
|
|
|
|
+ title: '转交',
|
|
|
|
+ dataIndex: 'ee',
|
|
|
|
+ key: 'ee',
|
|
|
|
+ render: (text, record, index) => {
|
|
|
|
+ return <div>
|
|
|
|
+ <Popconfirm title={'请确认转交【'+record.name+'】'} onConfirm={(e)=>{this.examineOK(record)}} okText="确认" cancelText="取消">
|
|
|
|
+ <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="primary">转交</Button>
|
|
|
|
+ </Popconfirm>
|
|
|
|
+ </div>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
dataSource: [],
|
|
dataSource: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ //点击离职一键转交
|
|
|
|
+ resources() {
|
|
|
|
+ let deletedIds;
|
|
|
|
+ let rowItem;
|
|
|
|
+ for(let idx = 0; idx < this.state.selectedRows.length; idx++) {
|
|
|
|
+ rowItem = this.state.selectedRows[idx];
|
|
|
|
+ console.log(rowItem.id);
|
|
|
|
+ if(rowItem.id) {
|
|
|
|
+ deletedIds = rowItem.id;
|
|
|
|
+ };
|
|
|
|
+ };
|
|
|
|
+ this.setState({
|
|
|
|
+ visible: true,
|
|
|
|
+ aid:deletedIds
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //关闭离职一键转交
|
|
|
|
+ handleCancel(){
|
|
|
|
+ this.setState({
|
|
|
|
+ visible: false
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //一键离职
|
|
|
|
+ examineOK(record){
|
|
|
|
+ console.log(record);
|
|
|
|
+ this.setState({
|
|
|
|
+ selectedRowKeys: [],
|
|
|
|
+ loading: true
|
|
|
|
+ });
|
|
|
|
+ $.ajax({
|
|
|
|
+ method: "POST",
|
|
|
|
+ dataType: "json",
|
|
|
|
+ crossDomain: false,
|
|
|
|
+ url: globalConfig.context + "/api/admin/role/dimission",
|
|
|
|
+ data: {
|
|
|
|
+ aid:this.state.aid,
|
|
|
|
+ transferId:record.id,
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }).done(function (data) {
|
|
|
|
+ if (!data.error.length) {
|
|
|
|
+ message.success('转交成功!');
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ message.warning(data.error[0].message);
|
|
|
|
+ };
|
|
|
|
+ this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ visible2: false
|
|
|
|
+ });
|
|
|
|
+ }.bind(this));
|
|
|
|
+ },
|
|
componentWillMount() {
|
|
componentWillMount() {
|
|
this.loadData();
|
|
this.loadData();
|
|
this.departmentList();
|
|
this.departmentList();
|
|
@@ -432,6 +513,7 @@ const User = Form.create()(React.createClass({
|
|
showDesc: true
|
|
showDesc: true
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
closeDesc(e, s) {
|
|
closeDesc(e, s) {
|
|
this.state.userDetaile=false;
|
|
this.state.userDetaile=false;
|
|
this.state.showDesc = e;
|
|
this.state.showDesc = e;
|
|
@@ -581,6 +663,7 @@ const User = Form.create()(React.createClass({
|
|
onClick={this.activation}>激活<Icon type="unlock" /></Button>
|
|
onClick={this.activation}>激活<Icon type="unlock" /></Button>
|
|
|
|
|
|
<span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
|
|
<span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
|
|
|
|
+ <Button type="primary" className="addButton" onClick={this.resources} disabled={!hasSelected} >离职一键转交<Icon type="user" /></Button>
|
|
<Button type="primary" className="addButton" onClick={this.addClick} >新增用户<Icon type="user" /></Button>
|
|
<Button type="primary" className="addButton" onClick={this.addClick} >新增用户<Icon type="user" /></Button>
|
|
<div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
|
|
<div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
|
|
<Select placeholder="职务"
|
|
<Select placeholder="职务"
|
|
@@ -651,6 +734,27 @@ const User = Form.create()(React.createClass({
|
|
datauser={this.state.datauser}
|
|
datauser={this.state.datauser}
|
|
showDesc={this.state.showDesc}
|
|
showDesc={this.state.showDesc}
|
|
closeDesc={this.closeDesc} />
|
|
closeDesc={this.closeDesc} />
|
|
|
|
+ <div className="patent-desc">
|
|
|
|
+ <Modal maskClosable={false} visible={this.state.visible}
|
|
|
|
+ onOk={this.checkResources} onCancel={this.handleCancel}
|
|
|
|
+ width='800px'
|
|
|
|
+ title='离职一键转交'
|
|
|
|
+ footer=''
|
|
|
|
+ className="admin-desc-content">
|
|
|
|
+ <Input placeholder="用户姓名" style={{width:'150px',marginRight:"10px",marginBottom:"10px"}}
|
|
|
|
+ value={this.state.userNameSearch}
|
|
|
|
+ onChange={(e) => { this.setState({ userNameSearch: e.target.value }); }} />
|
|
|
|
+ <Button type="primary" onClick={this.search}>搜索</Button>
|
|
|
|
+ <div className="patent-table">
|
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
|
+ <Table columns={this.state.column}
|
|
|
|
+ dataSource={this.state.dataSource}
|
|
|
|
+ pagination={this.state.pagination}
|
|
|
|
+ onRowClick={this.tableRowClick} />
|
|
|
|
+ </Spin>
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
|
|
+ </div>
|
|
</div >
|
|
</div >
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|