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