docs(uiux): UIUX 设计方案大改 + 5 份作业指导书对齐 + 开发任务文档
- UIUX 文档:填充 19 个缺口(多主体画像/健康度/AI+看板/增长域/洞察域/创始人端/OODA/助推/商密) - UIUX 文档:插入 6 个新章节(十四~十九),旧章节重编号为二十~三十一,更新目录和交叉引用 - 作业指导书 x5:导航改为 6 域分组,新增 Context Bar/工作模式/Insight Rail/决策线程/多工作区等 UI 概念 - 新建 docs/2-task-uiux.md:50 个代码落地开发任务,按 P0-P6 分优先级 + 8 Sprint 规划 - 后端/前端:大量新增模型、路由、组件(来自之前 Phase 开发)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Lightbulb, Sparkles } from "lucide-react";
|
||||
import { discoverInnovation } from "@/lib/api-v2";
|
||||
import { PageContainer, Card } from "@/components/shared/PageContainer";
|
||||
import { EmptyState } from "@/components/shared/EmptyState";
|
||||
import { toast } from "sonner";
|
||||
|
||||
export default function InnovationPage() {
|
||||
const [capabilities, setCapabilities] = useState("");
|
||||
const [results, setResults] = useState<Record<string, any>[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const handleDiscover = async () => {
|
||||
if (!capabilities.trim()) {
|
||||
toast.error("请输入 Portfolio 企业能力描述");
|
||||
return;
|
||||
}
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const resp = await discoverInnovation(capabilities);
|
||||
setResults((resp.data as Record<string, any>[]) ?? []);
|
||||
} catch {
|
||||
toast.error("分析失败");
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<PageContainer title="组合创新实验室" description="AI 分析企业能力组合 → 发现联合产品方案">
|
||||
<Card>
|
||||
<textarea
|
||||
value={capabilities}
|
||||
onChange={(e) => setCapabilities(e.target.value)}
|
||||
placeholder="输入 Portfolio 内企业能力描述..."
|
||||
className="w-full rounded-md border border-gray-300 p-3 text-sm"
|
||||
rows={4}
|
||||
/>
|
||||
<button
|
||||
onClick={handleDiscover}
|
||||
disabled={isLoading}
|
||||
className="mt-2 flex items-center gap-1 rounded-md bg-gray-900 px-3 py-1.5 text-sm text-white hover:bg-gray-700 disabled:opacity-50"
|
||||
>
|
||||
<Sparkles size={16} /> {isLoading ? "分析中..." : "发现创新机会"}
|
||||
</button>
|
||||
</Card>
|
||||
|
||||
{results.length > 0 && (
|
||||
<div className="space-y-3">
|
||||
{results.map((item, i) => (
|
||||
<Card key={i}>
|
||||
<h3 className="font-medium text-gray-900">{item.title as string}</h3>
|
||||
<p className="mt-1 text-sm text-gray-600">{item.combined_capability as string}</p>
|
||||
{item.market_analysis && <p className="mt-1 text-xs text-gray-400">{item.market_analysis as string}</p>}
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{results.length === 0 && !isLoading && capabilities && (
|
||||
<EmptyState description="点击按钮开始分析" />
|
||||
)}
|
||||
</PageContainer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user