sync update from LAN repo (source dhk-1 @ 3e87be55)
This commit is contained in:
1 parent
ab6068a7c1
commit
42f2a26fa8
1482 files changed
+227759
-9584
No files matched your search
@@ -0,0 +1,51 @@
|
||||
import FlowCanvas from "@/components/FlowCanvas";
|
||||
import type { FlowData } from "@/components/FlowCanvas";
|
||||
import MermaidBlock from "@/components/MermaidBlock";
|
||||
|
||||
/**
|
||||
* 流程图页示例:FlowCanvas(可拖拽/缩放的交互流程图)+ MermaidBlock(静态图)。
|
||||
*/
|
||||
const flowData: FlowData = {
|
||||
direction: "TB",
|
||||
nodes: [
|
||||
{ id: "n1", label: "开始", type: "start" },
|
||||
{ id: "n2", label: "数据收集", type: "stage" },
|
||||
{ id: "n3", label: "清洗与校验", type: "process" },
|
||||
{ id: "n4", label: "质量达标?", type: "decision" },
|
||||
{ id: "n5", label: "分析建模", type: "stage" },
|
||||
{ id: "n6", label: "报告产出", type: "deliverable" },
|
||||
{ id: "n7", label: "异常处理", type: "risk" },
|
||||
{ id: "n8", label: "结束", type: "end" },
|
||||
],
|
||||
edges: [
|
||||
{ source: "n1", target: "n2" },
|
||||
{ source: "n2", target: "n3" },
|
||||
{ source: "n3", target: "n4" },
|
||||
{ source: "n4", target: "n5", label: "是" },
|
||||
{ source: "n4", target: "n7", label: "否" },
|
||||
{ source: "n7", target: "n3", label: "重新处理" },
|
||||
{ source: "n5", target: "n6" },
|
||||
{ source: "n6", target: "n8" },
|
||||
],
|
||||
};
|
||||
|
||||
export default function ProcessPage() {
|
||||
return (
|
||||
<div className="page">
|
||||
<header className="page-header">
|
||||
<h1 className="page-title">流程图</h1>
|
||||
<p className="page-subtitle">交互式流程图(可拖拽节点、缩放画布)与静态示意图。</p>
|
||||
</header>
|
||||
|
||||
<section className="card" style={{ marginBottom: 20 }}>
|
||||
<h2 className="card-title">业务主流程</h2>
|
||||
<FlowCanvas data={flowData} height={480} />
|
||||
</section>
|
||||
|
||||
<section className="card">
|
||||
<h2 className="card-title">静态示意图(Mermaid)</h2>
|
||||
<MermaidBlock source={"flowchart LR\n A[需求输入] --> B{评审}\n B -->|通过| C[排期开发]\n B -->|驳回| A"} />
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user