UNPKG

qm-bus

Version:

千米公有云业务组件库

82 lines (73 loc) 2.01 kB
import { Input, Button, message } from 'antd' import { Relax } from 'iflux2' import { QMDataView, SearchForm, Table, Pagination } from 'qm-ux' import React from 'react' const { Item } = SearchForm /** * 管理员列表 * @author gcy[of1518] */ const AdminEmployee = () => ( <QMDataView ref="hash" netHost="v_app_api" netUrl="api/admin/"> <Container close={this.props.close} /> </QMDataView> ) export default AdminEmployee @Relax class Container extends React.PureComponent { static defaultProps = { cellSelected: {}, type: 'checkbox', // 多选/单选,checkbox or radio } render() { const { cellSelected, close, type } = this.props return ( <div style={{ paddingTop: 15, minHeight: 300, padding: 20, height: 500, }}> <SearchForm> <Item index="q" group="advance"> <Input placeholder="请输入姓名/手机号" /> </Item> </SearchForm> <Table rowSelection={{ type }} cellKey="employeeId" rowKey="employeeId" columns={[ { title: '姓名', dataIndex: 'realName', width: 100, className: 'ant-table-th-center', }, { title: '手机号', dataIndex: 'cellphone', width: 100, className: 'ant-table-th-center', }, { title: '角色', dataIndex: 'roles', width: 100, className: 'ant-table-th-center', }, ]} scroll={{ y: 270 }} /> <Pagination pageSize={10} /> <div className="modal-footer-main"> <Button size="large" onClick={close}>取消</Button> <Button size="large" type="primary" onClick={() => this.toAdmin(cellSelected)}> 通知管理员 </Button> </div> </div> ) } }