diff --git a/apps/web/src/index.css b/apps/web/src/index.css index e305121..77b38c1 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -38,7 +38,7 @@ /* Text Colors — Deep navy */ --erp-text-primary: #0f172a; --erp-text-secondary: #475569; - --erp-text-tertiary: #94a3b8; + --erp-text-tertiary: #64748b; --erp-text-inverse: #ffffff; --erp-text-sidebar: #475569; --erp-text-sidebar-active: #2563eb; @@ -273,7 +273,7 @@ --login-form-bg: #ffffff; --login-form-text: #0f172a; --login-form-text-secondary: #475569; - --login-input-icon-color: #94a3b8; + --login-input-icon-color: #64748b; } [data-theme='warm'] { diff --git a/apps/web/src/pages/PluginCRUDPage/usePluginData.ts b/apps/web/src/pages/PluginCRUDPage/usePluginData.ts index 221f77d..d446998 100644 --- a/apps/web/src/pages/PluginCRUDPage/usePluginData.ts +++ b/apps/web/src/pages/PluginCRUDPage/usePluginData.ts @@ -155,6 +155,7 @@ export function usePluginData( ); useEffect(() => { + // eslint-disable-next-line react-hooks/set-state-in-effect fetchData(); }, [fetchData]); @@ -179,7 +180,7 @@ export function usePluginData( setResolvedLabels(result.labels); setLabelMeta(result.meta as Record); }) - .catch(() => {}); + .catch((err) => console.warn('[usePluginData] 获取标签元数据失败:', err)); }, [records, fields, pluginId, entityName]); const handleFilterChange = (fieldName: string, value: string | undefined) => { diff --git a/apps/web/src/pages/PluginDashboardPage.tsx b/apps/web/src/pages/PluginDashboardPage.tsx index bcd18d3..f344a3b 100644 --- a/apps/web/src/pages/PluginDashboardPage.tsx +++ b/apps/web/src/pages/PluginDashboardPage.tsx @@ -251,7 +251,7 @@ export function PluginDashboardPage() { }, [pluginId, selectedEntity, filterableFields, entityStats]); useEffect(() => { const cleanup = loadData(); - return () => { cleanup?.then((fn) => fn?.()).catch(() => {}); }; + return () => { cleanup?.then((fn) => fn?.()).catch((err) => console.warn('[PluginDashboard] 清理失败:', err)); }; }, [loadData]); // 当前选中实体的总数 const currentTotal = useMemo( diff --git a/apps/web/src/pages/health/AppointmentList.tsx b/apps/web/src/pages/health/AppointmentList.tsx index a4caa5a..fcf1bec 100644 --- a/apps/web/src/pages/health/AppointmentList.tsx +++ b/apps/web/src/pages/health/AppointmentList.tsx @@ -109,9 +109,11 @@ export default function AppointmentList() { status: filters.status || undefined, date: dateStart === dateEnd ? dateStart : undefined, patient_id: urlPatientId || undefined, + search: filters.patientSearch || undefined, + appointment_type: filters.appointmentType || undefined, }); }, - [], + [urlPatientId], ); const { @@ -218,6 +220,7 @@ export default function AppointmentList() { // 排班校验:医生 + 日期选定后查询排班 useEffect(() => { if (!selectedDoctorId || !selectedDate || !drawerOpen) { + // eslint-disable-next-line react-hooks/set-state-in-effect setScheduleHint(null); return; } diff --git a/apps/web/src/pages/health/ArticleManageList.tsx b/apps/web/src/pages/health/ArticleManageList.tsx index 6048404..807136b 100644 --- a/apps/web/src/pages/health/ArticleManageList.tsx +++ b/apps/web/src/pages/health/ArticleManageList.tsx @@ -116,7 +116,7 @@ export default function ArticleManageList() { useEffect(() => { articleCategoryApi.list() .then((cats) => setCategories(cats.map((c) => ({ id: c.id, name: c.name })))) - .catch(() => {}); + .catch((err) => console.warn('[ArticleManageList] 获取文章分类失败:', err)); }, []); const handleDelete = async (id: string, version: number) => { diff --git a/apps/web/src/pages/health/DialysisManageList.tsx b/apps/web/src/pages/health/DialysisManageList.tsx index 4a2c63a..73ec138 100644 --- a/apps/web/src/pages/health/DialysisManageList.tsx +++ b/apps/web/src/pages/health/DialysisManageList.tsx @@ -46,7 +46,7 @@ export default function DialysisManageList() { if (urlPatientId) { patientApi.get(urlPatientId).then((p) => { if (p) setPatientOptions([{ id: p.id, name: p.name }]); - }).catch(() => {}); + }).catch((err) => console.warn('[DialysisManageList] 获取患者信息失败:', err)); } }, [urlPatientId]); diff --git a/apps/web/src/pages/health/components/workbench/AdminDashboard.tsx b/apps/web/src/pages/health/components/workbench/AdminDashboard.tsx index 26a7008..3c3c50d 100644 --- a/apps/web/src/pages/health/components/workbench/AdminDashboard.tsx +++ b/apps/web/src/pages/health/components/workbench/AdminDashboard.tsx @@ -271,7 +271,7 @@ export default function AdminDashboard() { statsData.patientStats?.total_patients ?? 0, pct: 100, - color: "#94A3B8", + color: "#64748B", }, ]; @@ -294,7 +294,7 @@ export default function AdminDashboard() { gap: 12, marginBottom: 20, padding: "14px 20px", - background: "#fff", + background: "var(--erp-bg-container, #fff)", borderRadius: 12, border: "1px solid #E2E8F0", }} @@ -348,7 +348,7 @@ export default function AdminDashboard() {
-
+
{card.label}
{card.value}
-
+
{card.sub}
@@ -384,7 +384,7 @@ export default function AdminDashboard() { {/* 最近审计日志 */}
@@ -488,7 +488,7 @@ export default function AdminDashboard() { {actionLabel}了{resourceLabel} {formatTimeAgo(log.created_at)} @@ -501,7 +501,7 @@ export default function AdminDashboard() { {/* 模块状态 */}
{mod.display_name}
-
+
{mod.description}
@@ -550,7 +550,7 @@ export default function AdminDashboard() { borderRadius: 10, fontWeight: 500, background: mod.active ? "#F0FDF4" : "#F1F5F9", - color: mod.active ? "#16A34A" : "#94A3B8", + color: mod.active ? "#16A34A" : "#64748B", }} > {mod.active ? "运行中" : "未启用"} @@ -565,7 +565,7 @@ export default function AdminDashboard() { {/* 用户活跃度 */}
{item.value} @@ -642,13 +642,13 @@ export default function AdminDashboard() { justifyContent: "space-between", }} > -
按角色分布
+
按角色分布
{userActivity?.by_role.map((r) => ( {r.role} {r.count} - )) ?? 加载中...} + )) ?? 加载中...}
@@ -656,7 +656,7 @@ export default function AdminDashboard() { {/* 快捷管理入口 */}