Browse Source

数据质量

1178232204@qq.com 3 years ago
parent
commit
6b29edd917

+ 6 - 0
src/api/request.js

@@ -117,6 +117,12 @@ const request = {
     delColumnVerify:'/daqe-center/columnVerifyManagement/delColumnVerify',//删除字段校验规则维护
     delColumnVerify:'/daqe-center/columnVerifyManagement/delColumnVerify',//删除字段校验规则维护
     
     
     getColumnResultPage:'/daqe-center/columnResultManagement/getColumnResultPage',//字段校验问题明细列表
     getColumnResultPage:'/daqe-center/columnResultManagement/getColumnResultPage',//字段校验问题明细列表
+    getColumnResultNumber:'/daqe-center/columnResultManagement/getColumnResultNumber',//字段校验问题明细数量
+    
+    getBlockLossPage:'/daqe-center/blockLossManage/getBlockLossPage',//病历数据丢失明细列表
+    upBlockLossById:'/daqe-center/blockLossManage/upBlockLossById',//病历数据丢失明细修改
+
+    getRegularPage:'/daqe-center/regularManage/getRegularPage',//正则式维护列表
     
     
 }
 }
 
 

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

@@ -20,7 +20,8 @@ import DutyRecord from "../DutyRecord";
 import MedicalTeam from "../MedicalTeam";
 import MedicalTeam from "../MedicalTeam";
 import FieldRules from "../FieldRules";
 import FieldRules from "../FieldRules";
 import FieldProblem from "../FieldProblem";
 import FieldProblem from "../FieldProblem";
-
+import BlockLossManage from "../BlockLossManage";
+import RegularManage from "../RegularManage";
 // import SurgeryManager from "../SurgeryManager";
 // import SurgeryManager from "../SurgeryManager";
 import apiObj from '@api/index';
 import apiObj from '@api/index';
 
 
@@ -47,6 +48,8 @@ const pageMap = {
     'QXGL-YLZGL': <MedicalTeam />,
     'QXGL-YLZGL': <MedicalTeam />,
     'SJZL-ZDJYGZWH': <FieldRules />,
     'SJZL-ZDJYGZWH': <FieldRules />,
     'SJZL-ZDJYWTMX': <FieldProblem />,
     'SJZL-ZDJYWTMX': <FieldProblem />,
+    'SJZL-BLSJDSMX': <BlockLossManage />,
+    'SJZL-ZZSWH': <RegularManage />,
 }
 }
 
 
 let firstMenuPage = {};         //第一个菜单,自动激活时用
 let firstMenuPage = {};         //第一个菜单,自动激活时用

+ 4 - 0
src/components/BlockLossManage/block-context.js

@@ -0,0 +1,4 @@
+import {createContext} from 'react';
+const BlockContext = createContext(null);
+
+export default BlockContext;

+ 138 - 0
src/components/BlockLossManage/editBlock.js

@@ -0,0 +1,138 @@
+import React, {
+    useState, useEffect, useContext
+} from 'react';
+import { Form, Col, Select, Button, Radio, TreeSelect, message, Space, Input } from 'antd';
+import apiObj from '@api/index';
+import BlockContext from './block-context';
+const { post, api, xPost } = apiObj;
+const { TextArea } = Input;
+function EditBlock(props) {
+    useEffect(() => {
+    }, []);
+    const [form] = Form.useForm();
+    const { blockDetail } = useContext(BlockContext);
+    const initialValues = blockDetail;
+
+    const onFinish = values => {
+        let params = values
+        editBlock(params)
+
+    };
+    function editBlock(param) {
+        post(api.upBlockLossById, param).then((res) => {
+            if (res.data.code === 200) {
+                props.userChange()
+                message.success(res.data.message);
+                form.resetFields();
+            } else {
+                message.error(res.data.message);
+            }
+        })
+    }
+    function cancel() {
+        props.userChange()
+    }
+    return (
+        <>
+            <Form
+                labelCol={{ span: 8 }}
+                wrapperCol={{ span: 16 }}
+                form={form}
+                name="register"
+                layout="inline"
+                onFinish={onFinish}
+                initialValues={initialValues}
+            >
+                <Col span={12}>
+                    <Form.Item
+                        name="behospitalCode"
+                        label="住院序号"
+                    >
+                        <span>{initialValues.behospitalCode}</span>
+                    </Form.Item>
+                </Col>
+                <Col span={12}>
+                    <Form.Item
+                        name="recId"
+                        label="文书编号"
+                    >
+                        <span>{initialValues.recId}</span>
+                    </Form.Item>
+                </Col>
+                <Col span={12}>
+                    <Form.Item
+                        name="recTitle"
+                        label="文书标题"
+                    >
+                        <span>{initialValues.recTitle}</span>
+                    </Form.Item>
+                </Col>
+                <Col span={12}>
+                    <Form.Item
+                        name="lossType"
+                        label="丢失类型"
+                    >
+                        <span>{initialValues.lossType}</span>
+                    </Form.Item>
+                </Col>
+                <Col span={12}>
+                    <Form.Item
+                        name="lossWay"
+                        label="丢失途径"
+                    >
+                        <span>{initialValues.lossWay}</span>
+
+                    </Form.Item>
+                </Col>
+                <Col span={12}>
+                    <Form.Item
+                        name="status"
+                        label="状态"
+                    >
+                        <span>{initialValues.status}</span>
+
+                    </Form.Item>
+                </Col>
+                <Col span={24}>
+                    <Form.Item
+                        name="isAudited"
+                        label="核查结果"
+                        wrapperCol={{ span: 18 }}
+                    >
+                        <Radio.Group>
+                            <Space size={70} >
+                                <Radio value={1}>核查通过</Radio>
+
+                                <Radio value={0}>核查未通过</Radio>
+                            </Space>
+                        </Radio.Group>
+                    </Form.Item>
+                </Col>
+                <Col span={24}>
+                    <Form.Item
+                        name="lossCause"
+                        label="丢失原因"
+                        wrapperCol={{ span: 18 }}
+                    >
+                        <TextArea
+                            autoSize={{ minRows: 5, maxRows: 5 }}
+                        />
+                    </Form.Item>
+                </Col>
+                <Form.Item wrapperCol={{ offset: 24, span: 16 }} style={{ marginTop: 15 }}>
+                    <Space size="middle" >
+                        <Button htmlType="button" onClick={e => cancel()}>
+                            取消
+                        </Button>
+                        <Button type="primary" htmlType="submit">
+                            保存
+                        </Button>
+                    </Space>
+                </Form.Item>
+
+            </Form>
+        </>
+    );
+}
+
+export default EditBlock;

+ 266 - 0
src/components/BlockLossManage/index.js

@@ -0,0 +1,266 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
+import { PlusOutlined } from '@ant-design/icons';
+import moment from "moment";
+import "moment/locale/zh-cn"
+import '@common/common.less';
+import apiObj from '@api/index';
+import EditBlock from './editBlock';
+import BlockContext from './block-context';
+import { message } from "antd/lib/index";
+const { post, api, xPost } = apiObj;
+const { RangePicker } = DatePicker;
+const { Option } = Select;
+function BlockLossManage() {
+    useEffect(() => {
+        getBlockLossPage();
+    }, []);
+    const [blockList, setBlockList] = useState([]);
+    const [total, setTotal] = useState(0);
+    const [visible, setVisible] = useState(false);
+    const [size, setSize] = useState(15);
+    const [current, setCurrent] = useState(1);
+    const [blockDetail, setBlockDetail] = useState(null);//详情数据
+    const [params, setParams] = useState({
+        pages: 1,
+        current: 1,
+        size: 15
+    });
+    const [form] = Form.useForm();
+    let data = {
+        pages: 1,
+        current: 1,
+        size: size
+    }
+    //表格数据
+    function getBlockLossPage(param) {
+        post(api.getBlockLossPage, param || params).then((res) => {
+            if (res.data.code === 200) {
+                const data = res.data.data;
+                console.log(123);
+                setBlockList(data.records);
+                setTotal(data.total)
+            }
+        })
+    }
+    //修改
+    function showModal(row) {
+        console.log(row);
+        setVisible(true)
+        setBlockDetail(row)
+    }
+    function onSizeChange(current, pageSize) {
+        params.current = current
+        params.size = pageSize
+        setSize(pageSize)
+        setCurrent(current)
+        setParams(params)
+        getBlockLossPage()
+    }
+    function changePage(page, pageSize) {
+        params.current = page
+        params.size = pageSize
+        setParams(params)
+        setCurrent(page)
+        getBlockLossPage()
+    }
+    //返回
+    function cancel() {
+        setVisible(false)
+        setBlockDetail(null)
+    }
+    function userChange() {
+        setVisible(false)
+        getBlockLossPage();
+    }
+    const onFinish = (value) => {
+        if (value.time) {
+            value.startDate = moment(value.time[0]).format('YYYY-MM-DD 00:00:00');
+            value.endDate = moment(value.time[1]).format('YYYY-MM-DD 23:23:59');
+        }
+        const param = {
+            ...data,
+            ...value,
+        }
+        setCurrent(1)
+        setParams(param)
+        getBlockLossPage(param);
+    };
+    const onReset = () => {
+        setCurrent(1)
+        setParams(data)
+        form.resetFields();
+        getBlockLossPage(data);
+    };
+    const columns = [
+        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+        { title: '住院序号', dataIndex: 'behospitalCode', key: 'behospitalCode' },
+        { title: '文书编号', dataIndex: 'recId', key: 'recId' },
+        { title: '文书标题', dataIndex: 'recTitle', key: 'recTitle' },
+        { title: '丢失原因', dataIndex: 'lossCause', key: 'lossCause' },
+        { title: '丢失类型', dataIndex: 'lossType', key: 'lossType' },
+        { title: '丢失途径', dataIndex: 'lossWay', key: 'lossWay' },
+        { title: '更新时间', dataIndex: 'auditTime', key: 'auditTime' },
+        {
+            title: '状态', key: 'status', render: (text, record) => {
+                return (<span className={(record.status === '已恢复') ? 'Enable' : 'Disable'}>{record.status}</span>);
+            }
+        },
+        {
+            title: '审核结果', key: 'isAudited', render: (text, record) => {
+                return (<span className={(record.isAudited === '未通过') ? 'delete' : (record.isAudited === '已通过') ? 'disable' : ''}>{record.isAudited}</span>);
+            }
+        },
+        {
+            title: '操作', dataIndex: 'key', render: (text, record) => (
+                <Space size="middle">
+                    <a onClick={e => showModal(record)}>修改</a>
+                </Space>
+            )
+        }
+    ];
+
+    return (
+        <div className="wrapper">
+            <div className="filter-box">
+                <Form
+                    form={form}
+                    name="normal_login"
+                    onFinish={onFinish}
+                    initialValues={{ lossType: '', lossWay: '', isAudited: '', status: '' }}
+                >
+                    <Row gutter={24}>
+                        <Col span={6} key={0}>
+                            <Form.Item label="日期" name="time">
+                                <RangePicker
+                                    placeholder={['开始时间', '结束时间']}
+                                />
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={1}>
+                            <Form.Item label="住院序号" name="behospitalCode">
+                                <Input placeholder="请输入" autoComplete='off' />
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={2}>
+                            <Form.Item label="文书编号" name="recId">
+                                <Input placeholder="请输入" autoComplete='off' />
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={3}>
+                            <Form.Item label="文书标题" name="recTitle">
+                                <Input placeholder="请输入" autoComplete='off' />
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={4}>
+                            <Form.Item label="丢失类型" name="lossType">
+                                <Select
+                                    placeholder="请选择"
+                                    allowClear
+                                >
+                                    <Option value="" key={3}>全部</Option>
+                                    <Option value="0" key={0}>文书丢失</Option>
+                                    <Option value="1" key={1}>病案首页丢失</Option>
+                                    <Option value="2" key={2}>患者信息丢失</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={5}>
+                            <Form.Item label="丢失途径" name="lossWay">
+                                <Select
+                                    placeholder="请选择"
+                                    allowClear
+                                >
+                                    <Option value="" key={2}>全部</Option>
+                                    <Option value="0" key={0}>外部丢失</Option>
+                                    <Option value="1" key={1}>内部丢失</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={6}>
+                            <Form.Item label="核查结果" name="isAudited">
+                                <Select
+                                    placeholder="请选择"
+                                    allowClear
+                                >
+                                    <Option value="" key={3}>全部</Option>
+                                    <Option value="0" key={0}>未通过</Option>
+                                    <Option value="1" key={1}>已通过</Option>
+                                    <Option value="2" key={2}>未核查</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={5} key={7}>
+                            <Form.Item label="状态" name="status">
+                                <Select
+                                    placeholder="请选择"
+                                    allowClear
+                                >
+                                    <Option value="" key={3}>全部</Option>
+                                    <Option value="0" key={0}>已丢失</Option>
+                                    <Option value="1" key={1}>已恢复</Option>
+                                </Select>
+                            </Form.Item>
+                        </Col>
+                        <Col span={4} key={8}>
+                            <Form.Item>
+                                <Button type="primary" htmlType="submit">
+                                    查询
+                                </Button>
+                                <Button onClick={onReset}>
+                                    重置
+                                </Button>
+                            </Form.Item>
+                        </Col>
+                    </Row>
+                </Form>
+            </div>
+
+            <div className="table">
+                <div className="table-header">
+                    <h2 className="table-title">病历数据块丢失明细</h2>
+                    <Space size="middle">
+                        <Button type="primary" icon={<PlusOutlined />} onClick={() => showModal(1)}>新增</Button>
+                    </Space>
+
+                </div>
+
+                <Table
+                    columns={columns}
+                    scroll={{ y: 'calc(100vh - 380px)' }}
+                    dataSource={blockList}
+                    rowKey={record => record.id}
+                    pagination={{
+                        pageSize: size,
+                        size: 'small',
+                        current: current,
+                        showSizeChanger: true,
+                        pageSizeOptions: ['15', '30', '60', '120'],
+                        showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+                        onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+                        onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+                        total: total
+                    }} />
+            </div>
+            {visible && blockDetail ?
+                <Modal
+                    title='修改病历数据块丢失明细'
+                    okText='确定'
+                    cancelText='取消'
+                    width="500px"
+                    visible={visible}
+                    onCancel={cancel}
+                    footer={null}
+                    forceRender={true}
+                >
+                    <BlockContext.Provider value={{ blockDetail }}>
+                        <EditBlock userChange={userChange} />
+                    </BlockContext.Provider>
+
+                </Modal>
+                : ''}
+        </div >
+    )
+}
+
+export default BlockLossManage;

+ 14 - 17
src/components/FieldProblem/index.js

@@ -1,6 +1,7 @@
 import React, { useState, useEffect, useRef } from 'react';
 import React, { useState, useEffect, useRef } from 'react';
 import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
 import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
 import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
 import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
+import { getCookie } from '@utils/index'
 import '@common/common.less';
 import '@common/common.less';
 import apiObj from '@api/index';
 import apiObj from '@api/index';
 // import AddRules from './addRules';
 // import AddRules from './addRules';
@@ -9,9 +10,10 @@ import { message } from "antd/lib/index";
 const { post, api, xPost } = apiObj;
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
 const { Option } = Select;
-function FieldRules() {
+function FieldProblem() {
     useEffect(() => {
     useEffect(() => {
         getColumnResultPage();
         getColumnResultPage();
+        getColumnResultNumber()
     }, []);
     }, []);
     const [addVisible, setAddVisible] = useState(false);         //新增页面显示
     const [addVisible, setAddVisible] = useState(false);         //新增页面显示
     const [logList, setLogList] = useState([]);
     const [logList, setLogList] = useState([]);
@@ -21,7 +23,6 @@ function FieldRules() {
     const [size, setSize] = useState(15);
     const [size, setSize] = useState(15);
     const [current, setCurrent] = useState(1);
     const [current, setCurrent] = useState(1);
     const [regularList, setRegularList] = useState([]);//正则式数据
     const [regularList, setRegularList] = useState([]);//正则式数据
-    const [selectedRowKeys, setSelectedRowKeys] = useState([]);
     const [tableList, setTableList] = useState([]);//表名称
     const [tableList, setTableList] = useState([]);//表名称
     const [colList, setColList] = useState([]);//字段名称
     const [colList, setColList] = useState([]);//字段名称
     const [filedDetail, setFiledDetail] = useState(null);//详情数据
     const [filedDetail, setFiledDetail] = useState(null);//详情数据
@@ -46,6 +47,13 @@ function FieldRules() {
             }
             }
         })
         })
     }
     }
+    function getColumnResultNumber() {
+        post(api.getColumnResultNumber, { hospitalId: getCookie('hospitalId') }).then((res) => {
+            if (res.data.code === 200) {
+                const data = res.data.data;
+            }
+        })
+    }
     //获取正则式名称
     //获取正则式名称
     function getRegular(name) {
     function getRegular(name) {
         const param = {
         const param = {
@@ -136,12 +144,6 @@ function FieldRules() {
         setCurrent(page)
         setCurrent(page)
         getColumnResultPage()
         getColumnResultPage()
     }
     }
-    function onTypeChange() {
-
-    }
-    function onSelectChange(selectedRowKeys) {
-        setSelectedRowKeys(selectedRowKeys);
-    };
     //返回
     //返回
     function goBack() {
     function goBack() {
         setAddVisible(false);
         setAddVisible(false);
@@ -180,7 +182,7 @@ function FieldRules() {
         { title: '上传字段值', dataIndex: 'optimizeCountSql', key: 'optimizeCountSql' },
         { title: '上传字段值', dataIndex: 'optimizeCountSql', key: 'optimizeCountSql' },
         { title: '备注', dataIndex: 'standardValue', key: 'standardValue' },
         { title: '备注', dataIndex: 'standardValue', key: 'standardValue' },
         { title: '问题类型', dataIndex: 'regularName', key: 'regularName' },
         { title: '问题类型', dataIndex: 'regularName', key: 'regularName' },
-        { title: '更新事件', dataIndex: 'regularName', key: 'regularName' },
+        { title: '更新时间', dataIndex: 'regularName', key: 'regularName' },
         {
         {
             title: '状态', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
             title: '状态', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
                 return record.isSolved == 1 ? "已解决" : "未解决";
                 return record.isSolved == 1 ? "已解决" : "未解决";
@@ -194,10 +196,7 @@ function FieldRules() {
             )
             )
         }
         }
     ];
     ];
-    const rowSelection = {
-        selectedRowKeys,
-        onChange: onSelectChange,
-    };
+
     // if (addVisible && filedDetail) {
     // if (addVisible && filedDetail) {
     //     return (
     //     return (
     //         <FiledContext.Provider value={{ type, save: addSubFiled, detail: filedDetail }}>
     //         <FiledContext.Provider value={{ type, save: addSubFiled, detail: filedDetail }}>
@@ -262,7 +261,6 @@ function FieldRules() {
                             <Form.Item label="是否必填" name="isRequired">
                             <Form.Item label="是否必填" name="isRequired">
                                 <Select
                                 <Select
                                     placeholder="请选择"
                                     placeholder="请选择"
-                                    onChange={onTypeChange}
                                     allowClear
                                     allowClear
                                 >
                                 >
                                     <Option value="1" key={1}>是</Option>
                                     <Option value="1" key={1}>是</Option>
@@ -275,7 +273,7 @@ function FieldRules() {
                                 <Input placeholder="请输入" autoComplete='off' />
                                 <Input placeholder="请输入" autoComplete='off' />
                             </Form.Item>
                             </Form.Item>
                         </Col>
                         </Col>
-                        <Col span={7} key={6}>
+                        <Col span={5} key={6}>
                             <Form.Item label="正则名称" name="regularName">
                             <Form.Item label="正则名称" name="regularName">
                                 <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
                                 <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
                                     {regularList.map((item) => {
                                     {regularList.map((item) => {
@@ -311,7 +309,6 @@ function FieldRules() {
 
 
                 <Table
                 <Table
                     columns={columns}
                     columns={columns}
-                    rowSelection={rowSelection}
                     scroll={{ y: 'calc(100vh - 380px)' }}
                     scroll={{ y: 'calc(100vh - 380px)' }}
                     dataSource={logList}
                     dataSource={logList}
                     rowKey={record => record.columnId}
                     rowKey={record => record.columnId}
@@ -331,4 +328,4 @@ function FieldRules() {
     )
     )
 }
 }
 
 
-export default FieldRules;
+export default FieldProblem;

+ 8 - 8
src/components/FieldRules/addRules.js

@@ -215,7 +215,7 @@ function ContentForm(props) {
                                 <div className='box' key={i}>
                                 <div className='box' key={i}>
                                     <div className='item'>
                                     <div className='item'>
                                         <div className='item-box'>
                                         <div className='item-box'>
-                                            <Form.Item label="表名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'tableCname']} labelAlign="right" >
+                                            <Form.Item label="表名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'tableCname']} labelAlign="right" >
                                                 <Select showSearch allowClear onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                 <Select showSearch allowClear onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {tableList.map((item) => {
                                                     {tableList.map((item) => {
                                                         return (
                                                         return (
@@ -224,7 +224,7 @@ function ContentForm(props) {
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>
                                             </Form.Item>
                                             </Form.Item>
-                                            <Form.Item label="表名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'tableEname']} labelAlign="right">
+                                            <Form.Item label="表名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'tableEname']} labelAlign="right">
                                                 <Select showSearch allowClear onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择">
                                                 <Select showSearch allowClear onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {tableList.map((item) => {
                                                     {tableList.map((item) => {
                                                         return (
                                                         return (
@@ -235,7 +235,7 @@ function ContentForm(props) {
                                             </Form.Item>
                                             </Form.Item>
                                         </div>
                                         </div>
                                         <div className='item-box'>
                                         <div className='item-box'>
-                                            <Form.Item label="字段名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'columnCname']} labelAlign="right">
+                                            <Form.Item label="字段名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'columnCname']} labelAlign="right">
                                                 <Select showSearch allowClear onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择">
                                                 <Select showSearch allowClear onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {colList.map((item) => {
                                                     {colList.map((item) => {
                                                         return (
                                                         return (
@@ -244,7 +244,7 @@ function ContentForm(props) {
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>
                                             </Form.Item>
                                             </Form.Item>
-                                            <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
+                                            <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
                                                 <Select showSearch allowClear onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择">
                                                 <Select showSearch allowClear onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {colList.map((item) => {
                                                     {colList.map((item) => {
                                                         return (
                                                         return (
@@ -263,13 +263,13 @@ function ContentForm(props) {
                     }
                     }
 
 
                 </Form.Item>
                 </Form.Item>
-                <Form.Item label="是否必填数据" name="isRequired">
+                <Form.Item label="是否必填数据" name="isRequired">
                     <Radio.Group>
                     <Radio.Group>
                         <Radio value={1}>是</Radio>
                         <Radio value={1}>是</Radio>
                         <Radio value={0}>否</Radio>
                         <Radio value={0}>否</Radio>
                     </Radio.Group>
                     </Radio.Group>
                 </Form.Item>
                 </Form.Item>
-                <Form.Item label="标准值维护">
+                <Form.Item label="标准值维护">
                     {
                     {
                         standardValueList.map((it, i) => {
                         standardValueList.map((it, i) => {
                             return (
                             return (
@@ -285,7 +285,7 @@ function ContentForm(props) {
                     }
                     }
 
 
                 </Form.Item>
                 </Form.Item>
-                <Form.Item label="正则式名称" name="regularName">
+                <Form.Item label="正则式名称" name="regularName">
                     <Select showSearch allowClear onSearch={onSearch} onChange={onChange} style={{ width: 160 }} placeholder="请选择">
                     <Select showSearch allowClear onSearch={onSearch} onChange={onChange} style={{ width: 160 }} placeholder="请选择">
                         {regularList.map((item) => {
                         {regularList.map((item) => {
                             return (
                             return (
@@ -297,7 +297,7 @@ function ContentForm(props) {
                 <Form.Item hidden={true} name="regularId" noStyle>
                 <Form.Item hidden={true} name="regularId" noStyle>
                     <Input />
                     <Input />
                 </Form.Item>
                 </Form.Item>
-                <Form.Item label="说明" name="description">
+                <Form.Item label="说明" name="description">
                     <TextArea
                     <TextArea
                         autoSize={{ minRows: 3, maxRows: 5 }}
                         autoSize={{ minRows: 3, maxRows: 5 }}
                     />
                     />

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

@@ -293,7 +293,7 @@ function FieldRules() {
                                 <Input placeholder="请输入" autoComplete='off' />
                                 <Input placeholder="请输入" autoComplete='off' />
                             </Form.Item>
                             </Form.Item>
                         </Col>
                         </Col>
-                        <Col span={7} key={6}>
+                        <Col span={5} key={6}>
                             <Form.Item label="正则名称" name="regularName">
                             <Form.Item label="正则名称" name="regularName">
                                 <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
                                 <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
                                     {regularList.map((item) => {
                                     {regularList.map((item) => {

+ 184 - 0
src/components/RegularManage/index.js

@@ -0,0 +1,184 @@
+import React, { useState, useEffect, useRef } from 'react';
+import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space } from 'antd';
+import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
+import { getCookie } from '@utils/index'
+import '@common/common.less';
+import apiObj from '@api/index';
+// import AddRules from './addRules';
+// import FiledContext from './filed-context';
+import { message } from "antd/lib/index";
+const { post, api, xPost } = apiObj;
+const { RangePicker } = DatePicker;
+const { Option } = Select;
+function RegularManage() {
+    useEffect(() => {
+        getRegularPage();
+    }, []);
+    const [addVisible, setAddVisible] = useState(false);         //新增页面显示
+    const [regularList, setRegularList] = useState([]);
+    const [total, setTotal] = useState(0);
+    const [type, setType] = useState(0);//1新增 2修改
+    const [visible, setVisible] = useState(false);
+    const [selectedRowKeys, setSelectedRowKeys] = useState([]);
+    const [size, setSize] = useState(15);
+    const [current, setCurrent] = useState(1);
+    const [tableList, setTableList] = useState([]);//表名称
+    const [colList, setColList] = useState([]);//字段名称
+    const [filedDetail, setFiledDetail] = useState(null);//详情数据
+    const [params, setParams] = useState({
+        pages: 1,
+        current: 1,
+        size: 15
+    });
+    const [form] = Form.useForm();
+    let data = {
+        pages: 1,
+        current: 1,
+        size: size
+    }
+    //表格数据
+    function getRegularPage(param) {
+        post(api.getRegularPage, param || params).then((res) => {
+            if (res.data.code === 200) {
+                const data = res.data.data;
+                setRegularList(data.records);
+                setTotal(data.total)
+            }
+        })
+    }
+
+    //新增修改跳转
+    function showModal(type) {
+        setAddVisible(true)
+        setType(type)
+        setFiledDetail({
+            columnList: [{
+                columnCname: "",
+                columnEname: "",
+                ableCname: "",
+                tableEname: ""
+            }],
+            standardValueList: [{
+                tit: ''
+            }]
+        })
+    }
+    function onSizeChange(current, pageSize) {
+        params.current = current
+        params.size = pageSize
+        setSize(pageSize)
+        setCurrent(current)
+        setParams(params)
+        getRegularPage()
+    }
+    function changePage(page, pageSize) {
+        params.current = page
+        params.size = pageSize
+        setParams(params)
+        setCurrent(page)
+        getRegularPage()
+    }
+    const rowSelection = {
+        selectedRowKeys,
+        onChange: onSelectChange,
+    };
+    function onSelectChange(selectedRowKeys) {
+        setSelectedRowKeys(selectedRowKeys);
+    };
+    const onFinish = (value) => {
+        const param = {
+            ...data,
+            ...value,
+        }
+        setCurrent(1)
+        setParams(param)
+        getRegularPage(param);
+    };
+    const onReset = () => {
+        setCurrent(1)
+        setParams(data)
+        form.resetFields();
+        getRegularPage(data);
+    };
+    const columns = [
+        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+        { title: '正则式名称', dataIndex: 'name', key: 'name' },
+        { title: '正则式值', dataIndex: 'val', key: 'val' },
+        { title: '说明', dataIndex: 'description', key: 'description' },
+        {
+            title: '操作', dataIndex: 'key', render: (text, record) => (
+                <Space size="middle">
+                    <a >修改</a>
+                </Space>
+            )
+        }
+    ];
+
+    // if (addVisible && filedDetail) {
+    //     return (
+    //         <FiledContext.Provider value={{ type, save: addSubFiled, detail: filedDetail }}>
+    //             <AddRules back={goBack} />
+    //         </FiledContext.Provider>
+    //     )
+    // }
+    return (
+        <div className="wrapper">
+            <div className="filter-box">
+                <Form
+                    form={form}
+                    name="normal_login"
+                    onFinish={onFinish}
+                >
+                    <Row gutter={24}>
+                        <Col span={5} key={0}>
+                            <Form.Item label="正则式名称" name="name">
+                            <Input placeholder="用户名" autoComplete='off'/>
+                            </Form.Item>
+                        </Col>
+            
+                        <Col span={6} key={7}>
+                            <Form.Item>
+                                <Button type="primary" htmlType="submit">
+                                    查询
+                                </Button>
+                                <Button onClick={onReset}>
+                                    重置
+                                </Button>
+                            </Form.Item>
+                        </Col>
+                    </Row>
+                </Form>
+            </div>
+
+            <div className="table">
+                <div className="table-header">
+                    <h2 className="table-title">正则式维护</h2>
+                    <Space size="middle">
+                        <Button type="primary" icon={<PlusOutlined />} onClick={() => showModal(1)}>新增</Button>
+                    </Space>
+
+                </div>
+
+                <Table
+                    columns={columns}
+                    rowSelection={rowSelection}
+                    scroll={{ y: 'calc(100vh - 380px)' }}
+                    dataSource={regularList}
+                    rowKey={record => record.columnId}
+                    pagination={{
+                        pageSize: size,
+                        size: 'small',
+                        current: current,
+                        showSizeChanger: true,
+                        pageSizeOptions: ['15', '30', '60', '120'],
+                        showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+                        onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+                        onChange: (page, pageSize) => changePage(page, pageSize),//点击页码事件
+                        total: total
+                    }} />
+            </div>
+        </div >
+    )
+}
+
+export default RegularManage;