feat/approval-0702 (#1279)
Reviewed-on: daoyoucloud/tachybase#1279 Reviewed-by: sealday <zhanglin@daoyoucloud.com> Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
7bfd26a2b3
commit
7036f3216c
@ -124,7 +124,7 @@ export const ViewActionLaunchContent = () => {
|
|||||||
type: 'void',
|
type: 'void',
|
||||||
'x-decorator': 'SchemaComponentContextProvider',
|
'x-decorator': 'SchemaComponentContextProvider',
|
||||||
'x-decorator-props': {
|
'x-decorator-props': {
|
||||||
designable: true,
|
designable: false,
|
||||||
},
|
},
|
||||||
'x-component': 'RemoteSchemaComponent',
|
'x-component': 'RemoteSchemaComponent',
|
||||||
'x-component-props': {
|
'x-component-props': {
|
||||||
|
@ -356,7 +356,6 @@
|
|||||||
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
|
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
|
||||||
"concat": "连接",
|
"concat": "连接",
|
||||||
"ms": "毫秒",
|
"ms": "毫秒",
|
||||||
"reSubmit": "重新提交",
|
"reSubmit": "需重新提交",
|
||||||
"Are you sure you want to resubmit it?": "确定生成一份新的提交记录吗?"
|
"Are you sure you want to resubmit it?": "确定生成一份新的草稿吗?"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,19 +74,17 @@ export default class ApprovalTrigger extends Trigger {
|
|||||||
}
|
}
|
||||||
const { approvalId, data, summary, collectionName } = execution.context;
|
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({
|
const approvalExecution = await this.workflow.db.getRepository('approvalExecutions').create({
|
||||||
values: {
|
values: {
|
||||||
approvalId,
|
approvalId,
|
||||||
executionId: execution.id,
|
executionId: execution.id,
|
||||||
status: execution.status,
|
status: execution.status,
|
||||||
snapshot: approval?.data || data,
|
snapshot: data,
|
||||||
summary,
|
summary,
|
||||||
collectionName,
|
collectionName,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user