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: (
{