1178232204@qq.com 3 سال پیش
والد
کامیت
45660fa8fc

+ 12 - 12
src/common/common.less

@@ -92,9 +92,9 @@ body{
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
+  position: relative;
+  left: -10px;
+  top: 14px;
   background: @link-color;
   border-radius: 50%;
 }
@@ -104,9 +104,9 @@ body{
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
+  position: relative;
+  left: -10px;
+  top: 14px;
   background: #FE9748;
   border-radius: 50%;
 }
@@ -115,9 +115,9 @@ body{
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
+  position: relative;
+  left: -10px;
+  top: 14px;
   background: #FF4D4D;
   border-radius: 50%;
 }
@@ -126,9 +126,9 @@ body{
   width: 5px;
   height: 5px;
   display: block;
-  position: absolute;
-  left: 8px;
-  top: 24px;
+  position: relative;
+  left: -10px;
+  top: 14px;
   background: #FF4D4D;
   border-radius: 50%;
 }

+ 24 - 6
src/components/BlockLossManage/editBlock.js

@@ -11,14 +11,17 @@ const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
 function EditBlock(props) {
     useEffect(() => {
+        if(type == 2){
+            setLimit(true)
+        }
     }, []);
     const [form] = Form.useForm();
     const [dates, setDates] = useState([]);
+    const [limit, setLimit] = useState(false);
     const { blockDetail, type } = useContext(BlockContext);
     const initialValues = blockDetail;
     const onFinish = values => {
         if (type == 1) {
-
         } else if (type == 2) {
             dataCompare(values)
         } else {
@@ -26,6 +29,17 @@ function EditBlock(props) {
         }
 
     };
+    function change(e) {
+        const { value } = e.target;
+        if (type == 1) {
+            if (value) {
+                setLimit(true)
+            } else {
+                setLimit(false)
+            }
+        }
+
+    }
     function editBlock(values) {
         let params = {
             id: blockDetail.id,
@@ -48,7 +62,11 @@ function EditBlock(props) {
         }
         const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
         const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
-        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        if (!limit) {
+            return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        } else {
+            return current && current >= moment().endOf('day');
+        }
     };
     //数据对比
     function dataCompare(values) {
@@ -174,12 +192,12 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
                     </Form.Item>
                 </Col>
                 {
                     type == 1 ?
-                        <div style={{color:'#1690FF'}}>
+                        <div style={{ color: '#1690FF' }}>
                             提示:<br />
                             1、补录时间范围限制为30天,每一天数据量的同步时间约为1分钟。<br />
                             时间范围以患者入院时间为准。<br />
@@ -187,7 +205,7 @@ function EditBlock(props) {
                         </div>
                         :
                         type == 2 ?
-                            <div style={{color:'#1690FF'}}>
+                            <div style={{ color: '#1690FF' }}>
                                 提示:将比对所有【已丢失】状态数据和患者入院在时间范围内的数据。
                             </div>
                             : ''
@@ -198,7 +216,7 @@ function EditBlock(props) {
                             取消
                         </Button>
                         <Button type="primary" htmlType="submit">
-                        {type == 3 ? '保存' : '确定'}
+                            {type == 3 ? '保存' : '确定'}
                         </Button>
                     </Space>
                 </Form.Item>

+ 1 - 1
src/components/BlockLossManage/index.less

@@ -1,6 +1,5 @@
 .table-data {
   display: flex;
-  justify-content: space-between;
   margin-bottom: 19px;
   .data-box {
     width: 380px;
@@ -9,6 +8,7 @@
     box-shadow: 0px 2px 4px 0px rgba(208, 208, 208, 0.5);
     border-radius: 2px;
     border: 1px solid #e2e5ef;
+    margin-right: 15px;
     .data-item {
       display: flex;
       flex-flow: column;

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

@@ -14,6 +14,7 @@ function EditBlock(props) {
     }, []);
     const [form] = Form.useForm();
     const [dates, setDates] = useState([]);
+    const [limit, setLimit] = useState(false);
     const { problemDetail, type } = useContext(BlockContext);
     const initialValues = problemDetail;
     const onFinish = values => {
@@ -24,6 +25,14 @@ function EditBlock(props) {
         }
 
     };
+    function change(e) {
+        const { value } = e.target;
+        if (value) {
+            setLimit(true)
+        } else {
+            setLimit(false)
+        }
+    }
     function editProblem(values) {
         let params = {
             id: problemDetail.id,
@@ -64,7 +73,12 @@ function EditBlock(props) {
         }
         const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
         const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
-        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        if(!limit){
+            return current && current >= moment().endOf('day') || tooEarly || tooLate;
+        }else{
+            return current && current >= moment().endOf('day');
+        }
+        
     };
     function cancel() {
         props.userChange()
@@ -201,7 +215,7 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
                     </Form.Item>
                 </Col>
                 {

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

@@ -242,7 +242,7 @@ function FieldProblem() {
                             <p>未处理</p>
                         </Col>
                     </Row>
-                    <Row className="data-box" style={{ marginLeft: '20px' }}>
+                    <Row className="data-box">
                         <Col span={6} order={1} className="box-item">
                             <p>{probleData.resolvedNonnull || '-'}</p>
                             <p>数据缺失</p>

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

@@ -98,7 +98,6 @@ function UserManager() {
           status: data.status,
           hospitalName:getHospitalsName(data.hospitals)
         }
-        console.log(arr);
         setRoleList(data.roles)
         setFormData(arr)
       }