feat(frontend): P2 页面开发 — 今日行动中心 + 对比 + 决策线程 + OODA + 助推追踪 + 密级标签
- 今日行动中心: 6 区块结构(AI早报/必须处理/建议关注/增长机会/等待他人/已完成) - 多企业对比: 集成 CompareMode 组件 + 企业选择器 - 决策线程列表/详情: 集成 ThreadList/ThreadDetail 组件 - OODA 决策循环: 四阶段可视化 + 决策延迟追踪 - 助推效果追踪: 采纳率/行动率/疲劳度指标面板 - 信息分级标识: 4 级密级标签组件(公开/内部/机密/绝密)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/** 信息分级标识组件 — 4 级密级标签。 */
|
||||
|
||||
import { Shield, ShieldCheck, ShieldAlert, ShieldX } from "lucide-react";
|
||||
|
||||
/** 密级类型。 */
|
||||
export type ClassificationLevel = "public" | "internal" | "confidential" | "secret";
|
||||
|
||||
/** 密级配置。 */
|
||||
const LEVEL_CONFIG: Record<ClassificationLevel, {
|
||||
label: string;
|
||||
icon: typeof Shield;
|
||||
color: string;
|
||||
description: string;
|
||||
}> = {
|
||||
public: { label: "公开", icon: Shield, color: "text-gray-500 bg-gray-50 border-gray-200", description: "可对外公开" },
|
||||
internal: { label: "内部", icon: ShieldCheck, color: "text-blue-600 bg-blue-50 border-blue-200", description: "仅限内部使用" },
|
||||
confidential: { label: "机密", icon: ShieldAlert, color: "text-amber-600 bg-amber-50 border-amber-200", description: "限授权人员查看" },
|
||||
secret: { label: "绝密", icon: ShieldX, color: "text-rose-600 bg-rose-50 border-rose-200", description: "最高密级,查看留痕" },
|
||||
};
|
||||
|
||||
/** ClassificationBadge Props。 */
|
||||
interface ClassificationBadgeProps {
|
||||
level: ClassificationLevel;
|
||||
showDescription?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息分级标识组件 — 4 级密级标签。
|
||||
*
|
||||
* 密级从低到高:公开 → 内部 → 机密 → 绝密。
|
||||
*/
|
||||
export function ClassificationBadge({ level, showDescription = false }: ClassificationBadgeProps) {
|
||||
const config = LEVEL_CONFIG[level];
|
||||
return (
|
||||
<span
|
||||
className={`inline-flex items-center gap-1 rounded border px-2 py-0.5 text-xs font-medium ${config.color}`}
|
||||
title={config.description}
|
||||
>
|
||||
<config.icon size={12} aria-hidden="true" />
|
||||
{config.label}
|
||||
{showDescription && (
|
||||
<span className="font-normal opacity-70">· {config.description}</span>
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import Link from "next/link";
|
||||
import type { ThreadStatus } from "./ThreadList";
|
||||
|
||||
/** 时间线节点定义。 */
|
||||
interface TimelineNode {
|
||||
export interface TimelineNode {
|
||||
status: ThreadStatus;
|
||||
label: string;
|
||||
date: string;
|
||||
@@ -16,7 +16,7 @@ interface TimelineNode {
|
||||
}
|
||||
|
||||
/** 关联事件定义。 */
|
||||
interface RelatedEvent {
|
||||
export interface RelatedEvent {
|
||||
type: "risk" | "report" | "task" | "aar";
|
||||
title: string;
|
||||
href: string;
|
||||
|
||||
Reference in New Issue
Block a user