| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import React from 'react';
- import { Table, Button } from 'antd'
- const columns = [{
- title: '用户组名',
- dataIndex: 'userGroupName',
- }, {
- title: '创建时间',
- dataIndex: 'createTime'
- }, {
- title: '创建人',
- dataIndex: 'createBy'
- }, {
- title: '描述',
- dataIndex: 'description'
- }, {
- title: '操作',
- dataIndex: 'operation',
- render: () => { return <span>查看组成员 删除用户组</span>}
- }];
- const data = [{
- key: 1,
- userGroupName: 'UAS开发组',
- createTime: '2018-08-21',
- createBy: 'xiaoct',
- description: '就是UAS开发组啦!'
- }]
- class UserGroupManagement extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- selectedRowKeys: []
- }
- }
- onSelectChange = (selectedRowKeys) => {
- console.log('selectedRowKeys changed: ', selectedRowKeys);
- this.setState({ selectedRowKeys });
- }
- render() {
- const { selectedRowKeys } = this.state;
- const rowSelection = {
- selectedRowKeys,
- onChange: this.onSelectChange,
- };
- const hasSelected = selectedRowKeys.length > 0;
- return (
- <div>
- <Table rowSelection={rowSelection} columns={columns} dataSource={data}/>
- </div>
- );
- }
- }
- export default UserGroupManagement
|