|
@@ -125,6 +125,8 @@ const BasicInfoForm: React.FC<BasicInfoFormProps> = ({
|
|
|
updateSourceRef.current = 'age';
|
|
updateSourceRef.current = 'age';
|
|
|
const newDob = calculateDobFromAge(patient_age);
|
|
const newDob = calculateDobFromAge(patient_age);
|
|
|
form.setFieldsValue({ patient_dob: newDob });
|
|
form.setFieldsValue({ patient_dob: newDob });
|
|
|
|
|
+ //人工同步更新 Redux store
|
|
|
|
|
+ dispatch(setFormData(form.getFieldsValue()))
|
|
|
console.log('年龄变化,更新出生日期:', newDob.format('YYYY-MM-DD'));
|
|
console.log('年龄变化,更新出生日期:', newDob.format('YYYY-MM-DD'));
|
|
|
}
|
|
}
|
|
|
}, [patient_age, form]);
|
|
}, [patient_age, form]);
|