fix(health): 走查止血 — 患者名显示修复 + 枚举补全 + 医护统计 + 设备选择器
后端: - alert_service: list_alerts 批量查询 patient_name 填充 AlertResponse - consultation_service: list_sessions 批量查询 patient_name/doctor_name - erp-ai handler: list_analysis 通过 raw SQL 查询 patient_name 前端: - AlertList/AlertDashboard: 使用后端返回的 patient_name 替代 ID 截断 - ConsultationDetail: 使用 patient_name/doctor_name 替代 ID 截断 - AiAnalysisList: 使用 patient_name 替代 ID 截断 - constants/health: SEVERITY 补 high/medium, STATUS 补 active - AdminDashboard: 医护人数改为 API 查询(useStatsData 新增 doctorCount) - DeviceManage: 患者 ID 输入改为 PatientSelect 搜索选择器
This commit is contained in:
@@ -40,6 +40,8 @@ export const SEVERITY_COLOR: Record<string, string> = {
|
||||
warning: 'orange',
|
||||
critical: 'red',
|
||||
urgent: 'magenta',
|
||||
high: 'red',
|
||||
medium: 'orange',
|
||||
};
|
||||
|
||||
export const SEVERITY_LABEL: Record<string, string> = {
|
||||
@@ -47,18 +49,23 @@ export const SEVERITY_LABEL: Record<string, string> = {
|
||||
warning: '警告',
|
||||
critical: '严重',
|
||||
urgent: '紧急',
|
||||
high: '严重',
|
||||
medium: '中等',
|
||||
};
|
||||
|
||||
export const SEVERITY_OPTIONS = [
|
||||
{ value: 'info', label: '提示' },
|
||||
{ value: 'warning', label: '警告' },
|
||||
{ value: 'medium', label: '中等' },
|
||||
{ value: 'critical', label: '严重' },
|
||||
{ value: 'high', label: '严重' },
|
||||
{ value: 'urgent', label: '紧急' },
|
||||
];
|
||||
|
||||
// --- 告警状态(统一 3 处: AlertDashboard, AlertList) ---
|
||||
export const ALERT_STATUS_COLOR: Record<string, string> = {
|
||||
pending: 'orange',
|
||||
active: 'gold',
|
||||
acknowledged: 'blue',
|
||||
resolved: 'green',
|
||||
dismissed: 'default',
|
||||
@@ -66,6 +73,7 @@ export const ALERT_STATUS_COLOR: Record<string, string> = {
|
||||
|
||||
export const ALERT_STATUS_LABEL: Record<string, string> = {
|
||||
pending: '待处理',
|
||||
active: '活跃',
|
||||
acknowledged: '已确认',
|
||||
resolved: '已恢复',
|
||||
dismissed: '已忽略',
|
||||
@@ -73,6 +81,7 @@ export const ALERT_STATUS_LABEL: Record<string, string> = {
|
||||
|
||||
export const ALERT_STATUS_OPTIONS = [
|
||||
{ value: '', label: '全部状态' },
|
||||
{ value: 'active', label: '活跃' },
|
||||
{ value: 'pending', label: '待处理' },
|
||||
{ value: 'acknowledged', label: '已确认' },
|
||||
{ value: 'resolved', label: '已恢复' },
|
||||
|
||||
Reference in New Issue
Block a user