From 01e93148b9e9b774a6834a6cfc53d9fa7bd155a9 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 1 Feb 2023 15:52:16 +0800 Subject: [PATCH] feat: gantt block suprt process update --- .../core/client/src/block-provider/GanttBlockProvider.tsx | 2 +- .../src/schema-component/antd/gantt/Gantt.Designer.tsx | 2 +- .../schema-component/antd/gantt/components/gantt/gantt.tsx | 2 +- .../src/schema-initializer/items/GanttBlockInitializer.tsx | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/client/src/block-provider/GanttBlockProvider.tsx b/packages/core/client/src/block-provider/GanttBlockProvider.tsx index c036bc0051..bf68c189a1 100644 --- a/packages/core/client/src/block-provider/GanttBlockProvider.tsx +++ b/packages/core/client/src/block-provider/GanttBlockProvider.tsx @@ -95,7 +95,7 @@ const formatData = (data = [], fieldNames, tasks: any[] = [], projectId: any = u name: item[fieldNames.title], id: item.id + '', type: fieldNames.end?'task':'milestone', - progress: item[fieldNames.progress], + progress: item[fieldNames.progress]*100, project: projectId, }); } diff --git a/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx b/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx index 7bbff55361..9568c1d566 100644 --- a/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/Gantt.Designer.tsx @@ -130,7 +130,7 @@ export const GanttDesigner = () => { { const fieldNames = field.decoratorProps.fieldNames || {}; fieldNames['progress'] = progress; diff --git a/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx b/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx index 7585666aad..039154b8c2 100644 --- a/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx +++ b/packages/core/client/src/schema-component/antd/gantt/components/gantt/gantt.tsx @@ -374,7 +374,7 @@ export const Gantt: any = (props:any) => { filterByTk: task.id, values: { ...task, - [fieldNames.progress]: task.progress, + [fieldNames.progress]: task.progress/100, }, }); }; diff --git a/packages/core/client/src/schema-initializer/items/GanttBlockInitializer.tsx b/packages/core/client/src/schema-initializer/items/GanttBlockInitializer.tsx index d7346010f8..c082bd1060 100644 --- a/packages/core/client/src/schema-initializer/items/GanttBlockInitializer.tsx +++ b/packages/core/client/src/schema-initializer/items/GanttBlockInitializer.tsx @@ -38,7 +38,7 @@ export const GanttBlockInitializer = (props) => { }; }); const numberFields = collectionFields - ?.filter((field) => field.type === 'double') + ?.filter((field) => field.type === 'float') ?.map((field) => { return { label: field?.uiSchema?.title, @@ -83,8 +83,8 @@ export const GanttBlockInitializer = (props) => { title: t('Time range'), enum: [ { label: '{{t("Hour")}}', value: 'hour', color: 'orange' }, - { label: '{{t("Quarter of day")}}', value: 'quarterOfDay', color: 'default' }, - { label: '{{t("Half of day")}}', value: 'halOfDay', color: 'blue' }, + { label: '{{t("Quarter of day")}}', value: 'quarterDay', color: 'default' }, + { label: '{{t("Half of day")}}', value: 'halfDay', color: 'blue' }, { label: '{{t("Day")}}', value: 'day', color: 'yellow' }, { label: '{{t("Week")}}', value: 'week', color: 'pule' }, { label: '{{t("Month")}}', value: 'month', color: 'green' },