From 4d8658ae982936a7d9ab1fca29ae7ab4ba5d32ca Mon Sep 17 00:00:00 2001 From: iven Date: Thu, 21 May 2026 08:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(health+web):=20action-inbox=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=BB=91=E5=AE=9A=E4=BF=AE=E5=A4=8D=20+=20antd=20?= =?UTF-8?q?=E5=BC=83=E7=94=A8=E8=AD=A6=E5=91=8A=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - action_inbox_service: count_sql 补齐 $4/$5 占位符,修复参数绑定数不匹配导致 500 - AiSidebar: Drawer width → size(antd v5 弃用替换) - 6 个页面 Statistic: valueStyle → styles.content(antd v5 弃用替换) - RealtimeMonitor: 移除未使用的 _alerts 变量 --- apps/web/src/components/ai/AiSidebar.tsx | 2 +- .../web/src/pages/health/AiUsageDashboard.tsx | 12 +++---- apps/web/src/pages/health/AlertDashboard.tsx | 8 ++--- apps/web/src/pages/health/RealtimeMonitor.tsx | 10 +++--- .../StatisticsDashboard/DoctorDashboard.tsx | 4 +-- .../StatisticsDashboard/HealthDataCenter.tsx | 34 +++++++++---------- .../StatisticsDashboard/NurseDashboard.tsx | 2 +- .../src/service/action_inbox_service.rs | 2 ++ crates/erp-server/migration/src/lib.rs | 2 ++ 9 files changed, 40 insertions(+), 36 deletions(-) diff --git a/apps/web/src/components/ai/AiSidebar.tsx b/apps/web/src/components/ai/AiSidebar.tsx index 9a28bc4..006bde1 100644 --- a/apps/web/src/components/ai/AiSidebar.tsx +++ b/apps/web/src/components/ai/AiSidebar.tsx @@ -200,7 +200,7 @@ export default function AiSidebar({ } placement="right" - width={400} + size={400} open={open} onClose={onClose} styles={{ diff --git a/apps/web/src/pages/health/AiUsageDashboard.tsx b/apps/web/src/pages/health/AiUsageDashboard.tsx index 0663d28..c297963 100644 --- a/apps/web/src/pages/health/AiUsageDashboard.tsx +++ b/apps/web/src/pages/health/AiUsageDashboard.tsx @@ -155,7 +155,7 @@ export default function AiUsageDashboard() { title="总分析次数" value={overview?.total_count ?? 0} prefix={} - valueStyle={{ fontWeight: 600 }} + styles={{ content: { fontWeight: 600 } }} /> @@ -165,7 +165,7 @@ export default function AiUsageDashboard() { title="分析类型数" value={types.length} prefix={} - valueStyle={{ fontWeight: 600 }} + styles={{ content: { fontWeight: 600 } }} /> @@ -175,7 +175,7 @@ export default function AiUsageDashboard() { title="本月分析" value={totalCount} prefix={} - valueStyle={{ fontWeight: 600 }} + styles={{ content: { fontWeight: 600 } }} /> @@ -229,7 +229,7 @@ export default function AiUsageDashboard() { @@ -238,7 +238,7 @@ export default function AiUsageDashboard() { @@ -248,7 +248,7 @@ export default function AiUsageDashboard() { title="30 天成本" value={(totalCost / 100).toFixed(2)} prefix="¥" - valueStyle={{ fontWeight: 600 }} + styles={{ content: { fontWeight: 600 } }} /> diff --git a/apps/web/src/pages/health/AlertDashboard.tsx b/apps/web/src/pages/health/AlertDashboard.tsx index 0317ddf..b5c226b 100644 --- a/apps/web/src/pages/health/AlertDashboard.tsx +++ b/apps/web/src/pages/health/AlertDashboard.tsx @@ -196,7 +196,7 @@ export default function AlertDashboard() { title="待处理" value={pendingCount} prefix={} - valueStyle={{ color: pendingCount > 0 ? "#fa8c16" : undefined }} + styles={{ content: { color: pendingCount > 0 ? "#fa8c16" : undefined } }} /> @@ -206,7 +206,7 @@ export default function AlertDashboard() { title="已确认" value={acknowledgedCount} prefix={} - valueStyle={{ color: "#1890ff" }} + styles={{ content: { color: "#1890ff" } }} /> @@ -216,8 +216,8 @@ export default function AlertDashboard() { title="危急值" value={criticalCount} prefix={} - valueStyle={{ - color: criticalCount > 0 ? "#ff4d4f" : undefined, + styles={{ + content: { color: criticalCount > 0 ? "#ff4d4f" : undefined }, }} /> diff --git a/apps/web/src/pages/health/RealtimeMonitor.tsx b/apps/web/src/pages/health/RealtimeMonitor.tsx index 43bc68f..67589de 100644 --- a/apps/web/src/pages/health/RealtimeMonitor.tsx +++ b/apps/web/src/pages/health/RealtimeMonitor.tsx @@ -22,7 +22,7 @@ interface PatientAlertSummary { */ export default function RealtimeMonitor() { const { hasPermission } = usePermission('health.alerts.list'); - const [_alerts, setAlerts] = useState([]); + const [, setAlerts] = useState([]); const [loading, setLoading] = useState(true); const [selectedPatientId, setSelectedPatientId] = useState(null); const [alertSummary, setAlertSummary] = useState([]); @@ -94,10 +94,10 @@ export default function RealtimeMonitor() { } > - } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> diff --git a/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx index aba0e20..8a94e3d 100644 --- a/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx +++ b/apps/web/src/pages/health/StatisticsDashboard/DoctorDashboard.tsx @@ -158,7 +158,7 @@ export function DoctorDashboard() { precision={0} suffix="%" prefix={} - valueStyle={{ color: (p?.follow_up_rate ?? 0) >= 80 ? '#3f8600' : '#cf1322' }} + styles={{ content: { color: (p?.follow_up_rate ?? 0) >= 80 ? '#3f8600' : '#cf1322' } }} /> @@ -184,7 +184,7 @@ export function DoctorDashboard() { precision={0} suffix="%" prefix={} - valueStyle={{ color: (p?.vital_signs_report_rate ?? 0) >= 70 ? '#3f8600' : '#cf1322' }} + styles={{ content: { color: (p?.vital_signs_report_rate ?? 0) >= 70 ? '#3f8600' : '#cf1322' } }} /> diff --git a/apps/web/src/pages/health/StatisticsDashboard/HealthDataCenter.tsx b/apps/web/src/pages/health/StatisticsDashboard/HealthDataCenter.tsx index a9f025e..914a880 100644 --- a/apps/web/src/pages/health/StatisticsDashboard/HealthDataCenter.tsx +++ b/apps/web/src/pages/health/StatisticsDashboard/HealthDataCenter.tsx @@ -13,14 +13,14 @@ function DialysisPanel({ data }: { data: DialysisStatistics | null | undefined } return ( 透析记录} style={{ borderRadius: 8 }}> - - - + + + - - - + + + {(data?.type_distribution ?? []).length > 0 && (
@@ -38,13 +38,13 @@ function LabPanel({ data }: { data: HealthDataStats | null }) { return ( 化验报告} style={{ borderRadius: 8 }}> - - - + + + - - + + {(data?.lab_reports.type_distribution ?? []).length > 0 && (
@@ -62,9 +62,9 @@ function AppointmentsPanel({ data }: { data: HealthDataStats | null }) { return ( 预约统计} style={{ borderRadius: 8 }}> - - - + + + {(data?.appointments.status_distribution ?? []).length > 0 && (
@@ -82,9 +82,9 @@ function VitalSignsPanel({ data }: { data: HealthDataStats | null }) { return ( 体征上报率} style={{ borderRadius: 8 }}> - - - + + + {(data?.vital_signs_report_rate.daily_trend ?? []).length > 0 && (
diff --git a/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx b/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx index 3ed01fe..c0b9cb4 100644 --- a/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx +++ b/apps/web/src/pages/health/StatisticsDashboard/NurseDashboard.tsx @@ -137,7 +137,7 @@ export function NurseDashboard() { } - valueStyle={{ color: (p?.overdue_follow_ups ?? 0) > 0 ? '#cf1322' : undefined }} + styles={{ content: { color: (p?.overdue_follow_ups ?? 0) > 0 ? '#cf1322' : undefined } }} /> diff --git a/crates/erp-health/src/service/action_inbox_service.rs b/crates/erp-health/src/service/action_inbox_service.rs index dfdb46d..8ae0e6a 100644 --- a/crates/erp-health/src/service/action_inbox_service.rs +++ b/crates/erp-health/src/service/action_inbox_service.rs @@ -423,6 +423,8 @@ pub async fn list_action_items( tenant_id.into(), patient_val, assigned_val, + (page_size as i64).into(), + (offset as i64).into(), sug_val, alert_val, fu_val, diff --git a/crates/erp-server/migration/src/lib.rs b/crates/erp-server/migration/src/lib.rs index 01c4e65..1069b21 100644 --- a/crates/erp-server/migration/src/lib.rs +++ b/crates/erp-server/migration/src/lib.rs @@ -165,6 +165,7 @@ mod m20260521_000160_follow_up_task_template_id_and_record_form_data; mod m20260521_000161_consultation_media_id_and_suggestion_references; mod m20260521_000162_consultation_session_rating_feedback; mod m20260521_000163_reorganize_menus_by_business_flow; +mod m20260521_000164_reorganize_menus_scheme_b; pub struct Migrator; @@ -337,6 +338,7 @@ impl MigratorTrait for Migrator { Box::new(m20260521_000161_consultation_media_id_and_suggestion_references::Migration), Box::new(m20260521_000162_consultation_session_rating_feedback::Migration), Box::new(m20260521_000163_reorganize_menus_by_business_flow::Migration), + Box::new(m20260521_000164_reorganize_menus_scheme_b::Migration), ] } }