Browse Source

Merge branch 'dev' of http://192.168.2.236:10080/zhouna/ai-admin into dev

莫凡 3 years ago
parent
commit
abd9945cc7

+ 3 - 3
src/components/BlockLossManage/editBlock.js

@@ -62,8 +62,8 @@ function EditBlock(props) {
         if (!dates || dates.length === 0) {
             return current && current >= moment().endOf('day');
         }
-        const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
-        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 29;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 29;
         if (!limit) {
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
         } else {
@@ -98,7 +98,6 @@ function EditBlock(props) {
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
             startDate: values.startDate,
-            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataCompare, params).then((res) => {
             if (res.data.code === 200) {
@@ -208,6 +207,7 @@ function EditBlock(props) {
                     {type != 3 ?
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                             <RangePicker
+                            allowClear={false}
                                 placeholder={['开始时间', '结束时间']}
                                 disabledDate={disabledDate}
                                 onCalendarChange={val => setDates(val)}

+ 18 - 7
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, getValueFromEvent } from '@utils/index'
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
@@ -21,6 +21,7 @@ function BlockLossManage() {
     const [title, setTitle] = useState(0);
     const [visible, setVisible] = useState(false);
     const [size, setSize] = useState(15);
+    const [dates, setDates] = useState([]);
     const [current, setCurrent] = useState(1);
     const [type, setType] = useState(null);
     const [blockData, setBlockData] = useState({});
@@ -67,6 +68,14 @@ function BlockLossManage() {
             }
         })
     }
+    function disabledDate(current) {
+        if (!dates || dates.length === 0) {
+            return current && current >= moment().endOf('day');
+        }
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 364;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 364;
+        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+    };
     //修改
     function showModal(title, row, type) {
         setVisible(true)
@@ -98,6 +107,7 @@ function BlockLossManage() {
     function userChange() {
         setVisible(false)
         getBlockLossPage();
+        blockLossTypeGather({ startDate: params.startDate, endDate: params.endDate })
         setBlockDetail(null)
     }
     const onFinish = (value) => {
@@ -152,8 +162,8 @@ function BlockLossManage() {
             }
         },
         {
-            title: '更新时间', dataIndex: 'auditTime', key: 'auditTime', render: (text, record) => {
-                return record.auditTime || '-';
+            title: '更新时间', dataIndex: 'gmtModified', key: 'gmtModified', render: (text, record) => {
+                return record.gmtModified || '-';
             }
         },
         {
@@ -191,6 +201,7 @@ function BlockLossManage() {
                                     allowClear={false}
                                     disabledDate={disabledDate} // 限制日期不可选
                                     placeholder={['开始时间', '结束时间']}
+                                    onCalendarChange={val => setDates(val)}
                                 />
                             </Form.Item>
                         </Col>
@@ -241,8 +252,8 @@ function BlockLossManage() {
                                     allowClear
                                 >
                                     <Option value="" key={3}>全部</Option>
-                                    <Option value="0" key={0}>未通过</Option>
-                                    <Option value="1" key={1}>通过</Option>
+                                    <Option value="0" key={0}>核查未通过</Option>
+                                    <Option value="1" key={1}>核查通过</Option>
                                     <Option value="2" key={2}>未核查</Option>
                                 </Select>
                             </Form.Item>
@@ -312,7 +323,7 @@ function BlockLossManage() {
                         </Col>
                         <Col span={6} order={3} className="box-item">
                             <p>{blockData.outCodeNum || blockData.outCodeNum == 0 ? blockData.outCodeNum : '-'}</p>
-                            <p>病历号丢失</p>
+                            <p>患者信息丢失</p>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
                             <p>{blockData.outLossNum || blockData.outLossNum == 0 ? blockData.outLossNum : '-'}</p>
@@ -330,7 +341,7 @@ function BlockLossManage() {
                         </Col>
                         <Col span={6} order={3} className="box-item">
                             <p>{blockData.inCodeNum || blockData.inCodeNum == 0 ? blockData.inCodeNum : '-'}</p>
-                            <p>病历号丢失</p>
+                            <p>患者信息丢失</p>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
                             <p>{blockData.inLossNum || blockData.inLossNum == 0 ? blockData.inLossNum : '-'}</p>

+ 3 - 2
src/components/FieldProblem/editProblem.js

@@ -73,8 +73,8 @@ function EditBlock(props) {
         if (!dates || dates.length === 0) {
             return current && current >= moment().endOf('day');
         }
-        const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
-        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 29;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 29;
         if(!limit){
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
         }else{
@@ -209,6 +209,7 @@ function EditBlock(props) {
                     {type != 3 ?
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                             <RangePicker
+                            allowClear={false}
                                 placeholder={['开始时间', '结束时间']}
                                 disabledDate={disabledDate}
                                 onCalendarChange={val => setDates(val)}

+ 7 - 5
src/components/FieldProblem/index.js

@@ -32,7 +32,8 @@ function FieldProblem() {
         pages: 1,
         current: 1,
         size: 15,
-        desc: ['isSolved', 'solveTime'],
+        asc:['isSolved'],
+        desc: ['solveTime'],
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
@@ -41,7 +42,8 @@ function FieldProblem() {
         pages: 1,
         current: 1,
         size: size,
-        desc: ['isSolved', 'solveTime'],
+        asc:['isSolved'],
+        desc: ['solveTime'],
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     }
@@ -98,7 +100,7 @@ function FieldProblem() {
     function userChange() {
         setVisible(false)
         getColumnResultPage();
-        getColumnResultNumber(date)
+        getColumnResultNumber({ behospitalStartDate: params.behospitalStartDate, behospitalEndDate: params.behospitalEndDate })
         setProblemDetail(null)
     }
     function onSizeChange(current, pageSize) {
@@ -173,8 +175,8 @@ function FieldProblem() {
             }
         },
         {
-            title: '更新时间', dataIndex: 'auditTime', key: 'auditTime', render: (text, record) => {
-                return record.auditTime || '-';
+            title: '更新时间', dataIndex: 'solveTime', key: 'solveTime', render: (text, record) => {
+                return record.solveTime || '-';
             }
         },
         {

+ 17 - 12
src/components/FieldRules/addRules.js

@@ -114,7 +114,6 @@ function ContentForm(props) {
     }
     //表选择
     function tablechange(i, value, options,ins) {
-        console.log(value);
         const formData = form.getFieldsValue();
         if (value) {
             colList[i] = list[options.key].getColumnNameDTOList
@@ -129,21 +128,26 @@ function ContentForm(props) {
         }
         let columnList = formData.columnList;
         if(ins == 1){
-            columnList[i].tableEname = value
+            columnList[i].tableEname = options.val
         }else{
-            columnList[i].tableCname = value
+            columnList[i].tableCname = options.val
         }
-        
         columnList[i].columnCname = undefined
         columnList[i].columnEname = undefined
         form.setFieldsValue({
             columnList: columnList
         });
+        console.log(form.getFieldsValue());
     }
-    function colchange(value, options) {
+    function colchange(i, value, options,ins) {
         const formData = form.getFieldsValue();
         let columnList = formData.columnList;
-        columnList[options.index].id = options.key
+        columnList[i].id = options.key
+        if(ins == 1){
+            columnList[i].columnEname = options.val
+        }else{
+            columnList[i].columnCname = options.val
+        }
         form.setFieldsValue({
             columnList: columnList
         });
@@ -187,6 +191,7 @@ function ContentForm(props) {
         setColList([...colList])
         disable[index] = true
         seDisable([...disable])
+        
     }
     //标准值维护
     function modifyStand(i) {
@@ -291,7 +296,7 @@ function ContentForm(props) {
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,1)} onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {tableList.map((item) => {
                                                         return (
-                                                            <Option value={item.tableEname} key={item.index}>{item.tableCname}</Option>
+                                                            <Option value={item.tableCname} val={item.tableEname} key={item.index}>{item.tableCname}</Option>
                                                         )
                                                     })}
                                                 </Select>
@@ -300,7 +305,7 @@ function ContentForm(props) {
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,2)} onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择" >
                                                     {tableList.map((item) => {
                                                         return (
-                                                            <Option value={item.tableCname} key={item.index}>{item.tableEname}</Option>
+                                                            <Option value={item.tableEname} val={item.tableCname} key={item.index}>{item.tableEname}</Option>
                                                         )
                                                     })}
                                                 </Select>
@@ -308,19 +313,19 @@ 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 showSearch onChange={colchange} onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                <Select allowClear showSearch onChange={(value, option) => colchange(i, value, option,1)} 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>
+                                                            <Option value={item.columnCname} val={item.columnEname} key={item.id} index={i}>{item.columnCname}</Option>
                                                         )
                                                     })}
                                                 </Select>
                                             </Form.Item>
                                             <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
-                                                <Select allowClear showSearch onChange={colchange} onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                <Select allowClear showSearch onChange={(value, option) => colchange(i, value, option,2)} 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>
+                                                            <Option value={item.columnEname} val={item.columnCname} key={item.id} index={i}>{item.columnEname}</Option>
                                                         )
                                                     })}
                                                 </Select>

+ 7 - 4
src/components/FieldRules/index.js

@@ -176,6 +176,12 @@ function FieldRules() {
         post(api.getByIdColumnVerify, param).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
+                let obj = []
+                data.standardvalue.split(';').forEach(it => {
+                    obj.push({
+                        tit: it
+                    })
+                });
                 const arr = {
                     columnList: [{
                         columnCname: data.columnCname,
@@ -185,13 +191,10 @@ function FieldRules() {
                         disable: true,
                         id: data.columnId
                     }],
-                    standardValueList: [{
-                        tit: data.standardvalue,
-                    }],
+                    standardValueList: obj,
                     regularName: data.regular,
                     ...data
                 }
-                console.log(arr);
                 setFiledDetail(arr)
             }
         })