diff --git a/src/executor/tools/generate/columns.tsx b/src/executor/tools/generate/columns.tsx index c0b9a633159ce9149b764dc4046758e4d668bd77..77c92e3e7332e1fcd0da2182be3d6c395c4b268d 100644 --- a/src/executor/tools/generate/columns.tsx +++ b/src/executor/tools/generate/columns.tsx @@ -265,7 +265,7 @@ export const GenerateColumn = ( flexDirection: 'row', gap: 2, }}> - {localizationText} + {/* {localizationText} */} {beforeText} {!data.text ? '(置空)' : text} = (props) => { break; case 'assignment': formData.current.after = args.data; - formData.current.before = args.data; + formData.current.before = args.before break; } break; diff --git a/src/ts/scripting/core/rule/SplitHandler.ts b/src/ts/scripting/core/rule/SplitHandler.ts index f9c642fb3010fbc04fcd2ad5521df486f0bad231..d7e6a9c3e8570b26f1ed89d123c69df4245dd88d 100644 --- a/src/ts/scripting/core/rule/SplitHandler.ts +++ b/src/ts/scripting/core/rule/SplitHandler.ts @@ -176,10 +176,15 @@ export default class SplitHandler implements IService { /** 保留原数据的部分内容不被更改 */ if (i === splitNum - 1 && !id) { newAsset['id'] = this.curSplitAsset.id; + newAsset['changes'] = Object.keys(newAsset); } newThing.push({ ...newAsset }); } - this.commandDetailForm([...this.changeData, ...newThing]); + const beforeList = [...newThing]; + if (beforeList.length > 0) { + beforeList.pop(); + } + this.commandDetailForm([...this.changeData, ...newThing],[...beforeList,deepClone(this.curSplitAsset)]); } // 计算每个单位的数值字段值(静态方法) @@ -297,11 +302,12 @@ export default class SplitHandler implements IService { } /** 通知子表变更 */ - commandDetailForm(data: XThing[]) { + commandDetailForm(data: XThing[],before: XThing[]) { this.service.command.emitter('change', 'assignment', { formId: this.splitDetailFormId, value: this.curFieldId, data: data, + before: before, }); }