|
@@ -0,0 +1,153 @@
|
|
|
+import { Form, Input, Button, Table, Select, Pagination, Breadcrumb, Space, Menu, Dropdown } from 'antd';
|
|
|
+import { DownOutlined, PlusOutlined } from '@ant-design/icons';
|
|
|
+import '@common/common.less';
|
|
|
+function OrgManager() {
|
|
|
+ const { Option } = Select;
|
|
|
+ const onFinish = (values) => {
|
|
|
+ console.log('Success:', values);
|
|
|
+ };
|
|
|
+
|
|
|
+ const onFinishFailed = (errorInfo) => {
|
|
|
+ console.log('Failed:', errorInfo);
|
|
|
+ };
|
|
|
+ const menu = (
|
|
|
+ <Menu>
|
|
|
+ <Menu.Item key="0">
|
|
|
+ <a target="_blank" rel="noopener noreferrer" href="https://www.antgroup.com">
|
|
|
+ 重置密码
|
|
|
+ </a>
|
|
|
+ </Menu.Item>
|
|
|
+ <Menu.Item key="1">
|
|
|
+ <a target="_blank" rel="noopener noreferrer" href="https://www.aliyun.com">
|
|
|
+ 禁用
|
|
|
+ </a>
|
|
|
+ </Menu.Item>
|
|
|
+ <Menu.Item key="2">
|
|
|
+ <a target="_blank" rel="noopener noreferrer" href="https://www.aliyun.com">
|
|
|
+ 删除
|
|
|
+ </a>
|
|
|
+ </Menu.Item>
|
|
|
+ </Menu>
|
|
|
+ )
|
|
|
+ const columns = [
|
|
|
+ { title: '用户名', dataIndex: 'key' },
|
|
|
+ { title: '姓名', dataIndex: 'key' },
|
|
|
+ { title: '所属组织', dataIndex: 'key' },
|
|
|
+ { title: '工号', dataIndex: 'key' },
|
|
|
+ {
|
|
|
+ title: '状态', dataIndex: 'key', render: (text, record) => (
|
|
|
+ <Space size="middle">
|
|
|
+ {record.age == 1 ? (
|
|
|
+ <a>查看</a>
|
|
|
+ ) : (
|
|
|
+ <a>修改</a>
|
|
|
+ )}
|
|
|
+ </Space>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作', dataIndex: 'key', render: () => (
|
|
|
+ <Space size="middle">
|
|
|
+ <a>查看</a>
|
|
|
+ <a>修改</a>
|
|
|
+ <Dropdown overlay={menu}>
|
|
|
+ <a className="ant-dropdown-link" onClick={e => e.preventDefault()}>
|
|
|
+ Hover me <DownOutlined />
|
|
|
+ </a>
|
|
|
+ </Dropdown>
|
|
|
+ </Space>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ const data = [];
|
|
|
+ for (let i = 0; i < 100; i++) {
|
|
|
+ data.push({
|
|
|
+ key: i,
|
|
|
+ name: 'John Brown',
|
|
|
+ age: i + 1,
|
|
|
+ street: 'Lake Park',
|
|
|
+ building: 'C',
|
|
|
+ number: 2035,
|
|
|
+ companyAddress: 'Lake Street 42',
|
|
|
+ companyName: 'SoftLake Co',
|
|
|
+ gender: 'M',
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function handleChange(value) {
|
|
|
+ console.log(`selected ${value}`);
|
|
|
+ }
|
|
|
+ function affiliatedTableTableChangePage(page) {
|
|
|
+ let params = {
|
|
|
+ currentPage: page,
|
|
|
+ pageSize: 10
|
|
|
+ }
|
|
|
+ this.props.getaffiliatedTableTableList(params)
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <div className="wrapper">
|
|
|
+ <Form
|
|
|
+ name="normal_login"
|
|
|
+ className="login-form"
|
|
|
+ className="basic"
|
|
|
+ layout="inline"
|
|
|
+ initialValues={{ remember: true }}
|
|
|
+ onFinish={onFinish}
|
|
|
+ >
|
|
|
+ <div className="basic-left">
|
|
|
+ <Form.Item label="用户名">
|
|
|
+ <Input placeholder="Basic usage" />
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item label="姓名">
|
|
|
+ <Input placeholder="Basic usage" />
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item label="当前状态">
|
|
|
+ <Select
|
|
|
+ style={{ width: 200 }}
|
|
|
+ placeholder="Select a person"
|
|
|
+ defaultValue="全部"
|
|
|
+ >
|
|
|
+ <Option value="全部">全部</Option>
|
|
|
+ <Option value="启用">启用</Option>
|
|
|
+ <Option value="禁用">禁用</Option>
|
|
|
+ </Select>
|
|
|
+ </Form.Item>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <Form.Item>
|
|
|
+ <Space size="middle">
|
|
|
+ <Button htmlType="submit">
|
|
|
+ 重置
|
|
|
+ </Button>
|
|
|
+ <Button type="primary" htmlType="submit">
|
|
|
+ 查询
|
|
|
+ </Button>
|
|
|
+ </Space>
|
|
|
+ </Form.Item>
|
|
|
+ </Form>
|
|
|
+
|
|
|
+ <div className="table">
|
|
|
+ <div className="table-header">
|
|
|
+ <Breadcrumb>
|
|
|
+ <Breadcrumb.Item>用户管理</Breadcrumb.Item>
|
|
|
+ </Breadcrumb>
|
|
|
+ <Button type="primary" icon={<PlusOutlined />}>新增用户</Button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <Table
|
|
|
+ columns={columns}
|
|
|
+ dataSource={data}
|
|
|
+ pagination={{
|
|
|
+ showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
|
|
|
+ pageSizeOptions: ['15', '30', '60', '120'],
|
|
|
+ pageSize:15,
|
|
|
+ }} />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div >
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
+export default OrgManager;
|