From 9137d56fa67c6f6cc2f746ff4460849588cf8b73 Mon Sep 17 00:00:00 2001 From: lorne <1991wangliang@gmail.com> Date: Thu, 3 Dec 2026 16:36:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BE=85=E5=8A=9E=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E3=80=8C=E5=AE=A1=E6=89=B9=E4=BA=BA=E3=80=8D=E3=80=8C=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E3=80=8D=E5=90=88=E5=B9=B6=E4=B8=BA=E3=80=8C=E5=8A=9E?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E3=80=8D=E5=88=97=EF=BC=8C=E5=B9=B6=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B7=B2=E5=8A=9E=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 「审批人」与「身份」两列都绑定 current_operator_*,却在已办时由 render 换成 handle_operator_*;表头只写「身份」无法表达是「待办归属身份」还是 「实际办理身份」,用户容易误读成提交时锁定的 submit_operator_identity。 - PC:把「谁 + 以什么身份」合并为一列「办理人」,身份用标签区分, 空身份显示「默认身份」,避免同一列在不同 tab 下语义漂移 - 移动端:已办改为优先取 handle_operator_name/identity(此前只取 current_*,已办列表显示的是待办归属人而非实际办理人),身份改用标签展示 - PC 补齐列宽并启用横向滚动,避免窄窗口下中文列名被压成竖排 本地实测(example-dev.db):已办记录 8 的 current 身份为空、handle 为 department2,PC 与移动端均展示「张三 + department2」;待办记录 2 展示 「张三 + 默认身份」。两端 rsbuild build 通过,frontend 测试 25 例通过。 --- apps/app-mobile/src/pages/todo.tsx | 79 ++++++++++++++++++------------ apps/app-pc/src/pages/todo.tsx | 55 ++++++++++++++------- 2 files changed, 85 insertions(+), 49 deletions(-) diff --git a/apps/app-mobile/src/pages/todo.tsx b/apps/app-mobile/src/pages/todo.tsx index d39ea76..c4893d5 100644 --- a/apps/app-mobile/src/pages/todo.tsx +++ b/apps/app-mobile/src/pages/todo.tsx @@ -1,4 +1,4 @@ -import {Empty, List, Tabs} from "antd-mobile"; +import {Empty, List, Tag, Tabs} from "antd-mobile"; import React from "react"; import {done, list, notify, todo} from "@/api/record.ts"; import dayjs from "dayjs"; @@ -52,36 +52,53 @@ const TodoList: React.FC = ({type}) => { - {records.map((record) => ( - { - handleApproval(record.recordId); - }} - key={record.recordId} - prefix={( - - )} - description={( - <> -
{record.nodeName} {record.workTitle}
-
实例编码:{record.processId}
- {/* 记录归属身份(留痕信息):列表本身不按身份过滤(issue #297) */} -
身份:{record.currentOperatorIdentity || '默认身份'}
- - )} - extra={ -
- {dayjs(record.createTime).format("YYYY-MM-DD HH:mm:ss")} - {record.currentOperatorName} -
- } - > - {record.title} -
- ))} + {records.map((record) => { + // 「谁 + 以什么身份」合并展示,避免单独一列「身份」语义不清。 + // 待办/抄送/全部:展示待办归属人与归属身份(issue #288); + // 已办:优先展示实际办理人与办理身份(issue #306),历史数据回退到归属人。 + // 列表本身不按身份过滤(issue #297),身份为空表示默认身份。 + const isDone = type === 'done'; + const operatorName = isDone + ? (record.handleOperatorName || record.currentOperatorName) + : record.currentOperatorName; + const operatorIdentity = isDone + ? (record.handleOperatorIdentity || record.currentOperatorIdentity) + : record.currentOperatorIdentity; + return ( + { + handleApproval(record.recordId); + }} + key={record.recordId} + prefix={( + + )} + description={( + <> +
{record.nodeName} {record.workTitle}
+
实例编码:{record.processId}
+ + )} + extra={ +
+ {dayjs(record.createTime).format("YYYY-MM-DD HH:mm:ss")} + {operatorName} + + {operatorIdentity || '默认身份'} + +
+ } + > + {record.title} +
+ ); + })}
); }; diff --git a/apps/app-pc/src/pages/todo.tsx b/apps/app-pc/src/pages/todo.tsx index 1c44ed3..674d8fe 100644 --- a/apps/app-pc/src/pages/todo.tsx +++ b/apps/app-pc/src/pages/todo.tsx @@ -3,7 +3,7 @@ import { done, list, notify, todo } from "@/api/record.ts"; import { forceSync, forceSyncPermission, type ForceSyncResult } from "@/api/workflow.ts"; import { ApprovalPanelDrawer, FlowTitle, WorkflowSelectModal } from "@coding-flow/flow-pc-approval"; import { Table, type TableProps } from "@coding-flow/flow-pc-ui"; -import { Button, message, Popconfirm, Space, Tabs, type TabsProps } from "antd"; +import { Button, message, Popconfirm, Space, Tabs, Tag, type TabsProps } from "antd"; import dayjs from "dayjs"; import { EventBus, type ActionType } from "@coding-flow/flow-core"; @@ -53,14 +53,19 @@ const TodoPage: React.FC = () => { { dataIndex: 'recordId', title: '编号', + width: 80, }, { dataIndex: 'processId', title: '实例编码', + width: 210, + ellipsis: true, }, { dataIndex: 'title', title: '流程名称', + width: 180, + ellipsis: true, render: (value) => { return } @@ -68,6 +73,7 @@ const TodoPage: React.FC = () => { { dataIndex: 'readTime', title: '读取状态', + width: 90, render: (value) => { return value ? '已读' : '未读'; } @@ -75,43 +81,51 @@ const TodoPage: React.FC = () => { { dataIndex: 'nodeName', title: '节点名称', + width: 120, + ellipsis: true, }, { dataIndex: 'createTime', title: '创建时间', + width: 170, render: (text) => { return dayjs(text).format('YYYY-MM-DD HH:mm:ss'); } }, { dataIndex: 'currentOperatorId', - title: '审批人', + title: '办理人', hidden: true, }, { - dataIndex: 'currentOperatorName', - title: '审批人', - render: (value, record) => { - // 已办记录展示「谁办的」(办理人,issue #306);历史数据没有办理人时回退到待办归属人。 - return record.recordState ? (record.handleOperatorName || value) : value; - } - }, - { - dataIndex: 'currentOperatorIdentity', - title: '身份', - render: (value, record) => { - // 已办记录优先展示「以什么身份办的」(issue #306), - // 历史数据与待办记录展示待办归属身份(issue #288),空表示默认身份。 - // 列表本身不按身份过滤(issue #297),该列仅用于展示留痕信息。 - const identity = record.recordState + title: '办理人', + width: 180, + render: (_, record) => { + // 「谁 + 以什么身份」合并展示,避免「审批人」「身份」两列各自取值的语义歧义。 + // 待办/抄送/全部流程:展示待办归属人与归属身份(issue #288); + // 已办:优先展示实际办理人与办理身份(issue #306),历史数据没有办理人时回退到归属人。 + // 列表本身不按身份过滤(issue #297),身份为空表示该人员未启用多身份,即默认身份。 + const isDone = !!record.recordState; + const operatorName = isDone + ? (record.handleOperatorName || record.currentOperatorName) + : record.currentOperatorName; + const operatorIdentity = isDone ? (record.handleOperatorIdentity || record.currentOperatorIdentity) : record.currentOperatorIdentity; - return identity || '默认身份'; + return ( + + {operatorName} + + {operatorIdentity || '默认身份'} + + + ); } }, { dataIndex: 'recordState', title: '状态', + width: 80, render: (text) => { return text ? '已办' : '待办'; } @@ -119,6 +133,7 @@ const TodoPage: React.FC = () => { { dataIndex: 'option', title: '操作', + width: 90, render: (_, record) => { if (currentTab === 'todo') { return ( @@ -182,6 +197,7 @@ const TodoPage: React.FC = () => { children: ( { @@ -196,6 +212,7 @@ const TodoPage: React.FC = () => { children: (
{ @@ -210,6 +227,7 @@ const TodoPage: React.FC = () => { children: (
{ @@ -224,6 +242,7 @@ const TodoPage: React.FC = () => { children: (
{