Files
nocobase/packages/plugins/@nocobase/plugin-workflow-cc
Zeke Zhang f5f26f6e20 feat(workflow-cc): support FlowModel UI and task cards
<!--
First of all, thank you for your contribution! 
For bug fixes or other non-feature modifications, please base your branch on the main branch.
For new features or API modifications, please make sure your branch is based on the next branch. 
Thank you!
-->

### This is a ...
- [x] New feature
- [ ] Improvement
- [ ] Bug fix
- [ ] Others

### Motivation
重构抄送(CC)插件,支持基于 FlowModel 的界面(v2),使工作流界面与配置可以作为可复用的 FlowModel 构建;同时保持对旧版 v1 UI 的兼容,并新增任务卡片功能以增强任务列表的展示体验。

### Description 
主要变更:
- 新增 FlowModel 渲染器与封装(`RemoteFlowModelRenderer`),并注册两个模型:`CcChildPageModel` 与 `CcTaskCardDetailsModel`。
- 指令配置:新增 `CcInterfaceConfig`(用于 v2 UI 的切换与 FlowModel 配置)和 `CcTaskCardConfigButton`(任务卡片配置);保留 legacy 的 `ccDetail` schema UI,并通过可见性反应进行兼容。
- 任务界面:支持基于 FlowModel 的详情页(`ccUid`)与任务卡片(`taskCardUid`),若未配置则回退为 legacy 的 schema 实现。
- 服务端:在复制工作流配置时会复制 FlowModel(`ccUid` / `taskCardUid`)的 uid,同时保留对 `ccDetail`(ui schema)的复制行为。
- 在插件的 peerDependencies 中声明 `@nocobase/flow-engine` 与 `@nocobase/plugin-flow-engine`。

风险:
- 依赖运行时提供 `@nocobase/flow-engine`;切换到 v2 后用户可能需要重新配置界面,但 v1 将继续保持兼容。

测试建议:
- 新建带 v1 界面的 CC 节点,验证行为与之前一致。
- 通过 FlowModel 配置器创建 v2 界面,验证详情对话框与任务卡片能正常渲染且关闭/刷新功能正常。
- 复制工作流并验证 FlowModel 的 uid 已被正确复制。
- 在本地运行 lint 与相关测试以确认无语法/逻辑错误。

### Related issues

### Showcase

### Changelog

| Language   | Changelog |
| ---------- | --------- |
| 🇺🇸 English | Support flow model-based UI for CC and add task cards |
| 🇨🇳 Chinese | 为抄送插件增加基于 FlowModel 的界面支持并添加任务卡片 |

### Docs

| Language   | Link |
| ---------- | ---- |
| 🇺🇸 English |  |
| 🇨🇳 Chinese |  |

### Checklists
- [ ] All changes have been self-tested and work as expected
- [ ] Test cases are updated/provided or not needed
- [ ] Doc is updated/provided or not needed
- [ ] Component demo is updated/provided or not needed
- [ ] Changelog is provided or not needed
- [ ] Request a code review if it is necessary
2026-01-13 09:48:01 +08:00
..

@nocobase/plugin-workflow-cc

What is NocoBase

NocoBase is a scalability-first, open-source no-code development platform.
Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!

Homepage:
https://www.nocobase.com/

Online Demo:
https://demo.nocobase.com/new

Documents:
https://docs.nocobase.com/

Commericial license & plugins:
https://www.nocobase.com/en/commercial

License agreement:
https://www.nocobase.com/en/agreement

Contact Us:

hello@nocobase.com