From f4e4e414b8bbeee35356fd5638fd9915968842bc Mon Sep 17 00:00:00 2001 From: Kennen <317052920@qq.com> Date: Tue, 31 Oct 2023 15:34:26 +0800 Subject: [PATCH] fix(dag/formScope): Add isEmpty is error in validateConcurrentWritePartitionMap function --- packages/dag/src/mixins/formScope.js | 6 ++++-- packages/dag/src/nodes/Table.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/dag/src/mixins/formScope.js b/packages/dag/src/mixins/formScope.js index 6908a0d22e..950aaa04f1 100644 --- a/packages/dag/src/mixins/formScope.js +++ b/packages/dag/src/mixins/formScope.js @@ -889,11 +889,13 @@ export default { let flag = false const concurrentWritePartitionMap = JSON.parse(JSON.stringify($values.concurrentWritePartitionMap)) - if (isEmpty) { + if (isEmpty(concurrentWritePartitionMap)) { flag = true } for(let key in concurrentWritePartitionMap) { - if (!concurrentWritePartitionMap.length) flag = true + if (!concurrentWritePartitionMap[key]?.length) { + flag = true + } } return flag ? i18n.t('packages_dag_mixins_formscope_gaiziduanshibi') : '' }, diff --git a/packages/dag/src/nodes/Table.js b/packages/dag/src/nodes/Table.js index 56e20db4ba..672ef7246e 100644 --- a/packages/dag/src/nodes/Table.js +++ b/packages/dag/src/nodes/Table.js @@ -408,7 +408,7 @@ export class Table extends NodeType { }, concurrentWritePartitionMap: { type: 'object', - title: '多线程写入-分区键', + title: i18n.t('packages_dag_nodes_database_duoxianchengfenqujian'), 'x-decorator': 'FormItem', 'x-component': 'TableFieldSelect', 'x-component-props': {