feat: gantt block suprt process update

This commit is contained in:
katherinehhh 2023-02-01 15:52:16 +08:00
parent a437cf2f5f
commit 01e93148b9
4 changed files with 6 additions and 6 deletions

View File

@ -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,
});
}

View File

@ -130,7 +130,7 @@ export const GanttDesigner = () => {
<SchemaSettings.SelectItem
title={t('Progress field')}
value={fieldNames.progress}
options={useOptions('double')}
options={useOptions('float')}
onChange={(progress) => {
const fieldNames = field.decoratorProps.fieldNames || {};
fieldNames['progress'] = progress;

View File

@ -374,7 +374,7 @@ export const Gantt: any = (props:any) => {
filterByTk: task.id,
values: {
...task,
[fieldNames.progress]: task.progress,
[fieldNames.progress]: task.progress/100,
},
});
};

View File

@ -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' },