diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx index 15f4c08e1..7c9976bdd 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx @@ -124,7 +124,7 @@ export const ViewActionLaunchContent = () => { type: 'void', 'x-decorator': 'SchemaComponentContextProvider', 'x-decorator-props': { - designable: true, + designable: false, }, 'x-component': 'RemoteSchemaComponent', 'x-component-props': { diff --git a/packages/plugins/@tachybase/plugin-workflow/src/locale/zh-CN.json b/packages/plugins/@tachybase/plugin-workflow/src/locale/zh-CN.json index 0748efb6d..38d3becbe 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/locale/zh-CN.json +++ b/packages/plugins/@tachybase/plugin-workflow/src/locale/zh-CN.json @@ -356,7 +356,6 @@ "\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写", "concat": "连接", "ms": "毫秒", - "reSubmit": "重新提交", - "Are you sure you want to resubmit it?": "确定生成一份新的提交记录吗?" - + "reSubmit": "需重新提交", + "Are you sure you want to resubmit it?": "确定生成一份新的草稿吗?" } diff --git a/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/ApprovalTrigger.ts b/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/ApprovalTrigger.ts index 08c595130..5aaf35093 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/ApprovalTrigger.ts +++ b/packages/plugins/@tachybase/plugin-workflow/src/server/features/approval/ApprovalTrigger.ts @@ -74,19 +74,17 @@ export default class ApprovalTrigger extends Trigger { } const { approvalId, data, summary, collectionName } = execution.context; - // NOTE: 因为这里的原本的 data, 在重新提交后再次重新提交, 丢失了审批人之类的多对多关系数据 + // FIXME: 因为这里的原本的 data, 在重新提交后再次重新提交, 丢失了审批人之类的多对多关系数据 // 找不到上下文传递数据的来源在哪里, 因此在这里重新取数据.因为存储的是快照, 这样是有其合理性的. - const approval = await this.workflow.db.getRepository('approvals').findOne({ - filterByTk: approvalId, - transaction, - }); + // 不合理, 会导致其他错误出现. 从非审批中心发起的单子, 拿到的是错误的数据. + // 现在的问题是, 多次复制后, 丢失了审批人, 等多对多的关联字段. const approvalExecution = await this.workflow.db.getRepository('approvalExecutions').create({ values: { approvalId, executionId: execution.id, status: execution.status, - snapshot: approval?.data || data, + snapshot: data, summary, collectionName, },