Selaa lähdekoodia

组织管理表格初版1

zhouna 3 vuotta sitten
vanhempi
commit
011a25656a

+ 16 - 1
src/components/AFilterBar/index.js

@@ -1 +1,16 @@
-/********筛选项组件********/
+/********
+ * 公共筛选项组件
+ * 用于质控前台各页面筛选
+ * ********/
+import {Input,Select  } from 'antd';
+const { Option } = Select;
+
+function AdminFilter(){
+    return (
+        <div className="filter-box">
+
+        </div>
+    )
+}
+
+export default AdminFilter;

+ 1 - 1
src/components/AHeader/index.js

@@ -4,7 +4,7 @@ import msg from '@images/msg.png';
 import me from '@images/me.png';
 import me from '@images/me.png';
 import down from '@images/down.png';
 import down from '@images/down.png';
 import {Component} from "react";
 import {Component} from "react";
-import style from './index.less'
+import './index.less'
 
 
 const propTypes = {
 const propTypes = {
 
 

+ 0 - 1
src/components/AMenu/index.js

@@ -1,5 +1,4 @@
 import {Menu} from 'antd';
 import {Menu} from 'antd';
-import {Component} from "react";
 import { useDispatch,useSelector } from 'react-redux'
 import { useDispatch,useSelector } from 'react-redux'
 import { add } from '../../store/reducers/tabPanes'
 import { add } from '../../store/reducers/tabPanes'
 import OrgManager from "../OrgManager";
 import OrgManager from "../OrgManager";

+ 1 - 1
src/components/ATabs/index.js

@@ -1,4 +1,4 @@
-import React, { Component } from 'react';
+import React from 'react';
 import { Tabs } from 'antd';
 import { Tabs } from 'antd';
 import { useDispatch,useSelector } from 'react-redux'
 import { useDispatch,useSelector } from 'react-redux'
 import { active, close} from '../../store/reducers/tabPanes'
 import { active, close} from '../../store/reducers/tabPanes'

+ 83 - 9
src/components/OrgManager/index.js

@@ -1,8 +1,9 @@
 import { useDispatch,useSelector } from 'react-redux'
 import { useDispatch,useSelector } from 'react-redux'
-import { Table, Badge, Menu, Dropdown, Space } from 'antd';
+import { Table, Badge, Menu, Dropdown, Space, Form, Input, Button, Row, Col, Select } from 'antd';
 import { DownOutlined } from '@ant-design/icons';
 import { DownOutlined } from '@ant-design/icons';
 import './index.less';
 import './index.less';
 
 
+const { Option } = Select;
 function OrgManager(){
 function OrgManager(){
     const menu = (
     const menu = (
         <Menu>
         <Menu>
@@ -55,15 +56,28 @@ function OrgManager(){
         }
         }
         return <Table columns={columns} dataSource={data} pagination={false} />;
         return <Table columns={columns} dataSource={data} pagination={false} />;
     };
     };
-
+    const moreOper = (
+        <Menu>
+            <Menu.Item key="0">重置密码</Menu.Item>
+            <Menu.Item key="1">禁用</Menu.Item>
+            <Menu.Item key="3">删除</Menu.Item>
+        </Menu>
+    );
     const columns = [
     const columns = [
-        { title: 'Name', dataIndex: 'name', key: 'name' },
-        { title: 'Platform', dataIndex: 'platform', key: 'platform' },
-        { title: 'Version', dataIndex: 'version', key: 'version' },
-        { title: 'Upgraded', dataIndex: 'upgradeNum', key: 'upgradeNum' },
-        { title: 'Creator', dataIndex: 'creator', key: 'creator' },
-        { title: 'Date', dataIndex: 'createdAt', key: 'createdAt' },
-        { title: 'Action', key: 'operation', render: () => <a>Publish</a> },
+        { title: '组织机构层级', dataIndex: 'name', key: 'name' },
+        { title: '类型', dataIndex: 'platform', key: 'platform' },
+        { title: '状态', dataIndex: 'version', key: 'version' },
+        { title: '创建时间', dataIndex: 'upgradeNum', key: 'upgradeNum' },
+        { title: '操作', key: 'operation', render: () => (<Space size="middle">
+                <a>修改</a>
+                <a>启用</a>
+                <Dropdown overlay={moreOper} trigger={['click']}>
+                <a className="ant-dropdown-link">
+                    更多 <DownOutlined />
+
+                </a>
+                </Dropdown>
+            </Space>) },
     ];
     ];
 
 
     const data = [];
     const data = [];
@@ -78,8 +92,68 @@ function OrgManager(){
             createdAt: '2014-12-24 23:12:00',
             createdAt: '2014-12-24 23:12:00',
         });
         });
     }
     }
+    const layout = {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 },
+    };
+    const tailLayout = {
+        wrapperCol: { offset: 8, span: 16 },
+    };
+    const [form] = Form.useForm();
+
+    const onFinish = (values: any) => {
+        console.log(values);
+    };
+
+    const onReset = () => {
+        form.resetFields();
+    };
+
     return (
     return (
         <div className='container'>
         <div className='container'>
+            <div className="filter-box">
+                <Form {...layout} form={form} name="control-hooks" onFinish={onFinish}>
+                    <Row gutter={24}>
+                        <Col span={5} key={0}>
+                            <Form.Item name="组织名称" label="组织名称">
+                                <Input placeholder='组织名称'/>
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={1}>
+                            <Form.Item name="类型" label="类型">
+                                <Select
+                                    allowClear
+                                >
+                                    <Option value="male">全部</Option>
+                                    <Option value="female">集团医院</Option>
+                                    <Option value="other">医共体</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={2}>
+                            <Form.Item name="当前状态" label="当前状态">
+                                <Select
+                                    allowClear
+                                >
+                                    <Option value="male">全部</Option>
+                                    <Option value="female">启用</Option>
+                                    <Option value="other">禁用</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={9} key={3}>
+                            <Form.Item {...tailLayout}>
+                                <Button type="primary" htmlType="submit">
+                                    查询
+                                </Button>
+                                <Button htmlType="button" onClick={onReset}>
+                                    重置
+                                </Button>
+                            </Form.Item>
+                        </Col>
+                    </Row>
+                </Form>
+            </div>
             <Table
             <Table
                 className="components-table-demo-nested"
                 className="components-table-demo-nested"
                 columns={columns}
                 columns={columns}