From 587378ee15efcc7b9f16de98cd1a4b3d5fc6de6e Mon Sep 17 00:00:00 2001 From: SEN Date: Thu, 25 Jul 2024 13:25:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/executor/tools/task/start/draftWork/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/executor/tools/task/start/draftWork/index.tsx b/src/executor/tools/task/start/draftWork/index.tsx index be3ed6b7b..af08d7d36 100644 --- a/src/executor/tools/task/start/draftWork/index.tsx +++ b/src/executor/tools/task/start/draftWork/index.tsx @@ -45,9 +45,9 @@ const DraftWork: React.FC = ({ current, finished }) => { onStagging={() => { finished && finished(); }} - finished={() => { + finished={(success?: boolean) => { finished && finished(); - current.hardDelete(); + success && current.hardDelete(); }} /> ) -- Gitee From 1807e0c7f64dcf0e27ebcb0da0a99f2c8ebe4a09 Mon Sep 17 00:00:00 2001 From: SEN Date: Thu, 25 Jul 2024 13:26:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=8D=89=E7=A8=BF?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=89=8D=E6=95=B0=E6=8D=AE=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ts/scripting/core/services/FormServiceBase.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ts/scripting/core/services/FormServiceBase.ts b/src/ts/scripting/core/services/FormServiceBase.ts index ce39b37e8..3d8126106 100644 --- a/src/ts/scripting/core/services/FormServiceBase.ts +++ b/src/ts/scripting/core/services/FormServiceBase.ts @@ -210,6 +210,7 @@ export default abstract class FormServiceBase getFormData(form: XForm, nodeId: string, type: FormType): model.FormEditData { var rule: model.RenderRule[] = []; const source: XThing[] = []; + let beforeSource: XThing[] = []; if (this.model.data && this.model.data[form.id]) { const beforeData = this.model.data[form.id]; if (beforeData.length > 0) { @@ -223,6 +224,7 @@ export default abstract class FormServiceBase source.push(...beforeData.at(-1)!.after); rule = beforeData.at(-1)!.rules ?? []; } + beforeSource = beforeData.at(-1)!.before; } } @@ -233,9 +235,10 @@ export default abstract class FormServiceBase } const sourceJson = JSON.stringify(source); + const beforeSourceJson = JSON.stringify(beforeSource); return { rules: rule, - before: JSON.parse(sourceJson), + before: JSON.parse(beforeSourceJson), after: JSON.parse(sourceJson), nodeId: nodeId, formName: form.name, -- Gitee