feat(mp): 患者端健康告警页面 + 首页入口
Some checks failed
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-8: 小程序患者告警推送
  - 新增 alert service:listPatientAlerts 按患者 ID 查询告警
  - 新增 pkg-health/alerts 告警列表页:严重程度标签 + 状态过滤 + 分页
  - 首页快捷服务新增"健康告警"入口
  - app.config.ts 注册 alerts/index 页面路由
This commit is contained in:
iven
2026-04-30 07:23:05 +08:00
parent 26a9781d4f
commit 43769dae5a
5 changed files with 290 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import { api } from './request';
export interface Alert {
id: string;
severity: string;
title: string;
status: string;
detail?: Record<string, unknown>;
created_at: string;
acknowledged_at?: string;
resolved_at?: string;
}
export async function listPatientAlerts(patientId: string, params?: { status?: string; page?: number; page_size?: number }) {
return api.get<{ data: Alert[]; total: number }>('/health/alerts', {
patient_id: patientId,
page: params?.page ?? 1,
page_size: params?.page_size ?? 20,
status: params?.status,
});
}