diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx index 9ae57845a..d6c82d2d1 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/ApprovalItem.tsx @@ -112,11 +112,11 @@ const changService = (api, setData, user, filter, t, setDefaultData, cm, compile ...item, title: `${user.data.data.nickname}的${categoryTitle}`, categoryTitle: categoryTitle, - statusTitle: t(statusType.label), - statusColor: statusType.color, + statusTitle: t(statusType?.label), + statusColor: statusType?.color || 'default', reason: summary || [], - priorityTitle: priorityType.label, - priorityColor: priorityType.color, + priorityTitle: priorityType?.label, + priorityColor: priorityType?.color, }; }); result.sort((a, b) => { @@ -125,7 +125,6 @@ const changService = (api, setData, user, filter, t, setDefaultData, cm, compile setData(result); setDefaultData(result); }) - .catch(() => { console.error; }); diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx index 1382f059a..7600b2731 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/todos/component/TabApprovalItem.tsx @@ -243,11 +243,11 @@ export const changeWorkflowNoticeService = (api, t, cm, compile, input, setData, ...item, title: `${nickName}的${categoryTitle}`, categoryTitle: categoryTitle, - statusTitle: t(statusType.label), - statusColor: statusType.color, + statusTitle: t(statusType?.label), + statusColor: statusType?.color || 'default', reason: summary, - priorityTitle: priorityType.label, - priorityColor: priorityType.color, + priorityTitle: priorityType?.label, + priorityColor: priorityType?.color, }; });