Repository navigation
feat(types): 操作者身份标识字段与 0.3.0 版本锁定(issue #288) - #85
Merged
Merged
Conversation
- FlowOperator、ProcessNodeOperator 新增可选 identity 字段:同一人员的不同身份由后端按 (id, identity) 区分 - 身份取值由业务侧定义(部门id、岗位编码等),框架只透传不解释;空串/缺省表示默认身份,0.3.0 之前的响应不含该字段 - 展示仍使用 name,不冻结身份名称;需要区分身份的宿主可自行渲染(后端详情/列表响应同步下发 identity) - 全部 11 个包版本锁定 0.3.0 并补充 CHANGELOG(与后端 0.3.0-SNAPSHOT 对齐) 验证:pnpm install + pnpm build 全部包构建通过(含 d.ts 生成)。
This was referenced Nov 23, 2026
- flow-core: HttpClient 新增静态 defaultQueryParams,向所有请求注入公共 query 参数 - app-pc: 启动时注入 operatorIdentity(localStorage),右下角新增身份切换器 - 待办列表新增「身份」列,直观验证同一人员多身份待办隔离 - 用户管理移除身份字段(身份是运行期选择,不是用户主数据)
- flow-core HttpClient 新增 defaultQueryParamsPathPrefixes(默认 /api/): operatorIdentity 不再注入宿主自有接口,避免 /user/list 这类基于 SearchRequest 的列表接口把参数当实体字段解析,抛 Field operatorIdentity not found in class hierarchy - flow-core HttpClient 登录态失效时只 removeItem(token),不再 localStorage.clear(): 原实现会顺带抹掉宿主保存的身份 / 超时配置,出现「切换器显示 department1、 请求其实按默认身份发出」的假象 - app-pc 待办页顶部常显当前身份与隔离规则,并说明发起流程时未指定身份的审批人 待办落在默认身份,避免误判为待办丢失 - app-pc 身份切换器跟随 hashchange / storage 同步展示状态
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
配合后端 flow-engine 0.3.0「操作者身份标识」(codingapi/flow-engine#288):同一人员可同时隶属多个部门,以不同身份参与流程。前端本次只做契约与版本对齐,不含交互改造。
改动
FlowOperator、ProcessNodeOperator新增可选字段identity:(id, identity)区分参与人,取值由业务侧定义(部门 id、岗位编码等),框架只透传不解释;name,不冻结身份名称(与 issue 确认的需求一致);需要区分身份的宿主可自行渲染,后端详情/列表响应均已下发identity。0.3.0-SNAPSHOT对齐)。兼容性
tsc与运行时均无破坏;旧版本后端/旧前端互相兼容。operatorIdentity参数声明,前端不需要默认透传(未传时后端取当前登录操作者的身份)。验证
pnpm install+pnpm build:flow-types / flow-core / flow-icons / flow-approval-presenter / flow-pc-* / flow-mobile-* / flow-design 全部构建通过(含 d.ts 生成)。