import React from 'react';
import ajax from 'jquery/src/ajax/xhr.js';
import $ from 'jquery/src/ajax';
import { Form,Radio, Button, Input, Select, Spin, Table, message, Modal ,Popconfirm} from 'antd';
const Assign=React.createClass({
departmentList() {
this.setState({
loading: true
});
$.ajax({
method: "get",
dataType: "json",
crossDomain: false,
url: globalConfig.context + "/api/admin/organization/selectSuperId",
data: {
},
success: function(data) {
let thedata = data.data;
let theArr=[];
if(!thedata) {
if(data.error && data.error.length) {
message.warning(data.error[0].message);
};
thedata = {};
}else{
thedata.map(function(item,index){
theArr.push({
key:index,
name:item.name,
id:item.id,
})
})
}
this.setState({
departmentArr:theArr,
})
}.bind(this),
}).always(function() {
this.setState({
loading: false
});
}.bind(this));
},
getInitialState() {
return {
contact:0,
selectedRows: [],
searchMore: true,
loading: false,
visible:false,
showDesc:false,
pagination: {
defaultCurrent: 1,
defaultPageSize: 10,
showQuickJumper: true,
pageSize: 10,
onChange: function (page) {
this.loadData(page);
}.bind(this),
showTotal: function (total) {
return '共' + total + '条数据';
}
},
userList:[
{
title: '用户姓名',
dataIndex: 'name',
key: 'name',
width:100
},{
title: '部门机构',
dataIndex: 'departmentName',
key: 'departmentName',
width:100,
render:text=>{
return text&&text.length>12?{text.substr(0,12)+'...'}:text
}
}, {
title: '职务',
dataIndex: 'position',
key: 'position',
width:100
},{
title: '联系手机',
dataIndex: 'mobile',
key: 'mobile',
width:100
}, {
title: '操作',
dataIndex: 'abc',
key: 'abc',
width:100,
render:(text,record,index)=>{
return (