feat(frontend): P2 页面开发 — 今日行动中心 + 对比 + 决策线程 + OODA + 助推追踪 + 密级标签

- 今日行动中心: 6 区块结构(AI早报/必须处理/建议关注/增长机会/等待他人/已完成)
- 多企业对比: 集成 CompareMode 组件 + 企业选择器
- 决策线程列表/详情: 集成 ThreadList/ThreadDetail 组件
- OODA 决策循环: 四阶段可视化 + 决策延迟追踪
- 助推效果追踪: 采纳率/行动率/疲劳度指标面板
- 信息分级标识: 4 级密级标签组件(公开/内部/机密/绝密)
This commit is contained in:
selfrelease
2026-07-19 19:02:32 +08:00
parent 129210405d
commit a4044baa31
8 changed files with 442 additions and 185 deletions
+67 -30
View File
@@ -1,9 +1,57 @@
/** 多企业对比工作区 — 2-5 家企业并排对比。 */
"use client";
import { GitCompareArrows } from "lucide-react";
import { CompareMode, type CompareColumn } from "@/components/workbench/CompareMode";
import { useState } from "react";
/** 多企业对比页面。 */
export default function ComparePage() {
const [selected, setSelected] = useState<string[]>(["智链科技", "云栈数据", "深瞳智能"]);
const allCompanies = ["智链科技", "云栈数据", "深瞳智能", "量子芯微", "光合生物"];
const companyData: Record<string, { healthScore: number; runway: number; highRisks: number }> = {
"智链科技": { healthScore: 78.5, runway: 18, highRisks: 0 },
"云栈数据": { healthScore: 62.0, runway: 15, highRisks: 1 },
"深瞳智能": { healthScore: 85.5, runway: 24, highRisks: 0 },
"量子芯微": { healthScore: 48.0, runway: 7, highRisks: 2 },
"光合生物": { healthScore: 68.5, runway: 20, highRisks: 0 },
};
const columns: CompareColumn[] = selected.map((name) => ({
id: name,
name,
...companyData[name],
content: (
<div className="space-y-2 text-xs">
<div className="flex justify-between">
<span className="text-muted-foreground"></span>
<span className="font-medium">800</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground"></span>
<span className="font-medium text-emerald-600">+15%</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">AI </span>
<span className="font-medium">3 PoC</span>
</div>
</div>
),
}));
function toggleCompany(name: string) {
setSelected((prev) => {
if (prev.includes(name)) {
return prev.filter((n) => n !== name);
}
if (prev.length >= 5) return prev;
return [...prev, name];
});
}
return (
<div className="space-y-6">
<div className="flex items-center gap-2">
@@ -11,38 +59,27 @@ export default function ComparePage() {
<h1 className="text-2xl font-bold"></h1>
</div>
<div className="rounded-lg border bg-white p-4 shadow-sm">
<p className="text-sm text-muted-foreground">
2-5
</p>
</div>
{/* 对比卡片占位 */}
<div className="grid grid-cols-1 gap-4 md:grid-cols-3">
{["智链科技", "云栈数据", "深瞳智能"].map((name) => (
<div key={name} className="rounded-lg border bg-white p-4 shadow-sm">
<h3 className="mb-3 font-medium">{name}</h3>
<div className="space-y-2 text-sm">
<div className="flex justify-between">
<span className="text-muted-foreground"></span>
<span className="font-medium">78.5</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground"></span>
<span className="font-medium">800</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Runway</span>
<span className="font-medium">12</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground"></span>
<span className="font-medium">0</span>
</div>
</div>
</div>
{/* 企业选择器 */}
<div className="flex flex-wrap items-center gap-2">
<span className="text-sm text-muted-foreground">2-5 </span>
{allCompanies.map((name) => (
<button
key={name}
type="button"
onClick={() => toggleCompany(name)}
className={`rounded-md border px-3 py-1 text-sm transition-colors ${
selected.includes(name)
? "border-indigo-300 bg-indigo-50 text-indigo-600"
: "border-gray-200 bg-white text-gray-600 hover:bg-gray-50"
}`}
>
{name}
</button>
))}
</div>
{/* 对比卡片 */}
<CompareMode columns={columns} />
</div>
);
}