iven
|
ae1c9ccc77
|
feat(web): Login/MainLayout 从主题配置读取品牌信息
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- Login.tsx 从 /api/v1/public/brand 读取品牌名称/标语/特性/版权
- MainLayout 侧边栏 Logo 和 Footer 从 themeConfig 读取
- 启动时调用 loadThemeConfig 缓存主题配置
- 移除所有硬编码品牌文字(HMR Platform → 动态读取)
|
2026-05-01 17:39:21 +08:00 |
|
iven
|
669ca44360
|
feat(web): 主题设置联动 — 扩展 ThemeConfig 品牌字段 + 设置页面表单
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- ThemeConfig 接口增加 brand_name/brand_slogan/brand_features/brand_copyright
- 新增 BrandConfig 接口和 getPublicBrand 公开品牌信息获取
- app store 增加 themeConfig 缓存和 loadThemeConfig 方法
- ThemeSettings 页面增加品牌设置表单(品牌名称/标语/特性/版权)
|
2026-05-01 17:37:10 +08:00 |
|
iven
|
6d66a392db
|
feat(web): NotificationPanel 增加待办预览区域
- 底部新增"待办事项"区域,显示最近 3 条 pending 行动项
- 角标数字改为 unreadCount + pendingActionCount
- 点击待办项跳转 /health/action-inbox
|
2026-05-01 16:37:29 +08:00 |
|
iven
|
81dd3d2bda
|
feat(web): 行动收件箱前端 — API + Drawer + 列表页 + 路由
- actionInbox.ts: API 调用层,list + getThread
- ActionThreadDrawer: 上下文线程抽屉,时间线 + 操作按钮
- ActionInbox: 列表页,Tabs 筛选 + 分页 + 点击打开 Drawer
- App.tsx: 注册 /health/action-inbox 路由
|
2026-05-01 16:36:24 +08:00 |
|
iven
|
3cba699ca0
|
fix(web): 修复 AiAnalysisList JSX 嵌套结构 — SuggestionPanel 容器层级
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
|
2026-05-01 10:48:14 +08:00 |
|
iven
|
598c06885f
|
feat(web): 患者 AI 建议标签页 — 待审批建议列表+审批操作
- 新增 AiSuggestionTab 组件(风险等级+类型+状态+审批按钮)
- PatientDetail 添加「AI 建议」标签页
- 复用 suggestions API 层
|
2026-05-01 09:19:50 +08:00 |
|
iven
|
92c1c3c17d
|
feat(web): AI 分析详情增加建议面板 — 风险等级+建议列表+审批操作
- 新增 suggestions API 层(list/approve/getComparison)
- 展开分析详情时自动加载关联的 AI 建议列表
- 风险等级彩色标签(低/中/高)
- 建议类型、原因、执行状态展示
- 待审批建议支持批准/拒绝操作
|
2026-05-01 09:17:18 +08:00 |
|
iven
|
8f9895be98
|
fix(web): SSE 连接添加指数退避重连策略
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
useAlertSSE hook 和 message store 的 connectSSE 均改为手动重连:
1s→2s→4s→8s→16s→30s(cap),最大重试 10 次,随机 jitter 0.5-1.0x。
替代浏览器原生 EventSource 固定 ~3s 重连,避免服务端压力。
|
2026-04-30 22:30:47 +08:00 |
|
iven
|
84fafb0bc5
|
fix(web+health): 修复咨询轮询 temp ID 400 + 健康数据统计 500
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- ConsultationDetail: 轮询取 lastId 时过滤 temp_ 前缀的乐观消息 ID,
避免将非法 UUID 传给 after_id 参数导致后端 400
- stats_service: count_abnormal_lab_items 和 compute_daily_report_rate
中 SQL 字面量 0 类型为 INT4,与 Rust i64 (INT8) 不匹配,
改为 0::bigint 确保类型兼容
|
2026-04-30 12:27:56 +08:00 |
|
iven
|
1bebb57765
|
fix(web): 移除 ConsultationDetail 残留的 sender_id/sender_role 字段
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
前端发送消息时不再提交 sender_id 和 sender_role,
这些字段由后端从 JWT 上下文自动填充。
|
2026-04-30 11:34:20 +08:00 |
|
iven
|
931edc3025
|
fix(security): 补全 XSS sanitize + 修复 sender_id 身份伪造
安全审计修复:
- 补全 6 个 DTO 的 sanitize 方法(diagnosis/consent/alert/medication_record/medication_reminder/follow_up_template)
- 4 个 handler 添加 .sanitize() 调用(diagnosis/consent/alert_rule/medication_record)
- 修复咨询消息 sender_id/sender_role 从客户端提交改为服务端从 JWT 提取
- 修复小程序 AI 报告 markdownToHtml XSS(添加 sanitizeHtml 过滤)
|
2026-04-30 10:21:52 +08:00 |
|
iven
|
d8735eb45c
|
fix(test+web): 修复测试编译错误 + 前端构建问题
- 修复透析集成测试 TestApp.dialysis_state() 返回类型不匹配(39个错误)
- 修复 erp-core test_helpers SeaORM Database::connect API 变更
- 修复 health_alert/article/data 集成测试函数签名不匹配
- 修复 DailyMonitoringTab 缺失 Input import
- 修复 DeviceReadingsTab 未使用接口声明
- 修复 DialysisManageList keyword → search 参数名
|
2026-04-30 10:21:05 +08:00 |
|
iven
|
d2dfac82e3
|
refactor(web): 移除 4 个未使用的 API 函数 — exportSessions/generateTrend/assignDoctor/removeDoctor
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
|
2026-04-30 08:34:35 +08:00 |
|
iven
|
26a9781d4f
|
feat(health): 药物提醒后端 API + 后台任务统一 + dead code 清理
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
P1-3: medication_reminder 全栈实现
- migration 000096: 创建 medication_reminder 表(含患者关联/提醒时间/频率)
- entity + dto + service + handler: 完整 CRUD(乐观锁/软删除/审计日志)
- 路由注册: GET /patients/{id}/medication-reminders, POST/PUT/DELETE
- HealthError 新增 MedicationReminderNotFound
P2-4: 后台任务启动统一
- appointment_reminder 迁移到 HealthModule::on_startup()(启动时立即执行 + 周期循环)
- 删除 main.rs 中重复的 overdue_checker/points_expiration/appointment_reminder 调用
- 所有 Health 后台任务现由模块 on_startup 统一管理
P2-5: Web dead code 清理
- 删除 healthData.ts 中 getMiniTrend/getMiniToday(小程序专用端点,Web 无调用)
- 删除 patients.ts 中 getHealthSummary(标记 TODO 未使用)
|
2026-04-30 07:18:22 +08:00 |
|
iven
|
facc8b0d24
|
refactor(dialysis+health): 透析统计从 erp-health 迁移到 erp-dialysis,消除跨 crate 残留
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- erp-dialysis: 新建 dialysis_stats_dto/handler/service,注册 /health/admin/statistics/dialysis 路由
- erp-health: 删除 get_dialysis_statistics 及 helper、DialysisStatisticsResp、
DialysisRecordNotFound/DialysisPrescriptionNotFound、validate_dialysis_status* 及 9 个测试、
DoctorDashboard.pending_dialysis_review、module 路由
- Web: HealthDataStats 移除 dialysis 字段,新增 getDialysisStats() 独立 API,
useStatsData 并行 fetch,HealthDataCenter 接受独立 dialysisData prop
- 小程序: DoctorDashboard 移除 pending_dialysis_review,医护工作台移除"待审透析"卡片
|
2026-04-29 07:56:21 +08:00 |
|
iven
|
9015a2b85e
|
feat(web): 登录页主题适配 + 工作台角色化重构
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 登录页接入 4 套主题系统(渐变色/面板背景/文字色),添加 ThemeSwitcher
- 工作台按角色(医生/护士/管理员/运营)显示专属统计卡片和快捷入口
- 移除系统信息填充卡片,硬编码颜色替换为 CSS 变量
|
2026-04-29 07:27:04 +08:00 |
|
iven
|
cac61637ce
|
feat(health): Web 管理端设备数据集成补全 — Phase 2
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增告警三页面(仪表盘/列表/规则)+ 设备管理菜单种子数据
- 新增设备管理后端 API(GET /devices + DELETE /devices/{id})
- 新增设备数据查看组件 DeviceReadingsTab(原始数据 + 小时聚合)
- 新增设备管理页面 DeviceManage(列表/筛选/解绑)
- 患者详情页新增设备数据 Tab
|
2026-04-29 06:28:30 +08:00 |
|
iven
|
a491eb19a6
|
fix(web+health): E2E flow 测试全面修复 — 15/15 通过
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- test-data: 接口对齐后端 DTO(VitalSigns/AlertRule/Schedule/FollowUp)
- api-client: 增强 HTTP 错误处理(parseJson 统一防护非 JSON 响应)
- auth.fixture: 每个测试获取新 token,避免共享 token 过期
- patient-detail: tab 名称修正为 '健康数据' → '体征数据'
- patient-list: DrawerForm 选择器适配(无 phone 字段、保存按钮在 extra)
- vital-signs-flow: API 录入 + 页面验证,避免复杂 DatePicker 交互
- alert-flow: 简化为规则 CRUD + 页面导航,condition_params 对齐后端格式
- follow-up-template handler: 权限码从 health.follow-up-template.* 修正为 health.follow-up.*
- playwright.config: workers=1 串行执行避免并发登录
- check-readiness: 健康端点路径修正为 /api/v1/health
|
2026-04-29 06:04:22 +08:00 |
|
iven
|
c6e8048bc5
|
test(web+mp): E2E 测试全量实施 — Web 5 flow + MP 4 flow + 基础设施
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
Web 端 (Playwright):
- fixtures: test-data 工厂 + API Client (乐观锁 version) + 增强 auth fixture
- pages: LoginPage, PatientListPage, PatientDetailPage, HealthDataPage, AppointmentPage
- flows: 患者全流程, 体征数据链路, 预约排班链路, 随访管理链路, 告警处理链路
- smoke tests 迁移到 smoke/ 目录,import 路径更新
- playwright.config.ts 更新: globalSetup 环境检查, 60s timeout, video retain
小程序端 (Vitest + miniprogram-automator):
- helpers: AutomatorClient, MpApiClient, MpAuthHelper, MpNavigator
- flows: 患者健康数据查看, 体征数据录入, 积分签到兑换, 积分商城浏览
- vitest.config.ts + check-readiness.ts
- vitest 4.1.5 依赖安装
Playwright 发现 15 个测试 (5 flow + 10 smoke),全部就绪
|
2026-04-29 04:58:01 +08:00 |
|
iven
|
1bde4b44c0
|
fix(web): VitalSignsChart hooks 顺序修复 + 趋势线颜色区分度优化
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
修复 React hooks 在 early return 之后调用导致的渲染崩溃,
将所有 useMemo 移至条件返回之前。趋势图三系列改用高对比色:
实际值(原色实线)、移动平均(青色短虚线)、趋势线(琥珀色长虚线)。
|
2026-04-28 22:10:13 +08:00 |
|
iven
|
f99892ee16
|
feat(web+mp): AI 分析结果增强展示
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
Web 端 AiAnalysisList:
- 分析结果 Markdown 风格渲染(标题/列表/粗体/代码)
- 趋势分析类型显示统计方法提示
- 自动分析结果显示「系统自动分析」标签
小程序 ai-report/detail:
- 新增 result_metadata 字段
- 自动分析标记(紫色标签)
- 趋势分析统计方法说明卡片
|
2026-04-28 20:12:34 +08:00 |
|
iven
|
1cf5f59d8c
|
feat(web): VitalSignsChart 集成趋势线 + 移动平均 + 异常标注
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
增强 VitalSignsChart 组件:
- 线性回归趋势线(虚线显示,斜率/R² 统计)
- 移动平均线(自适应窗口,平滑实线)
- 异常点检测(2倍标准差,红色标记)
- 概览卡片显示趋势方向箭头和异常警告图标
- 详情图下方图例说明各系列含义
|
2026-04-28 20:05:43 +08:00 |
|
iven
|
493b479373
|
feat(web): DoctorDashboard 集成告警摘要卡片
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
在医生工作台新增待处理告警摘要区域,展示最近 5 条
pending 状态告警,点击「查看全部」跳转告警仪表盘。
|
2026-04-28 20:01:11 +08:00 |
|
iven
|
27c32e5561
|
feat(web): 实时告警仪表盘页面 + SSE Hook + 告警详情面板
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增 AlertDashboard 页面:实时告警列表 + 统计摘要 + 详情面板
- 新增 useAlertSSE Hook:封装 SSE 连接、自动重连、事件分发
- 新增 AlertDetailPanel 组件:告警详情展示 + 确认/忽略/恢复操作
- alertApi.list 添加 doctor_id 参数支持
- 注册 /health/alert-dashboard 路由 + 面包屑映射
|
2026-04-28 19:59:51 +08:00 |
|
iven
|
e5546efa41
|
refactor(web): alerts + deviceReadings API 迁移为对象风格导出
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- alerts.ts: listAlerts → alertApi.list, acknowledgeAlert → alertApi.acknowledge 等
- deviceReadings.ts: batchCreateReadings → deviceReadingApi.batchCreate 等
- AlertList/AlertRuleList 引用处同步更新
- 其余 19 个函数式 API 文件记为待迁移(旧文件不强制迁移)
|
2026-04-28 19:47:48 +08:00 |
|
iven
|
99093d8143
|
refactor(web): 16 个列表页 columns 定义 useMemo 化 — 减少 Table 不必要 re-render
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- AiPromptList/AiAnalysisList/AppointmentList 等 14 个主页面
- HealthRecordsTab/LabReportsTab 2 个 Tab 组件
- 每个 columns 依赖数组包含其引用的闭包变量(handleDelete/navigate 等)
|
2026-04-28 19:45:14 +08:00 |
|
iven
|
e7b2e6382a
|
chore(web): 降低 chunkSizeWarningLimit 从 600 至 500
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
|
2026-04-28 19:28:37 +08:00 |
|
iven
|
679d83d3b6
|
refactor(web): 迁移 3 个健康页面错误处理到 useApiRequest — 消除内联 catch/message.error
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- PatientList: handleCreateOrEdit/handleDelete/openEditModal 使用 execute
- AppointmentList: handleStatusChange(2处)/handleSubmit 使用 execute
- FollowUpTaskList: handleCreate/handleRecordSubmit/handleAssign/handleDelete 使用 execute
- 移除不再需要的 message 导入(PatientList/FollowUpTaskList)
|
2026-04-28 19:24:07 +08:00 |
|
iven
|
147fd886e3
|
feat(plugin): 评估量表 WASM 编译通过 — 170KB cdylib 组件
- wasm32-unknown-unknown target 编译成功
- 插件通过 API upload/install 注册,无需手动配置
|
2026-04-28 12:13:52 +08:00 |
|
iven
|
92486cad8e
|
fix(web): 修复仪表盘 hooks 顺序 + 患者 DatePicker 初始值
CI / frontend-build (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- AdminDashboard/OperatorDashboard/DoctorDashboard/NurseDashboard:
将 useCountUp 调用从 JSX 中提取到组件顶层,避免条件提前返回
导致 hooks 数量不一致引发 React crash
- PatientList: 编辑时 birth_date 字符串转 dayjs 对象,修复
Ant Design 6 DatePicker getUDayjs().isValid() 报错
|
2026-04-28 09:08:26 +08:00 |
|
iven
|
24c7f9451f
|
feat(web): 表单升级 — Modal→DrawerForm + 分组双列布局
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
4 个表单从 Modal 升级为 DrawerForm:
- 患者表单:4 分组(基本信息/联系方式/医疗信息/紧急联系人),编辑时获取完整详情
- 预约表单:3 分组(患者信息/医生与排班/备注),保留排班校验逻辑
- 随访填写:2 分组(执行信息/详细记录),DrawerForm 内部校验
- 积分商品:2 分组(基本信息/展示设置)
统一使用 DrawerForm 组件管理表单实例、校验和提交
|
2026-04-28 08:40:22 +08:00 |
|
iven
|
1e7a5f5498
|
refactor(web): 列表页统一迁移 — PageContainer + usePaginatedData + 格式化规范
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
8 个列表页迁移至统一模式:
- PatientList / DoctorList / AppointmentList / FollowUpTaskList
- ConsultationList / AlertList / ArticleManageList
- PointsRuleList / PointsProductList / PointsOrderList
统一使用:
- PageContainer 组件(标题/筛选/操作/暗色模式)
- usePaginatedData hook(分页/筛选/搜索)
- EntityName 组件(UUID→姓名兜底)
- 共享 formatDateTime/formatDate/formatRelative
- 移除手动 isDark 暗色模式处理
|
2026-04-28 08:17:55 +08:00 |
|
iven
|
2f42ebff1d
|
feat: 仪表盘角色自适应重构 — 4角色视图 + 后端个人工作量API
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
后端:
- 新增 GET /health/admin/statistics/personal-stats 接口
- PersonalStatsResp: 13个个人维度统计字段
- 按医生/护士/管理员/运营角色聚合工作量数据
前端:
- useDashboardRole hook: 按优先级 doctor>nurse>admin>operator 匹配角色
- DoctorDashboard: 今日工作台(日程/审核/消息/统计卡)
- NurseDashboard: 随访监控台(异常提醒/队列/上报率)
- AdminDashboard: 管理中心(5KPI + 健康数据Tab)
- OperatorDashboard: 运营中心(积分/文章/活动)
- StatisticsDashboard.tsx 重写为角色路由组件
- 删除旧区块:快捷入口/积分排行Top10/最近活动
|
2026-04-28 07:54:08 +08:00 |
|
iven
|
4cfbdec5fc
|
refactor(web): 统一 dayjs 导入为集中初始化 — 11 个文件
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
所有 health 页面从 import dayjs from 'dayjs' 迁移到
import { dayjs } from '.../utils/dayjs',确保 relativeTime
和 zh-cn locale 全局生效。
|
2026-04-28 01:47:13 +08:00 |
|
iven
|
5b47f13ecf
|
feat(web): 提取共享基础组件 — dayjs/format/EntityName/FilterBar/PageContainer/DrawerForm
- utils/dayjs.ts: 集中初始化 relativeTime 插件 + zh-cn locale
- utils/format.ts: formatDate/formatDateTime/formatRelative/calcAge
- components/EntityName.tsx: UUID→姓名兜底显示
- components/FilterBar.tsx: 统一筛选栏容器
- components/PageContainer.tsx: 统一页面容器(标题+筛选+表格+暗色模式)
- components/DrawerForm.tsx: 抽屉式表单容器(分组+双列网格)
- AlertList.tsx: 迁移到集中 dayjs 导入
|
2026-04-28 01:45:48 +08:00 |
|
iven
|
9dd6095e77
|
fix: P0/P1 安全与质量缺陷修复 — 10 项 QA 审查问题解决
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
P0 安全修复:
- tenant_rls: SQL 拼接改为参数化查询防止注入
- follow_up_service: UUID SQL 拼接改为参数化原生查询
- RLS 策略: 新迁移移除空字符串绕过条件
- SSE 消息推送: token 键名 'token' → 'access_token' 修复
- rate_limit: 登录端点 Redis 不可达时 fail-close
P1 质量修复:
- 小程序缓存清理: preservedKeys 补全认证键名
- 小程序 token 刷新: 失败时清除所有认证数据
- 小程序 401: redirectTo → reLaunch 兼容 tabBar
- 集成测试: 信号量限制并行数据库创建(4个)
- change_password: 乐观锁 version 硬编码 → 动态递增
测试: 516 全部通过 (含 153 集成测试)
|
2026-04-28 00:57:41 +08:00 |
|
iven
|
3d34e021a9
|
chore: 清理 git 缓存 — 移除 .logs/ brainstorm/ playwright-report/
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
这些文件已在 .gitignore 中,从 git 追踪中移除。
|
2026-04-28 00:21:00 +08:00 |
|
iven
|
e56cd73e49
|
feat(web): 多主题系统 — 4 套主题 + CSS 变量 + Ant Design 动态主题
- CSS 变量层: :root 默认 blue, [data-theme] 覆盖 warm/dark/emerald
- Ant Design: ConfigProvider 按 ThemeName 切换 token + algorithm
- ThemeSwitcher: 下拉面板含 4 主题色块预览 + localStorage 持久化
- useThemeMode: 从 store 读取主题名替代色值比对(修复 33 页面暗色失效)
- index.html: 添加 Noto Serif SC 字体(warm 主题衬线标题)
|
2026-04-28 00:20:02 +08:00 |
|
iven
|
3177a704ff
|
test(web): exprEvaluator + useDebouncedValue 单元测试 — 24 个用例
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
exprEvaluator(19): 等值/不等/AND/OR/NOT/括号/短路运算/
missing field/type coercion/visibleWhen 便捷函数。
useDebouncedValue(5): 初始值/防抖/快速更新重置/自定义延迟/数值类型。
|
2026-04-27 23:24:25 +08:00 |
|
iven
|
c53f5625bc
|
fix(web,miniprogram): 端到端测试修复 + 小程序接口字段对齐
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
## 前端修复
- 修复 9 个 TypeScript 编译错误(未使用变量/undefined 守卫/vitest 类型)
- 重写 E2E auth fixture 使用真实 API 登录替代 mock token
- 更新 E2E 测试选择器适配当前 UI 布局
- Playwright 改为串行执行避免 token 唯一约束冲突
- E2E 测试从 0/10 通过提升到 10/10 通过
## 小程序接口一致性修复(P0-P3)
- P0: consultation.ts type→consultation_type, unread_count→unread_count_patient
- P0: followup.ts task_type→follow_up_type, due_date→planned_date, description→content_template
- P1: appointment.ts calendarView 展平嵌套结构, available_count 计算 max-current
- P1: doctor.ts HealthSummary 适配后台实际返回结构
- P2: doctor.ts PatientStats/ConsultationStats/FollowUpStats 字段名对齐
- P3: article.ts 新增 buildCategoryTree 工具函数
|
2026-04-27 22:09:21 +08:00 |
|
iven
|
6997bb1d90
|
test: Phase 0 测试基础设施 — TestApp + MSW + 覆盖率工具 + CI
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- TestApp struct 封装 TestDb + HealthState + tenant_id/operator_id
- TestFixture 工厂方法: create_patient/create_doctor/create_schedule/create_appointment
- 前端 MSW v2 handlers (auth) + server setup + vitest 集成
- vitest coverage v8 配置 + test:coverage script
- GitHub Actions CI: backend (check + test + clippy) + frontend (tsc + test + build)
|
2026-04-27 21:12:08 +08:00 |
|
iven
|
41af241238
|
refactor(web): 前端工程化 — 组件拆分 + 名称缓存统一
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- useHealthStore 新增 batchResolvePatientNames/batchResolveDoctorNames
批量解析方法(去重 → 过滤已缓存 → 5 并发批次加载)
- PointsOrderList 移除局部 nameCache,改用 useHealthStore 全局缓存
- PluginCRUDPage (871L) 拆分为 usePluginData + DetailDrawer +
ImportModal + PluginCRUDPageInner,原文件改为 re-export
- PluginGraphPage (765L) 拆分为 useGraphData + useGraphCanvas hooks
- StatisticsDashboard (580L) 拆分为 useStatsData + HealthDataCenter
|
2026-04-27 20:56:27 +08:00 |
|
iven
|
fdceed7284
|
feat(web): useApiRequest 添加 loading + usePaginatedData 泛型筛选
- useApiRequest 新增 loading 状态,execute 自动管理 loading 生命周期
- usePaginatedData 支持泛型筛选参数 (filters: F),函数重载保持旧签名兼容
- 新增 filters/setFilters 状态,fetchFn 调用时传入当前 filters
- 向后兼容:旧调用点无需修改
|
2026-04-27 20:26:00 +08:00 |
|
iven
|
a5646ddbb3
|
perf(health): 随访列表内联负责人名称 — 消除 N+1 查询
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
follow_up list_tasks 批量查询 users 表获取 assigned_to_name,
前端移除 doctorLabels 逐条请求缓存,直接使用后端内联字段。
|
2026-04-27 13:22:46 +08:00 |
|
iven
|
7e66561a5f
|
fix(health): 统一随访类型为 5 种 — phone/outpatient/home_visit/online/wechat
- validation.rs: face_to_face 替换为 outpatient,新增 home_visit/wechat
- FollowUpTaskList.tsx: 新增 online 选项,与后端对齐
- 迁移 078: follow_up_task + follow_up_record face_to_face → outpatient
|
2026-04-27 11:20:57 +08:00 |
|
iven
|
47df2e2aa6
|
perf(web): manualChunks 拆分 heavy deps + lazy ProcessDesigner/ProcessViewer
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- vite.config.ts 添加 vendor-charts/plots/graphs, vendor-flow, vendor-editor 独立 chunk
- vendor-antd 从 3000kB 降至 1532kB,charts 独立 1459kB
- ProcessDesigner/ProcessViewer 改为 React.lazy 按需加载
- 移除 PluginGraphPage 遗留的 animFrameRef 未使用变量
|
2026-04-27 10:11:12 +08:00 |
|
iven
|
af44476c0f
|
perf(web): PluginGraphPage 替换持续 rAF 循环为按需重绘
移除持续 requestAnimationFrame 循环,改为数据变更 useEffect 触发
单次重绘 + ResizeObserver 监听容器变化,静态页面 CPU 占用大幅降低。
|
2026-04-27 09:58:51 +08:00 |
|
iven
|
1c7184b6bc
|
perf(web): PluginCRUDPage columns 包裹 useMemo 避免重渲染
columns 依赖 fields/resolvedLabels/labelMeta,搜索输入时不再重建列定义。
|
2026-04-27 09:57:41 +08:00 |
|
iven
|
f934ca0eaf
|
perf(web): ConsultationList/FollowUpTaskList 移除 N+1 nameCache
后端已内联 patient_name/doctor_name,前端移除逐条查询。
Session/FollowUpTask 接口添加 name 可选字段。
FollowUpTaskList 保留 assignee 的 getUser 查询(users 表未内联)。
|
2026-04-27 09:47:37 +08:00 |
|
iven
|
c6856370c6
|
perf(web): AppointmentList 移除 nameCache N+1 请求
后端已内联 patient_name/doctor_name,前端移除逐条查询
patientApi/doctorApi 的 nameCache 逻辑,列表加载降为 O(1) 请求。
|
2026-04-27 09:41:47 +08:00 |
|