fix(health+web): PII 解密日志 + 负年龄防护 + 随访页面中文 placeholder
- helper.rs: 提取 decrypt_field 辅助函数,解密失败时输出 warn 日志而非静默返回 None - format.ts: calcAge 负年龄(未来出生日期)返回 '--' 而非 '-72岁' - FollowUpTaskList.tsx: DatePicker.RangePicker 添加中文 placeholder Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -344,6 +344,7 @@ export default function FollowUpTaskList() {
|
||||
/>
|
||||
<DatePicker.RangePicker
|
||||
style={{ width: 240 }}
|
||||
placeholder={['开始日期', '结束日期']}
|
||||
onChange={(dates) => {
|
||||
if (dates && dates[0] && dates[1]) {
|
||||
setFilters((prev) => ({
|
||||
|
||||
@@ -12,5 +12,5 @@ export const formatRelative = (v: string | null | undefined): string =>
|
||||
export const calcAge = (birthDate: string | null | undefined): string => {
|
||||
if (!birthDate) return '--';
|
||||
const age = dayjs().diff(dayjs(birthDate), 'year');
|
||||
return `${age}岁`;
|
||||
return age >= 0 ? `${age}岁` : '--';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user