diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/component/ApprovalTemplateType.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/component/ApprovalTemplateType.tsx index b9e07f75c..522f31a1c 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/component/ApprovalTemplateType.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/component/ApprovalTemplateType.tsx @@ -21,7 +21,7 @@ export const ApprovalTemplateType = observer((props) => { }) .then((res) => { const columnsData = res.data.data.map((value) => { - return { label: value.title?.replace('审批流:', '') || '', value: value.id }; + return { label: value.title || '', value: value.id }; }); columnsData.unshift({ value: 'all', 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 d6c82d2d1..41e389a98 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 @@ -93,7 +93,7 @@ const changService = (api, setData, user, filter, t, setDefaultData, cm, compile const result = res.data?.data.map((item) => { const priorityType = ApprovalPriorityType.find((priorityItem) => priorityItem.value === item.data.priority); const statusType = approvalTodoListStatus(item, t); - const categoryTitle = item.workflow.title.replace('审批流:', ''); + const categoryTitle = item.workflow.title; const collectionName = item.workflow?.config?.collection || item.execution?.context?.collectionName; const summary = Object.entries(item.summary)?.map(([key, value]) => { const field = cm.getCollectionField(`${collectionName}.${key}`); diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx index a699f34dd..bc5798649 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/component/InitiationsItem.tsx @@ -37,13 +37,13 @@ export const InitiationsItem = observer((props) => {
{ - navigate(`/mobile/${value.title?.replace('审批流:', '') || ''}/approval/${value.id}/page`); + navigate(`/mobile/${value.title || ''}/approval/${value.id}/page`); }} >
- {value.title?.replace('审批流:', '') || ''} + {value.title || ''}
), }; 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 ba617a85e..634b67e88 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 @@ -106,7 +106,7 @@ const changeApprovalRecordsService = (api, params, filter, cm, compile, t, setDa const result = res.data?.data.map((item) => { const priorityType = ApprovalPriorityType.find((priorityItem) => priorityItem.value === item.snapshot.priority); const statusType = approvalTodoListStatus(item, t); - const categoryTitle = item.workflow.title.replace('审批流:', ''); + const categoryTitle = item.workflow.title; const collectionName = item.workflow?.config?.collection || item.execution?.context?.collectionName; const summary = Object.entries(item.summary)?.map(([key, value]) => { @@ -165,7 +165,7 @@ const changeUsersJobsService = (api, t, cm, compile, input, setData, params, fil (priorityItem) => priorityItem.value === item.execution.context?.data?.priority, ); const statusType = ExecutionStatusOptions.find((value) => value.value === item.status); - const categoryTitle = item.workflow.title.replace('审批流:', ''); + const categoryTitle = item.workflow.title; const nickName = item.execution?.context?.data?.createdBy?.nickname; return { ...item, @@ -225,7 +225,7 @@ export const changeWorkflowNoticeService = (api, t, cm, compile, input, setData, const priorityType = ApprovalPriorityType.find( (priorityItem) => priorityItem.value === item.snapshot?.priority, ); - const categoryTitle = item.workflow.title.replace('审批流:', ''); + const categoryTitle = item.workflow.title; const collectionName = item.collectionName; const summary = Object.entries(item.summary).map(([key, value]) => { const field = cm.getCollectionField(`${collectionName}.${key}`); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx index 96ed2c5d1..8db10c0f1 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx @@ -34,9 +34,26 @@ export const ApprovalBlockLaunchApplication = (props) => { resource: decorator?.collection, action: decorator?.action, params: { - pageSize: 99999, - filter: { ...decorator?.params?.filter }, + pagination: false, sort: 'createdAt', + filter: { + $and: [ + // NOTE: 将审批类型的且处于启用状态的筛选出来 + { + type: { + $eq: 'approval', + }, + }, + { + enabled: { + $eq: true, + }, + }, + { + ...decorator?.params?.filter, + }, + ], + }, }, }, { @@ -133,7 +150,7 @@ export const ApprovalBlockLaunchApplication = (props) => { onClick(item); }} > - {item.title.replace('审批流:', '')} + {item.title} );