diff --git a/apps/web/src/pages/health/PatientList.tsx b/apps/web/src/pages/health/PatientList.tsx
index ac3a6bc..a95eb02 100644
--- a/apps/web/src/pages/health/PatientList.tsx
+++ b/apps/web/src/pages/health/PatientList.tsx
@@ -30,6 +30,7 @@ import { PageContainer } from '../../components/PageContainer';
import { DrawerForm } from '../../components/DrawerForm';
import { usePaginatedData } from '../../hooks/usePaginatedData';
import { calcAge, formatDateTime } from '../../utils/format';
+import { dayjs } from '../../utils/dayjs';
/** 筛选器结构 */
interface PatientFilters {
@@ -392,7 +393,7 @@ export default function PatientList() {
? {
name: editingPatient.name,
gender: editingPatient.gender,
- birth_date: editingPatient.birth_date,
+ birth_date: editingPatient.birth_date ? dayjs(editingPatient.birth_date) : undefined,
blood_type: editingPatient.blood_type,
id_number: editingPatient.id_number,
allergy_history: editingPatient.allergy_history,
diff --git a/apps/web/src/pages/health/StatisticsDashboard/AdminDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/AdminDashboard.tsx
index ab5ecc8..df1ffa1 100644
--- a/apps/web/src/pages/health/StatisticsDashboard/AdminDashboard.tsx
+++ b/apps/web/src/pages/health/StatisticsDashboard/AdminDashboard.tsx
@@ -12,6 +12,9 @@ import HealthDataCenter from './HealthDataCenter';
export function AdminDashboard() {
const { patientStats, followUpStats, healthDataStats, loading } = useStatsData();
+ const patientCount = useCountUp(patientStats?.total_patients ?? 0);
+ const appointmentCount = useCountUp(healthDataStats?.appointments?.this_month ?? 0);
+ const doctorCount = useCountUp(0);
if (loading && !patientStats) return ;
@@ -27,12 +30,12 @@ export function AdminDashboard() {
- } />
+ } />
- } />
+ } />
@@ -59,7 +62,7 @@ export function AdminDashboard() {
- } />
+ } />
diff --git a/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx
index b013abc..654a82c 100644
--- a/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx
+++ b/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx
@@ -15,6 +15,8 @@ export function DoctorDashboard() {
const [personal, setPersonal] = useState(null);
const [loading, setLoading] = useState(true);
const { consultationStats } = useStatsData();
+ const myPatientsCount = useCountUp(personal?.my_patients ?? 0);
+ const consultationsCount = useCountUp(personal?.consultations_this_month ?? 0);
const fetchPersonal = useCallback(async () => {
try {
@@ -66,7 +68,7 @@ export function DoctorDashboard() {
}
suffix={p && p.new_patients_this_month > 0 ? (
@@ -92,7 +94,7 @@ export function DoctorDashboard() {
}
suffix={p && p.pending_consultations > 0 ? (
diff --git a/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx
index a4aa81c..13abf61 100644
--- a/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx
+++ b/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx
@@ -12,6 +12,8 @@ import { useCountUp } from '../../../hooks/useCountUp';
export function NurseDashboard() {
const [personal, setPersonal] = useState(null);
const [loading, setLoading] = useState(true);
+ const appointmentCount = useCountUp(personal?.today_appointments ?? 0);
+ const overdueCount = useCountUp(personal?.overdue_follow_ups ?? 0);
const fetchPersonal = useCallback(async () => {
try {
@@ -97,7 +99,7 @@ export function NurseDashboard() {
{/* 统计卡 */}
- } />
+ } />
@@ -113,7 +115,7 @@ export function NurseDashboard() {
- }
+ }
valueStyle={{ color: (p?.overdue_follow_ups ?? 0) > 0 ? '#cf1322' : undefined }}
/>
diff --git a/apps/web/src/pages/health/StatisticsDashboard/OperatorDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/OperatorDashboard.tsx
index 5687992..4ca271f 100644
--- a/apps/web/src/pages/health/StatisticsDashboard/OperatorDashboard.tsx
+++ b/apps/web/src/pages/health/StatisticsDashboard/OperatorDashboard.tsx
@@ -10,6 +10,9 @@ import { useCountUp } from '../../../hooks/useCountUp';
export function OperatorDashboard() {
const { pointsStats, loading } = useStatsData();
+ const issuedCount = useCountUp(pointsStats?.total_issued ?? 0);
+ const spentCount = useCountUp(pointsStats?.total_spent ?? 0);
+ const activeCount = useCountUp(pointsStats?.active_accounts ?? 0);
if (loading && !pointsStats) return ;
@@ -25,12 +28,12 @@ export function OperatorDashboard() {
- } />
+ } />
- }
+ }
suffix={pointsStats ? (
消费率{pointsStats.total_issued > 0 ? Math.round(pointsStats.total_spent / pointsStats.total_issued * 100) : 0}%
@@ -41,7 +44,7 @@ export function OperatorDashboard() {
- } />
+ } />