瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/components/DiagManager/index.js
zhouna 3 年之前
父節點
當前提交
0971029322

+ 1 - 0
src/api/request.js

@@ -129,6 +129,7 @@ const request = {
     getColumnResultNumber:'/daqe-center/columnResultManagement/getColumnResultNumber',//字段校验问题明细数量
     dataCheck:'/daqe-center/columnResultManagement/dataCheck',//数据校验
     updateColumnResult:'/daqe-center/columnResultManagement/updateColumnResult',//修改
+    getModeName:'/daqe-center/columnResultManagement/getModeName',//质控模块名称
 
     getBlockLossPage:'/daqe-center/blockLossManage/getBlockLossPage',//病历数据丢失明细列表
     upBlockLossById:'/daqe-center/blockLossManage/upBlockLossById',//病历数据丢失明细修改

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

@@ -189,6 +189,7 @@ function AHeader({ history, hideName }) {
                     footer={null}
                     forceRender={true}
                     centered={true}
+                    maskClosable={false}
                 >
                     <Form
                         labelCol={{ span: 6 }}

+ 27 - 23
src/components/BlockLossManage/index.js

@@ -7,7 +7,7 @@ import './index.less'
 import apiObj from '@api/index';
 import EditBlock from './editBlock';
 import BlockContext from './block-context';
-import { disabledDate } from '@utils/index'
+import { disabledDate, getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
@@ -29,14 +29,16 @@ function BlockLossManage() {
         pages: 1,
         current: 1,
         size: 15,
-        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
-        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
+        startDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        endDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     const [form] = Form.useForm();
     let data = {
         pages: 1,
         current: 1,
-        size: size
+        size: size,
+        startDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        endDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     }
     //表格数据
     function getBlockLossPage(param) {
@@ -88,6 +90,7 @@ function BlockLossManage() {
     function userChange() {
         setVisible(false)
         getBlockLossPage();
+        setBlockDetail(null)
     }
     const onFinish = (value) => {
         if (value.time) {
@@ -182,18 +185,18 @@ function BlockLossManage() {
                             </Form.Item>
                         </Col>
                         <Col span={5} key={1}>
-                            <Form.Item label="住院序号" name="behospitalCode" rules={[{ max: 30,message:'住院序号不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="住院序号" name="behospitalCode" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="住院序号" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
-                            <Form.Item label="文书编号" name="recId" rules={[{ max: 30,message:'文书编号不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="文书编号" name="recId" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="文书编号" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
-                            <Form.Item label="文书标题" name="recTitle" rules={[{ max: 30,message:'文书标题不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="文书标题" name="recTitle" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="文书标题" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>
@@ -272,55 +275,55 @@ function BlockLossManage() {
                 <div className="table-data">
                     <Row className="data-box">
                         <Col span={6} order={1} className="data-item">
-                            <p>{blockData.hisNum || '-'}</p>
-                            <p>His</p>
+                            <p>{blockData.hisNum || blockData.hisNum == 0 ? blockData.hisNum : '-'}</p>
+                            <p>HIS</p>
                         </Col>
                         <Col span={6} order={2} className="data-item">
-                            <p>{blockData.logNum || '-'}</p>
+                            <p>{blockData.logNum || blockData.logNum == 0 ? blockData.logNum : '-'}</p>
                             <p>接口日志</p>
                         </Col>
                         <Col span={6} order={3} className="data-item">
-                            <p>{blockData.realNum || '-'}</p>
+                            <p>{blockData.realNum || blockData.realNum == 0 ? blockData.realNum : '-'}</p>
                             <p>实际</p>
                         </Col>
                         <Col span={6} order={4} className="data-item item" >
-                            <p>{blockData.allLossNum || '-'}</p>
+                            <p>{blockData.allLossNum || blockData.allLossNum == 0 ? blockData.allLossNum : '-'}</p>
                             <p>合计丢失</p>
                         </Col>
                     </Row>
                     <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
-                            <p>{blockData.outRecNum || '-'}</p>
+                            <p>{blockData.outRecNum || blockData.outRecNum == 0 ? blockData.outRecNum : '-'}</p>
                             <p>文书丢失</p>
                         </Col>
                         <Col span={6} order={2} className="box-item">
-                            <p>{blockData.outHomePageNum || '-'}</p>
+                            <p>{blockData.outHomePageNum || blockData.outHomePageNum == 0 ? blockData.outHomePageNum : '-'}</p>
                             <p>病案首页丢失</p>
                         </Col>
                         <Col span={6} order={3} className="box-item">
-                            <p>{blockData.outCodeNum || '-'}</p>
+                            <p>{blockData.outCodeNum || blockData.outCodeNum == 0 ? blockData.outCodeNum : '-'}</p>
                             <p>病历号丢失</p>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
-                            <p>{blockData.outLossNum || '-'}</p>
+                            <p>{blockData.outLossNum || blockData.outLossNum == 0 ? blockData.outLossNum : '-'}</p>
                             <p>外部丢失</p>
                         </Col>
                     </Row>
                     <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
-                            <p>{blockData.inRecNum || '-'}</p>
+                            <p>{blockData.inRecNum || blockData.inRecNum == 0 ? blockData.inRecNum : '-'}</p>
                             <p>文书丢失</p>
                         </Col>
                         <Col span={6} order={2} className="box-item">
-                            <p>{blockData.inHomePageNum || '-'}</p>
+                            <p>{blockData.inHomePageNum || blockData.inHomePageNum == 0 ? blockData.inHomePageNum : '-'}</p>
                             <p>病案首页丢失</p>
                         </Col>
                         <Col span={6} order={3} className="box-item">
-                            <p>{blockData.inCodeNum || '-'}</p>
+                            <p>{blockData.inCodeNum || blockData.inCodeNum == 0 ? blockData.inCodeNum : '-'}</p>
                             <p>病历号丢失</p>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
-                            <p>{blockData.inLossNum || '-'}</p>
+                            <p>{blockData.inLossNum || blockData.inLossNum == 0 ? blockData.inLossNum : '-'}</p>
                             <p>内部丢失</p>
                         </Col>
                     </Row>
@@ -352,6 +355,7 @@ function BlockLossManage() {
                     onCancel={cancel}
                     footer={null}
                     forceRender={true}
+                    maskClosable={false}
                 >
                     <BlockContext.Provider value={{ blockDetail, type }}>
                         <EditBlock userChange={userChange} />

+ 1 - 0
src/components/DataManager/AddData.js

@@ -468,6 +468,7 @@ function AddData(props) {
           visible={visible}
           onOk={handleOk}
           onCancel={handleCancel}
+          maskClosable={false}
         >
           <p>您还有内容未保存,确定要退出?</p>
         </Modal>

+ 2 - 1
src/components/DataManager/index.js

@@ -95,7 +95,7 @@ function DataManager() {
       if (res.data.code === 200) {
         getDataAuthPage();
         setMsvisible(false);
-        message.success("删除成功");
+        message.success("操作成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
@@ -342,6 +342,7 @@ function DataManager() {
         visible={msvisible}
         onOk={handleOk}
         onCancel={handleCancel}
+        maskClosable={false}
       >
         <p>{tipText[modalType]}</p>
       </Modal>

+ 2 - 1
src/components/DrugManager/index.js

@@ -81,7 +81,7 @@ function DrugManager() {
       if (res.data.code === 200) {
         getDrugPage();
         setDrugid([])
-        message.success("删除成功");
+        message.success("操作成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
@@ -352,6 +352,7 @@ function DrugManager() {
           onCancel={cancel}
           footer={null}
           forceRender={true}
+          maskClosable={false}
         >
           <DrugContext.Provider value={{ type, formData }}>
             <AddDrug DrugChange={DrugChange} cancel={cancel} isChange={isChange} />

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

@@ -216,6 +216,7 @@ function DutyRecord() {
 				onOk={delRecord}
 				/*confirmLoading={confirmLoading}*/
 				onCancel={() => showDelModal(false)}
+				maskClosable={false}
 			>
 				<p>职务职称变更记录删除后将无法恢复,确认删除这{selectedRowKeys.length}条变更记录?</p>
 			</Modal>

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

@@ -167,6 +167,7 @@ function ExceptionLog() {
           visible={msvisible}
           onOk={handleOk}
           onCancel={handleCancel}
+          maskClosable={false}
         >
           <p>{tipText}</p>
         </Modal>

+ 44 - 18
src/components/FieldProblem/index.js

@@ -8,6 +8,7 @@ import './index.less'
 import apiObj from '@api/index';
 import EditProblem from './editProblem';
 import ProblemContext from './problem-context';
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
@@ -15,6 +16,7 @@ function FieldProblem() {
     useEffect(() => {
         getColumnResultPage();
         getColumnResultNumber(date)
+        getModeName()
     }, []);
     const [logList, setLogList] = useState([]);
     const [total, setTotal] = useState(0);
@@ -25,6 +27,8 @@ function FieldProblem() {
     const [probleData, setProbleData] = useState({});
     const [problemDetail, setProblemDetail] = useState(null);//详情数据
     const [title, setTitle] = useState();//正则式数据
+    const [modeList, setModeList] = useState([]);//质控模块
+
     const [params, setParams] = useState({
         pages: 1,
         current: 1,
@@ -41,6 +45,8 @@ function FieldProblem() {
         pages: 1,
         current: 1,
         size: size,
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     }
     //表格数据
     function getColumnResultPage(param) {
@@ -63,7 +69,19 @@ function FieldProblem() {
             }
         })
     }
-
+    function getModeName(name) {
+        post(api.getModeName, {
+            modeName: name
+        }).then((res) => {
+            if (res.data.code === 200) {
+                const data = res.data.data || [];
+                setModeList(data)
+            }
+        })
+    }
+    function onSearch(val) {
+        getModeName(val)
+    }
     //修改
     function showModal(title, row, type) {
         setVisible(true)
@@ -80,6 +98,7 @@ function FieldProblem() {
         setVisible(false)
         getColumnResultPage();
         getColumnResultNumber(date)
+        setProblemDetail(null)
     }
     function onSizeChange(current, pageSize) {
         params.current = current
@@ -140,7 +159,7 @@ function FieldProblem() {
         { title: '上传字段值', dataIndex: 'tableVal', key: 'tableVal' },
         {
             title: '备注', dataIndex: 'description', key: 'description', render: (text, record) => {
-                return (record.description||"").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
+                return (record.description || "-").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
             }
         },
         {
@@ -184,23 +203,29 @@ function FieldProblem() {
                             </Form.Item>
                         </Col>
                         <Col span={5} key={1}>
-                            <Form.Item label="住院序号" name="behospitalCode" rules={[{ max: 30,message:'住院序号不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="住院序号" name="behospitalCode" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="住院序号" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
-                            <Form.Item label="文书编号" name="recId" rules={[{ max: 30,message:'文书编号不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="文书编号" name="recId" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="文书编号" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
-                            <Form.Item label="文书标题" name="recTitle" rules={[{ max: 30,message:'文书标题不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="文书标题" name="recTitle" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="文书标题" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>
-                            <Form.Item label="质控模块名称" name="modeName" rules={[{ max: 30,message:'质控模块名称不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="质控模块名称" name="modeName" >
+                                <Select showSearch allowClear onSearch={onSearch} placeholder="请选择">
+                                    {modeList.map((item,i) => {
+                                        return (
+                                            <Option value={item} key={i}>{item}</Option>
+                                        )
+                                    })}
+                                </Select>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={5}>
@@ -253,37 +278,37 @@ function FieldProblem() {
                 <div className="table-data" style={{ justifyContent: 'left' }}>
                     <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
-                            <p>{probleData.notSolvedNonnull || '-'}</p>
+                            <p>{probleData.notSolvedNonnull || probleData.notSolvedNonnull == 0 ? probleData.notSolvedNonnull : '-'}</p>
                             <p>数据缺失</p>
                         </Col>
                         <Col span={6} order={2} className="box-item">
-                            <p>{probleData.notSolvedStandardvalue || '-'}</p>
+                            <p>{probleData.notSolvedStandardvalue || probleData.notSolvedStandardvalue == 0 ? probleData.notSolvedStandardvalue : '-'}</p>
                             <p>非标准值</p>
                         </Col>
                         <Col span={6} order={3} className="box-item">
-                            <p>{probleData.notSolvedRegular || '-'}</p>
+                            <p>{probleData.notSolvedRegular || probleData.notSolvedRegular == 0 ? probleData.notSolvedRegular : '-'}</p>
                             <p>正则校验失败</p>
                         </Col>
                         <Col span={6} order={4} className="box-item item">
-                            <p>{probleData.notSolved || '-'}</p>
+                            <p>{probleData.notSolved || probleData.notSolved == 0 ? probleData.notSolved : '-'}</p>
                             <p>未处理</p>
                         </Col>
                     </Row>
                     <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
-                            <p>{probleData.resolvedNonnull || '-'}</p>
+                            <p>{probleData.resolvedNonnull || probleData.resolvedNonnull == 0 ? probleData.resolvedNonnull : '-'}</p>
                             <p>数据缺失</p>
                         </Col>
                         <Col span={6} order={2} className="box-item">
-                            <p>{probleData.resolvedStandardvalue || '-'}</p>
+                            <p>{probleData.resolvedStandardvalue || probleData.resolvedStandardvalue == 0 ? probleData.resolvedStandardvalue : '-'}</p>
                             <p>非标准值</p>
                         </Col>
                         <Col span={6} order={3} className="box-item">
-                            <p>{probleData.resolvedRegular || '-'}</p>
+                            <p>{probleData.resolvedRegular || probleData.resolvedRegular == 0 ? probleData.resolvedRegular : '-'}</p>
                             <p>正则校验失败</p>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
-                            <p>{probleData.resolved || '-'}</p>
+                            <p>{probleData.resolved || probleData.resolved == 0 ? probleData.resolved : '-'}</p>
                             <p>已处理</p>
                         </Col>
                     </Row>
@@ -316,6 +341,7 @@ function FieldProblem() {
                     onCancel={cancel}
                     footer={null}
                     forceRender={true}
+                    maskClosable={false}
                 >
                     <ProblemContext.Provider value={{ problemDetail, type }}>
                         <EditProblem userChange={userChange} />

+ 84 - 36
src/components/FieldRules/addRules.js

@@ -6,6 +6,7 @@ import backIcon from "@images/back.png";
 import FiledContext from './filed-context';
 import add from '@images/add-icon.png';
 import del from '@images/del-icon.png';
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 const { TextArea } = Input;
@@ -46,6 +47,7 @@ function AddRules(props) {
                 visible={visible}
                 onOk={handleOk}
                 onCancel={handleCancel}
+                maskClosable={false}
             >
                 <p>您还有内容未保存,确定要退出?</p>
             </Modal>
@@ -57,9 +59,9 @@ function ContentForm(props) {
     const [standardValueList, setStandardValueList] = useState([]);
     const [regularList, setRegularList] = useState([]);//正则式数据
     const [tableList, setTableList] = useState([]);//表名称
-    const [colList, setColList] = useState([]);//字段名称
+    const [colList, setColList] = useState([[]]);//字段名称
     const [list, setList] = useState([]);
-    const [isChange, seIsChange] = useState(true);
+    const [disable, seDisable] = useState([true]);
     const { type, detail } = useContext(FiledContext);
     const { back, form, cancel } = props;
     const initialValues = detail
@@ -78,8 +80,14 @@ function ContentForm(props) {
             }
         })
     }
-    function getAddUpColumnName() {
-        post(api.getAddUpColumnName).then((res) => {
+    function getAddUpColumnName(tableCname, tableEname, columnCname, columnEname) {
+        post(api.getAddUpColumnName, {
+            tableCname: tableCname,
+            tableEname: tableEname,
+            columnCname: columnCname,
+            columnEname: columnEname,
+
+        }).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
                 let columnList = []
@@ -89,25 +97,42 @@ function ContentForm(props) {
                 });
                 setTableList(columnList);
                 setList(data)
-                if (type == 2) {
-                    data.forEach((item, i) => {
-                        detail.columnList.forEach(it => {
-                            if (item.getTableNameDTO.tableCname == it.tableCname) {
-                                let colList = data[i].getColumnNameDTOList
-                                setColList([...colList])
-                            }
-                        });
+                // if (type == 2) {
+                //     data.forEach((item, i) => {
+                //         detail.columnList.forEach(it => {
+                //             if (item.getTableNameDTO.tableCname == it.tableCname) {
+                //                 let colList = [[]]
+                //                 colList[0] = data[i].DTOList
+                //                 setColList([...colList])
+                //             }
+                //         });
 
-                    });
-                }
+                //     });
+                // }
             }
         })
     }
     //表选择
-    function tablechange(value, options) {
-        let colList = list[options.key].getColumnNameDTOList
-        seIsChange(false)
-        setColList([...colList])
+    function tablechange(i, value, options) {
+        console.log(value);
+        const formData = form.getFieldsValue();
+        if (value) {
+            colList[i] = list[options.key].getColumnNameDTOList
+            disable[i] = false
+            seDisable([...disable])
+            setColList([...colList])
+        } else {
+            colList[i] = []
+            disable[i] = true
+            seDisable([...disable])
+            setColList([...colList])
+        }
+        let columnList = formData.columnList;
+        columnList[i].columnCname = undefined
+        columnList[i].columnEname = undefined
+        form.setFieldsValue({
+            columnList: columnList
+        });
     }
     function colchange(value, options) {
         const formData = form.getFieldsValue();
@@ -117,6 +142,22 @@ function ContentForm(props) {
             columnList: columnList
         });
     }
+    //表名称搜索(中文)
+    function cnameSearch(val) {
+        getAddUpColumnName(val, '', '', '')
+    }
+    //表名称搜索(英文)
+    function enameSearch(val) {
+        getAddUpColumnName('', val, '', '')
+    }
+    //字段名称搜索(中文)
+    function colmeSearch(val) {
+        getAddUpColumnName(val, '', '', '')
+    }
+    //字段名称搜索(英文)
+    function coleneSearch(val) {
+        getAddUpColumnName('', val, '', '')
+    }
     //表字段添加
     function modifyData(i) {
         const formData = form.getFieldsValue();
@@ -135,6 +176,11 @@ function ContentForm(props) {
         form.setFieldsValue({
             columnList: columnList
         });
+        const index = columnList.length - 1
+        colList.push(...[[]])
+        setColList([...colList])
+        disable[index] = true
+        seDisable([...disable])
     }
     //标准值维护
     function modifyStand(i) {
@@ -178,7 +224,6 @@ function ContentForm(props) {
                 arr.push(it.tit)
             }
         });
-        console.log(arr);
         formData.standardValueList = arr
         if (type == 1) {
             url = api.addColumnVerify
@@ -203,18 +248,20 @@ function ContentForm(props) {
             const standardValueList = detail.standardValueList
             setColumnList(columnList)
             setStandardValueList(standardValueList)
-            seIsChange(false)
             list.forEach((item, i) => {
                 detail.columnList.forEach(it => {
                     if (item.getTableNameDTO.tableCname == it.tableCname) {
-                        let colList = list[i].getColumnNameDTOList
-                        console.log(colList);
+                        let colList = [[]]
+                        colList[0] = list[i].getColumnNameDTOList
                         setColList([...colList])
                     }
                 });
 
             });
         }
+        if (type == 2) {
+            seDisable([false])
+        }
     }, []);
 
     return (
@@ -235,7 +282,7 @@ function ContentForm(props) {
                                     <div className='item'>
                                         <div className='item-box'>
                                             <Form.Item label="表名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'tableCname']} labelAlign="right" >
-                                                <Select allowClear onChange={tablechange} style={{ width: 160 }} placeholder="请选择">
+                                                <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option)} onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {tableList.map((item) => {
                                                         return (
                                                             <Option value={item.tableCname} key={item.index}>{item.tableCname}</Option>
@@ -244,7 +291,7 @@ function ContentForm(props) {
                                                 </Select>
                                             </Form.Item>
                                             <Form.Item label="表名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'tableEname']} labelAlign="right">
-                                                <Select allowClear onChange={tablechange} style={{ width: 160 }} placeholder="请选择" >
+                                                <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option)} onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择" >
                                                     {tableList.map((item) => {
                                                         return (
                                                             <Option value={item.tableEname} key={item.index}>{item.tableEname}</Option>
@@ -255,8 +302,8 @@ function ContentForm(props) {
                                         </div>
                                         <div className='item-box'>
                                             <Form.Item label="字段名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'columnCname']} labelAlign="right">
-                                                <Select allowClear onChange={colchange} style={{ width: 160 }} placeholder="请选择" disabled={isChange}>
-                                                    {colList.map((item) => {
+                                                <Select allowClear showSearch onChange={colchange} onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                    {colList[i].map((item) => {
                                                         return (
                                                             <Option value={item.columnCname} key={item.id} index={i}>{item.columnCname}</Option>
                                                         )
@@ -264,8 +311,8 @@ function ContentForm(props) {
                                                 </Select>
                                             </Form.Item>
                                             <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
-                                                <Select allowClear onChange={colchange} style={{ width: 160 }} placeholder="请选择" disabled={isChange}>
-                                                    {colList.map((item) => {
+                                                <Select allowClear showSearch onChange={colchange} onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                    {colList[i].map((item) => {
                                                         return (
                                                             <Option value={item.columnEname} key={item.id} index={i}>{item.columnEname}</Option>
                                                         )
@@ -285,19 +332,19 @@ function ContentForm(props) {
                     }
 
                 </Form.Item>
-                <Form.Item label="是否必填数据" name="isRequired">
+                <Form.Item label="是否必填数据" name="isRequired" rules={[{ required: true, message: '请选择是否必填' }]}>
                     <Radio.Group>
-                        <Radio value={1}>是</Radio>
-                        <Radio value={0}>否</Radio>
+                        <Radio value={'1'}>是</Radio>
+                        <Radio value={'0'}>否</Radio>
                     </Radio.Group>
                 </Form.Item>
-                <Form.Item label="标准值维护" rules={[{ max: 30,message:'标准值不能超过30个字符' }]}>
+                <Form.Item label="标准值维护" rules={[{ max: 30, message: '标准值不能超过30个字符' }]}>
                     {
                         standardValueList.map((it, i) => {
                             return (
                                 <div className='box-2' key={i} >
-                                    <Form.Item name={['standardValueList', i, 'tit']} style={{ width: 159 }}>
-                                        <Input autoComplete='off' placeholder="请输入"/>
+                                    <Form.Item name={['standardValueList', i, 'tit']} style={{ width: 159 }} getValueFromEvent={getValueFromEvent}>
+                                        <Input autoComplete='off' placeholder="请输入" />
                                     </Form.Item>
                                     <img onClick={() => modifyStand(i)} src={i == 0 ? add : del} />
                                 </div>
@@ -319,10 +366,11 @@ function ContentForm(props) {
                 <Form.Item hidden={true} name="regularId" noStyle>
                     <Input />
                 </Form.Item>
-                <Form.Item label="说明" name="description" rules={[{ max: 200,message:'说明不能超过200个字符' }]}>
+                <Form.Item label="说明" name="description" rules={[{ max: 200, message: '说明不能超过200个字符' }]} getValueFromEvent={getValueFromEvent}>
                     <TextArea
                         autoSize={{ minRows: 3, maxRows: 5 }}
-						placeholder="请输入"
+                        placeholder="请输入"
+
                     />
                 </Form.Item>
             </Form>

+ 12 - 6
src/components/FieldRules/index.js

@@ -5,6 +5,7 @@ import '@common/common.less';
 import apiObj from '@api/index';
 import AddRules from './addRules';
 import FiledContext from './filed-context';
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
@@ -112,9 +113,9 @@ function FieldRules() {
             if (res.data.code === 200) {
                 //刷新列表
                 getColumnVerifyPage()
-                message.success(res.data.msg);
+                message.success(res.data.message);
             } else {
-                message.warning(res.data.msg || '操作失败,请重试~');
+                message.warning(res.data.message || '操作失败,请重试~');
             }
         });
         showDelModal(false);
@@ -163,13 +164,16 @@ function FieldRules() {
                         columnEname: data.columnEname,
                         tableCname: data.tableCname,
                         tableEname: data.tableEname,
+                        disable: true,
                         id: data.id
                     }],
                     standardValueList: [{
                         tit: data.standardvalue,
                     }],
+                    regularName:data.regular,
                     ...data
                 }
+                console.log(arr);
                 setFiledDetail(arr)
             }
         })
@@ -195,6 +199,7 @@ function FieldRules() {
     //返回
     function goBack() {
         setAddVisible(false);
+        setFiledDetail(null)
     }
     const onFinish = (value) => {
         const param = {
@@ -224,7 +229,7 @@ function FieldRules() {
         },
         {
             title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue', width: 110, render: (text, record) => {
-                return (record.standardvalue||"").length > 10 ? <span title={record.standardvalue}>{record.standardvalue.substring(0, 10) + '...'}</span> : record.standardvalue;
+                return (record.standardvalue || "-").length > 10 ? <span title={record.standardvalue}>{record.standardvalue.substring(0, 10) + '...'}</span> : record.standardvalue;
             }
         },
         {
@@ -234,7 +239,7 @@ function FieldRules() {
         },
         {
             title: '说明', dataIndex: 'description', key: 'description', render: (text, record) => {
-                return (record.description||"").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
+                return (record.description || "-").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
             }
         },
         {
@@ -323,8 +328,8 @@ function FieldRules() {
                             </Form.Item>
                         </Col>
                         <Col span={5} key={5}>
-                            <Form.Item label="标准值" name="standardValue" rules={[{ max: 30,message:'标准值不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="标准值" name="standardValue" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="标准值" autoComplete='off' allowClear maxLength='30'  />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={6}>
@@ -389,6 +394,7 @@ function FieldRules() {
                 onOk={delColumnVerify}
                 /*confirmLoading={confirmLoading}*/
                 onCancel={() => showDelModal(false)}
+                maskClosable={false}
             >
                 <p>字段校验规则删除后将无法恢复,确认删除这{selectedRowKeys.length}条变更记录?</p>
             </Modal>

+ 2 - 0
src/components/FuncManager/index.js

@@ -214,6 +214,7 @@ function OrgManager() {
           onCancel={cancel}
           footer={null}
           forceRender={true}
+          maskClosable={false}
         >
           <FuncContext.Provider value={{ type: type, id: id, detail: funcDetail }}>
             <AddFunc userChange={userChange} />
@@ -229,6 +230,7 @@ function OrgManager() {
         visible={visible}
         onOk={handleOk}
         onCancel={handleCancel}
+        maskClosable={false}
       >
         <p>{tipText[modalType]}</p>
       </Modal>

+ 2 - 0
src/components/InpaManager/index.js

@@ -328,6 +328,7 @@ function InpaManager() {
           onCancel={cancel}
           footer={null}
           forceRender={true}
+          maskClosable={false}
         >
           <InpaContext.Provider value={{ id: id, type: type, formData: formData }}>
             <AddInpa userChange={userChange} />
@@ -342,6 +343,7 @@ function InpaManager() {
         visible={msvisible}
         onOk={handleOk}
         onCancel={handleCancel}
+        maskClosable={false}
       >
         <p>{tipText[modalType]}</p>
       </Modal>

+ 197 - 193
src/components/MedicalTeam/index.js

@@ -1,19 +1,19 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Row, Col, DatePicker,Modal } from 'antd';
+import { Form, Input, Button, Table, Row, Col, DatePicker, Modal } from 'antd';
 import '@common/common.less';
 import apiObj from '@api/index';
 import moment from "moment";
 import "moment/locale/zh-cn"
 import medicalContext from './medical-context';
 import AddMedical from './addMedical.js';
-	const { post, api, } = apiObj;
-	const { RangePicker } = DatePicker;
+const { post, api, } = apiObj;
+const { RangePicker } = DatePicker;
 function MedicalTeam() {
 	useEffect(() => {
 		getMedicalTeam();
 	}, []);
-	const [logList, setLogList] = useState([{operationId:'3233',operationName:'张三',operationDate:'心电',operationIp:'232323',operationDate:'232323',status:'1'},
-	{operationId:'3233',operationName:'张三',operationDate:'心电',operationIp:'232323',operationDate:'232323',status:'2'}]);
+	const [logList, setLogList] = useState([{ operationId: '3233', operationName: '张三', operationDate: '心电', operationIp: '232323', operationDate: '232323', status: '1' },
+	{ operationId: '3233', operationName: '张三', operationDate: '心电', operationIp: '232323', operationDate: '232323', status: '2' }]);
 	const [total, setTotal] = useState(0);
 	const [size, setSize] = useState(15);
 	const [current, setCurrent] = useState(1);
@@ -23,7 +23,7 @@ function MedicalTeam() {
 		current: 1,
 		size: 15
 	});
-	const [form] = Form.useForm(); 
+	const [form] = Form.useForm();
 	//表格
 	let list = []
 	let data = {
@@ -34,11 +34,11 @@ function MedicalTeam() {
 	//表格数据
 	function getMedicalTeam(param) {
 		post(api.getOfficialCapacityPage, param || params).then((res) => {
-		  if (res.data.code === 200) {
-			const data = res.data.data;
-			// setLogList(data.records);
-			setTotal(data.total)
-		  }
+			if (res.data.code === 200) {
+				const data = res.data.data;
+				// setLogList(data.records);
+				setTotal(data.total)
+			}
 		})
 	}
 	function onSizeChange(current, pageSize) {
@@ -56,98 +56,98 @@ function MedicalTeam() {
 		setCurrent(page);
 		getMedicalTeam()
 	}
-	
-	function onSelectChange(selectedRowKeys){
+
+	function onSelectChange(selectedRowKeys) {
 		console.log('selectedRowKeys changed: ', selectedRowKeys);
 		setSelectedRowKeys(selectedRowKeys);
 	};
-	
-	function onEdit(){
-	
+
+	function onEdit() {
+
 	}
-	function onForbidden(){
-	
+	function onForbidden() {
+
 	}
-	function onDelete(){
-	
+	function onDelete() {
+
 	}
 	//弹窗类型:1.禁用 2.启用 3.删除 (1.有关联医生,2.没有关联医生)
 	const [modalType, setModalType] = useState(1);
 	//弹框提示文字
-	const tipText={
-		1:'确认禁用该医疗组?',
-		2:'该医疗组信息关联医生,禁用后将自动解除关联,确认禁用该数据?',
-		3:'医疗组信息删除后将无法恢复,确认删除该数据?',
-		4:'该医疗组信息关联医生,删除后将自动解除关联,确认删除该数据?'  
+	const tipText = {
+		1: '确认禁用该医疗组?',
+		2: '该医疗组信息关联医生,禁用后将自动解除关联,确认禁用该数据?',
+		3: '医疗组信息删除后将无法恢复,确认删除该数据?',
+		4: '该医疗组信息关联医生,删除后将自动解除关联,确认删除该数据?'
 	}
 	const [visibleModel, setVisible] = useState(false);   //删除禁用确认弹窗显示
 	const [confirmLoading, setConfirmLoading] = useState(false);
 	//启用/禁用 flag=1启用 :禁用
-	const enable=(flag,id,type)=>{
-			//请求接口
+	const enable = (flag, id, type) => {
+		//请求接口
 	}
 	//启用/禁用弹框打开方法
-	const showModal=(type,id,flag)=>{
+	const showModal = (type, id, flag) => {
 		setModalType(type);
 		setVisible(true)
 	}
-		//启用/禁用弹窗取消
-		const handleCancel=()=>{
-			setVisible(false);
-			// setAddVisible(false);
-		}
-		//启用/禁用弹窗确认事件
-	  function handleOk() {
-	      if ("1,2".indexOf(modalType) > -1) {
-	          // onDelete();
-	      } else if ("3,4".indexOf(modalType) > -1) {
-	          enable(0);
-	      } else if (modalType === 5) {
-	          // onResetPsd();
-	      }
-	
-	  }
-	
-		//打开新增修改弹框
-		const [addVisible,setaddVisible] = useState(false); //弹框是否显示
-		const [formData, setFormData] = useState(null); //弹框是否有数据
-		const [title, setTitle] = useState("");    //弹框的标题
-		const [type, setType] = useState("");    //弹框类型是新增还是修改
-		const [userId, setUserId] = useState(""); 
-		//新增/修改弹框打开方法(flag 1:新增,2:修改 )
-		const showAddModel=(name,flag,userId)=>{
-			console.log('111',flag)
-			setTitle(name);
-			setType(flag)
-			setUserId(userId)
-			if (flag == 1||flag == 2) {
-			  setFormData({
-			    status: '1'
-			  })
-			}
-			setaddVisible(true);
-		}
-		//新增修改弹框关闭方法
-		function cancel() {
-		  setVisible(false)
-		  setFormData(null)
+	//启用/禁用弹窗取消
+	const handleCancel = () => {
+		setVisible(false);
+		// setAddVisible(false);
+	}
+	//启用/禁用弹窗确认事件
+	function handleOk() {
+		if ("1,2".indexOf(modalType) > -1) {
+			// onDelete();
+		} else if ("3,4".indexOf(modalType) > -1) {
+			enable(0);
+		} else if (modalType === 5) {
+			// onResetPsd();
 		}
-		//点击按钮关闭
-		function userChange() {
-		  setVisible(false)
-		  setFormData(null)
-		  //重新渲染列表
-		  // getUserPage();
+
+	}
+
+	//打开新增修改弹框
+	const [addVisible, setaddVisible] = useState(false); //弹框是否显示
+	const [formData, setFormData] = useState(null); //弹框是否有数据
+	const [title, setTitle] = useState("");    //弹框的标题
+	const [type, setType] = useState("");    //弹框类型是新增还是修改
+	const [userId, setUserId] = useState("");
+	//新增/修改弹框打开方法(flag 1:新增,2:修改 )
+	const showAddModel = (name, flag, userId) => {
+		console.log('111', flag)
+		setTitle(name);
+		setType(flag)
+		setUserId(userId)
+		if (flag == 1 || flag == 2) {
+			setFormData({
+				status: '1'
+			})
 		}
-	
+		setaddVisible(true);
+	}
+	//新增修改弹框关闭方法
+	function cancel() {
+		setVisible(false)
+		setFormData(null)
+	}
+	//点击按钮关闭
+	function userChange() {
+		setVisible(false)
+		setFormData(null)
+		//重新渲染列表
+		// getUserPage();
+	}
+
 	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');
+		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,
+			...data,
+			...value,
 		}
 		setCurrent(1)
 		setParams(param)
@@ -160,134 +160,138 @@ function MedicalTeam() {
 		getMedicalTeam(data);
 	};
 	const columns = [
-		{ title: '医疗组ID', dataIndex: 'operationId', key: 'index'},
-		{ title: '医疗组名称', dataIndex: 'operationName', key: 'index'},
-		{ title: '上级科室', dataIndex: 'operationDate', key: 'index'},
-		{ title: '上级病区', dataIndex: 'operationIp', key: 'index'},
-		{ title: '关联医生', dataIndex: 'operationDate', key: 'index'},
+		{ title: '医疗组ID', dataIndex: 'operationId', key: 'index' },
+		{ title: '医疗组名称', dataIndex: 'operationName', key: 'index' },
+		{ title: '上级科室', dataIndex: 'operationDate', key: 'index' },
+		{ title: '上级病区', dataIndex: 'operationIp', key: 'index' },
+		{ title: '关联医生', dataIndex: 'operationDate', key: 'index' },
 		{ title: '状态', dataIndex: 'operationIp', key: 'index' },
-		{title: '操作', dataIndex: 'operationId', key: 'operationId', render: (text, record) =>{
-			return <div className="medical-team-operation">
-			  			<a onClick={e => showAddModel('修改医疗组信息', 2)}>修改</a>
-					  	{record.status === '1' ?(<a onClick={()=>showModal(record.hasUserFlag || record.hasHospitalFlag ? 2 : 1, record.operationId, record.type='')}>禁用</a>):(<a onClick={enable}>启用</a>)}
-					 	<a onClick={()=>showModal(record.UserFlag || record.HospitalFlag ? 4 : 3, record.operationId, record.type='')}>删除</a>
-					</div>
-		  }},
+		{
+			title: '操作', dataIndex: 'operationId', key: 'operationId', render: (text, record) => {
+				return <div className="medical-team-operation">
+					<a onClick={e => showAddModel('修改医疗组信息', 2)}>修改</a>
+					{record.status === '1' ? (<a onClick={() => showModal(record.hasUserFlag || record.hasHospitalFlag ? 2 : 1, record.operationId, record.type = '')}>禁用</a>) : (<a onClick={enable}>启用</a>)}
+					<a onClick={() => showModal(record.UserFlag || record.HospitalFlag ? 4 : 3, record.operationId, record.type = '')}>删除</a>
+				</div>
+			}
+		},
 	];
 	const rowSelection = {
 		selectedRowKeys,
 		onChange: onSelectChange,
 	};
 	return (
-		  <div className="wrapper">
+		<div className="wrapper">
 			<div className="filter-box">
-			  <Form
-				  form={form}
-				  name="normal_login"
-				  onFinish={onFinish}
-				  initialValues={{ status: '' }}
-			  >
-				<Row gutter={24}>
-				  <Col span={5} key={0}>
-					<Form.Item label="医疗组ID" name="operationName">
-					  <Input placeholder="请输入" autoComplete='off'/>
-					</Form.Item>
-				  </Col>
-				  <Col span={5} key={1}>
-					<Form.Item label="医疗组名称" name="operationName">
-					  <Input placeholder="请输入" autoComplete='off'/>
-					</Form.Item>
-				  </Col>
-				  <Col span={5} key={2}>
-					<Form.Item label="上级科室" name="operationName">
-					  <Input placeholder="请输入" autoComplete='off'/>
-					</Form.Item>
-				  </Col>
-				  <Col span={5} key={3}>
-					<Form.Item label="上级病区" name="operationName">
-					  <Input placeholder="请输入" autoComplete='off'/>
-					</Form.Item>
-				  </Col>
-				  <Col span={5} key={4}>
-					<Form.Item label="关联医生" name="operationName">
-					  <Input placeholder="请输入" autoComplete='off'/>
-					</Form.Item>
-				  </Col>
-				  <Col span={7} key={5}>
-					<Form.Item label="状态" name="operationName">
-					  <RangePicker
-						  placeholder={['开始时间', '结束时间']}
-					  />
-					</Form.Item>
-				  </Col>
-				  <Col span={6} key={6}>
-					<Form.Item>
-					  <Button type="primary" htmlType="submit">
-						查询
-					  </Button>
-					  <Button onClick={onReset}>
-						重置
-					  </Button>
-					</Form.Item>
-				  </Col>
-				</Row>
-			  </Form>
+				<Form
+					form={form}
+					name="normal_login"
+					onFinish={onFinish}
+					initialValues={{ status: '' }}
+				>
+					<Row gutter={24}>
+						<Col span={5} key={0}>
+							<Form.Item label="医疗组ID" name="operationName">
+								<Input placeholder="请输入" autoComplete='off' />
+							</Form.Item>
+						</Col>
+						<Col span={5} key={1}>
+							<Form.Item label="医疗组名称" name="operationName">
+								<Input placeholder="请输入" autoComplete='off' />
+							</Form.Item>
+						</Col>
+						<Col span={5} key={2}>
+							<Form.Item label="上级科室" name="operationName">
+								<Input placeholder="请输入" autoComplete='off' />
+							</Form.Item>
+						</Col>
+						<Col span={5} key={3}>
+							<Form.Item label="上级病区" name="operationName">
+								<Input placeholder="请输入" autoComplete='off' />
+							</Form.Item>
+						</Col>
+						<Col span={5} key={4}>
+							<Form.Item label="关联医生" name="operationName">
+								<Input placeholder="请输入" autoComplete='off' />
+							</Form.Item>
+						</Col>
+						<Col span={7} key={5}>
+							<Form.Item label="状态" name="operationName">
+								<RangePicker
+									placeholder={['开始时间', '结束时间']}
+								/>
+							</Form.Item>
+						</Col>
+						<Col span={6} key={6}>
+							<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>
-				<Button type="primary" onClick={(e) => showAddModel('新增医疗组信息', 1)}>新增</Button>
-			  </div>
-			  <Table
-				  columns={columns}
-				  rowSelection={rowSelection}
-				  scroll={{ y: 'calc(100vh - 360px)' }}
-				  dataSource={logList}
-				  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 className="table-header">
+					<h2 className="table-title">医疗组管理</h2>
+					<Button type="primary" onClick={(e) => showAddModel('新增医疗组信息', 1)}>新增</Button>
+				</div>
+				<Table
+					columns={columns}
+					rowSelection={rowSelection}
+					scroll={{ y: 'calc(100vh - 360px)' }}
+					dataSource={logList}
+					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>
-			
+
 			{addVisible && formData ?
-			  <Modal
-			    title={title}
-			    okText='确定'
-			    cancelText='取消'
-			    width={500}
-			    visible={addVisible}
-			    onCancel={cancel}
-			    footer={null}
-			    forceRender={true}
-			  >
+				<Modal
+					title={title}
+					okText='确定'
+					cancelText='取消'
+					width={500}
+					visible={addVisible}
+					onCancel={cancel}
+					footer={null}
+					forceRender={true}
+					maskClosable={false}
+				>
 					<medicalContext.Provider value={{ formData }}>
-					  <AddMedical userChange={userChange} />
+						<AddMedical userChange={userChange} />
 					</medicalContext.Provider>
-			  </Modal>
-			  : ''}
-			
+				</Modal>
+				: ''}
+
 			<Modal
-	              title="提示"
-	              okText='确定'
-	              cancelText='取消'
-	              width={400}
-	              visible={visibleModel}
-	              onOk={handleOk}
-	              confirmLoading={confirmLoading}
-	              onCancel={handleCancel}
-	          >
-	          <p>{tipText[modalType]}</p>
-	      </Modal>
-		  </div >
+				title="提示"
+				okText='确定'
+				cancelText='取消'
+				width={400}
+				visible={visibleModel}
+				onOk={handleOk}
+				confirmLoading={confirmLoading}
+				onCancel={handleCancel}
+				maskClosable={false}
+			>
+				<p>{tipText[modalType]}</p>
+			</Modal>
+		</div >
 	)
 }
 

+ 3 - 1
src/components/MsgManage/index.js

@@ -62,7 +62,7 @@ function MsgManage() {
             if (code === 200) {
                 getTableData();     //刷新列表
                 setDelVisible(false);
-                message.success(res.data.msg || '删除成功')
+                message.success(res.data.msg || '操作成功')
             } else {
                 message.warning(res.data.msg || '删除失败,请重试')
             }
@@ -195,6 +195,7 @@ function MsgManage() {
                 visible={visible}
                 onCancel={()=>setVisible(false)}
                 confirmLoading={confirmLoading}
+                maskClosable={false}
             >
                 <div className="message-box">
                     <p className='msg-title'>{msgDetail.title}</p>
@@ -216,6 +217,7 @@ function MsgManage() {
                 onOk={postDelMsg}
                 onCancel={()=>setDelVisible(false)}
                 confirmLoading={confirmLoading}
+                maskClosable={false}
             >
                 <p>确定要删除这条通知吗?</p>
             </Modal>

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

@@ -211,6 +211,7 @@ function MyMessage() {
                 visible={visible}
                 confirmLoading={confirmLoading}
                 onCancel={() => setVisible(false)}
+                maskClosable={false}
             >
                 <div className="message-box">
                     <p className='msg-title'>{msgDetail.title}</p>

+ 1 - 0
src/components/OrgManager/AddSubOrg.js

@@ -85,6 +85,7 @@ function AddSubOrg(props) {
                     visible={visible}
                     onOk={handleOk}
                     onCancel={handleCancel}
+                    maskClosable={false}
                 >
                     <p>您还有内容未保存,确定要退出?</p>
                 </Modal>

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

@@ -448,6 +448,7 @@ function OrgManager() {
                 onOk={handleOk}
                 confirmLoading={confirmLoading}
                 onCancel={handleCancel}
+                maskClosable={false}
             >
                 <p>{tipText[modalType]}</p>
             </Modal>

+ 5 - 3
src/components/RegularManage/addRegular.js

@@ -4,6 +4,7 @@ import React, {
 import { Form, Modal, Button, message, Space, Input } from 'antd';
 import apiObj from '@api/index';
 import RegularContext from './regular-context';
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
 function EditBlock(props) {
@@ -54,16 +55,16 @@ function EditBlock(props) {
                 onFinish={onFinish}
                 initialValues={initialValues}
             >
-                <Form.Item label="正则式名称" name="name" rules={[{ required: true,message:'请输入正则式名称'},{ max: 30,message:'正则式名称不能超过30个字符' }]}>
+                <Form.Item label="正则式名称" name="name" getValueFromEvent={getValueFromEvent} rules={[{ required: true,message:'请输入正则式名称'},{ max: 30,message:'正则式名称不能超过30个字符' },{ pattern: /^[^\s]*$/,message: '请输入正则式名称',}]}>
                     <Input placeholder="请输入" autoComplete='off'/>
                 </Form.Item>
-                <Form.Item label="正则式值" name="val" rules={[{ required: true }]}>
+                <Form.Item label="正则式值" name="val"  rules={[{ required: true,message:'请输入正则式值'},{ max: 512,message:'正则式值不能超过512个字符' },{ pattern: /^[^\s]*$/,message: '请输入正则式值',}]}>
                     <TextArea
                         autoSize={{ minRows: 5, maxRows: 5 }}
                         placeholder="请输入"
                     />
                 </Form.Item>
-                <Form.Item label="说明" name="description" rules={[{ max: 200,message:'说明不能超过200个字符' }]}>
+                <Form.Item label="说明" name="description" getValueFromEvent={getValueFromEvent} rules={[{ max: 200,message:'说明不能超过200个字符' }]}>
                     <TextArea
                         autoSize={{ minRows: 5, maxRows: 5 }}
                         placeholder="请输入"
@@ -89,6 +90,7 @@ function EditBlock(props) {
                 onOk={addRegular}
                 /*confirmLoading={confirmLoading}*/
                 onCancel={() => cancel()}
+                maskClosable={false}
             >
                 <p>该正则式关联字段校验规则,修改后将同步更新,确认修改?</p>
             </Modal>

+ 14 - 5
src/components/RegularManage/index.js

@@ -2,6 +2,7 @@ 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 { getValueFromEvent } from '@utils/index'
 import '@common/common.less';
 import apiObj from '@api/index';
 import AddRegular from './addRegular';
@@ -57,7 +58,11 @@ function RegularManage() {
     }
     //删除记录
     function delRegularById() {
-        post(api.delRegularById, { ids: selectedRowKeys }).then((res) => {
+        let arr = []
+        selectedRowKeys.forEach(it => {
+            arr.push(it.split('-')[0])
+        });
+        post(api.delRegularById, { ids: arr }).then((res) => {
             if (res.data.code === 200) {
                 //刷新列表
                 getRegularPage()
@@ -77,10 +82,12 @@ function RegularManage() {
     }
     function cancel() {
         setVisible(false)
+        setRegularDetail(null)
     }
     function userChange() {
         setVisible(false)
         getRegularPage()
+        setRegularDetail(null)
     }
     function onSizeChange(current, pageSize) {
         params.current = current
@@ -136,12 +143,12 @@ function RegularManage() {
         { title: '正则式名称', dataIndex: 'name', key: 'name' },
         {
             title: '正则式值', dataIndex: 'val', key: 'val', render: (text, record) => {
-                return record.val.length > 20 ? <span title={record.val}>{record.val.substring(0, 20)+'...'}</span>: record.val;
+                return record.val.length > 20 ? <span title={record.val}>{record.val.substring(0, 20) + '...'}</span> : record.val;
             }
         },
         {
             title: '说明', dataIndex: 'description', key: 'description', render: (text, record) => {
-                return record.description.length > 20 ? <span title={record.description}>{record.description.substring(0, 20)+'...'}</span> : record.description;
+                return (record.description || "-").length > 20 ? <span title={record.description}>{record.description.substring(0, 20) + '...'}</span> : record.description;
             }
         },
         {
@@ -163,8 +170,8 @@ function RegularManage() {
                 >
                     <Row gutter={24}>
                         <Col span={5} key={0}>
-                            <Form.Item label="正则式名称" name="name" rules={[{ max: 30,message:'正则式名称不能超过30个字符' }]}>
-                                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                            <Form.Item label="正则式名称" name="name" getValueFromEvent={getValueFromEvent}>
+                                <Input placeholder="正则式名称" autoComplete='off' allowClear maxLength='30' />
                             </Form.Item>
                         </Col>
 
@@ -221,6 +228,7 @@ function RegularManage() {
                     onCancel={cancel}
                     footer={null}
                     forceRender={true}
+                    maskClosable={false}
                 >
                     <RegularContext.Provider value={{ regularDetail, type, flag }}>
                         <AddRegular userChange={userChange} cancel={cancel} />
@@ -238,6 +246,7 @@ function RegularManage() {
                 onOk={delRegularById}
                 /*confirmLoading={confirmLoading}*/
                 onCancel={() => showDelModal(false)}
+                maskClosable={false}
             >
                 <p>{tip}</p>
             </Modal>

+ 1 - 0
src/components/RoleManager/AddRole.js

@@ -48,6 +48,7 @@ function AddRole(props){
                 visible={visible}
                 onOk={handleOk}
                 onCancel={handleCancel}
+                maskClosable={false}
             >
                 <p>您还有内容未保存,确定要退出?</p>
             </Modal>

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

@@ -308,6 +308,7 @@ function RoleManager() {
                 onOk={handleOk}
                 confirmLoading={confirmLoading}
                 onCancel={handleCancel}
+                maskClosable={false}
             >
                 <p>{tipText[modalType]}</p>
             </Modal>

+ 5 - 4
src/components/SurgeryManager/index.js

@@ -81,7 +81,7 @@ function SurgManager() {
       if (res.data.code === 200) {
         getOperationPage();
         setSurgid([])
-        message.success("删除成功");
+        message.success("操作成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
@@ -261,17 +261,17 @@ function SurgManager() {
           <Row gutter={24}>
             <Col span={5} key={0}>
               <Form.Item label="医院手术/操作名称" name="name">
-                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                <Input placeholder="请输入" autoComplete='off' allowClear />
               </Form.Item>
             </Col>
             <Col span={5} key={1}>
               <Form.Item label="手术和操作代码" name="code">
-                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                <Input placeholder="请输入" autoComplete='off' allowClear />
               </Form.Item>
             </Col>
             <Col span={5} key={2}>
               <Form.Item label="标准手术/操作名称" name="standard">
-                <Input placeholder="请输入" autoComplete='off' allowClear/>
+                <Input placeholder="请输入" autoComplete='off' allowClear />
               </Form.Item>
             </Col>
             <Col span={4} key={3}>
@@ -359,6 +359,7 @@ function SurgManager() {
             visible={unsaved}
             onOk={addCancel}
             onCancel={unsavedCancel}
+            maskClosable={false}
           >
             <p>当前数据未保存 是否确认关闭?</p>
           </Modal>

+ 2 - 0
src/components/UserManager/index.js

@@ -374,6 +374,7 @@ function UserManager() {
           onCancel={cancel}
           footer={null}
           forceRender={true}
+          maskClosable={false}
         >
           <UserContext.Provider value={{ userId, type, formData, roleList }}>
             <AddUser userChange={userChange} cancel={cancel} />
@@ -389,6 +390,7 @@ function UserManager() {
         visible={msvisible}
         onOk={handleOk}
         onCancel={handleCancel}
+        maskClosable={false}
       >
         <p>{tipText[modalType]}</p>
       </Modal>

+ 3 - 3
src/utils/index.js

@@ -66,7 +66,7 @@ export function getTimeDetail() {
     return str;
 }
 export function getValueFromEvent(e) {
-    return e.target.value.replace(/(^\s*)|(\s*$)/g, '');
+    return e.target.value.replace(/\s*/g,"");
 }
 //存取cookie
 export function setCookie(cname, cvalue) {
@@ -101,6 +101,6 @@ export function filterIds(arr, str) {    //arr需遍历的数组;str需拼接
     })
 }
 
-export function disabledDate(current){
+export function disabledDate(current) {
     return current && current >= moment().endOf('day'); // 选择时间要大于等于当前天。若今天不能被选择,去掉等号即可。
-}
+}