-
- {/* KPI mini-cards */}
- {stats && (
-
- {[
- { label: '总计', value: stats.total, color: theme.text },
- { label: '高影响', value: stats.high_impact, color: '#d64545' },
- { label: '中影响', value: stats.medium_impact, color: '#ff8800' },
- { label: '近90天', value: stats.recent_90d, color: theme.accent },
- ].map(({ label, value, color }) => (
-
- ))}
-
- )}
-
- {/* Filter row */}
-
-
- {sources.map(s => (
-
- ))}
-
-
-
- {impacts.map(lvl => (
-
- ))}
-
-
- {/* Event list */}
-
- {loading && (
-
加载中...
- )}
- {!loading && events.length === 0 && (
-
暂无法规动态
- )}
- {events.map(evt => {
- const cfg = IMPACT_CONFIG[evt.impact_level];
- const isSelected = evt.id === selectedId;
- const srcColor = SOURCE_COLORS[evt.source] || theme.accent;
- return (
-
onSelect(evt.id)}
- style={{
- padding: '14px 16px',
- background: isSelected ? theme.bgHover : theme.bgCard,
- borderRadius: 10,
- border: `1px solid ${isSelected ? theme.accent : theme.border}`,
- borderLeft: `4px solid ${cfg.color}`,
- cursor: 'pointer',
- transition: 'all 0.15s ease',
- boxShadow: isSelected ? `0 0 0 1px ${theme.accent}40` : 'none',
- }}
- >
- {/* Source + Status row */}
-
- {evt.source}
- {evt.standard_code}
-
- {STATUS_LABEL[evt.status] ?? evt.status}
-
-
-
- {/* Title */}
-
- {evt.title}
-
-
- {/* Date + impact */}
-
-
- {evt.published_at}{evt.effective_at ? ` → ${evt.effective_at}` : ''}
-
- {cfg.dot} {cfg.label}
-
-
- );
- })}
-
-
- );
-};
diff --git a/frontend/src/pages/RagChat/CitedAnswer.tsx b/frontend/src/pages/RagChat/CitedAnswer.tsx
deleted file mode 100644
index 1f33b5e..0000000
--- a/frontend/src/pages/RagChat/CitedAnswer.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import React from 'react';
-import { useTheme } from '../../contexts';
-import type { RetrievalData } from '../../types';
-
-interface CitedAnswerProps {
- text: string;
- sources: RetrievalData[];
- onCiteClick: (index: number) => void;
-}
-
-export const CitedAnswer: React.FC