我正在使用最新版的完整日历(v5),并且仅需要基于skillPriority对事件进行分组。但是当我指定
eventOrder={['SkillPriority']}
resources={Resources}
resourceOrder={['unitPriority', 'areaPriority']}
它正在排序,但是startTime和duration会影响顺序。反正有什么改变这种行为???
绿色事件与蓝色并驾齐驱。两者应该分开。
谈论垂直放置而不是时间
请查看我使用的资源/事件。
export const Resources = [
{
id: '1',
title: 'Unit A',
unitName: 'Unit A',
unitId: 1,
unitPriority: 2,
children: [
{ id: '11', title: 'UnitArea 11', areaPriority: 2 },
{ id: '12', title: 'UnitArea 12', areaPriority: 1 },
],
},
{
id: '2',
title: 'Unit B',
unitName: 'Unit B',
unitId: 2,
unitPriority: 1,
children: [
{ id: '21', title: 'UnitArea 21', areaPriority: 2 },
{ id: '22', title: 'UnitArea 22', areaPriority: 1 },
],
},
];
export const Events = [
{
id: '9991',
resourceId: '11',
title: 'event 1 - Area 11 - Skill 2',
start: '2020-09-10 02:00:00',
end: '2020-09-10 09:00:00',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
{
id: '9992',
resourceId: '11',
title: 'event 1 - Area 11 - Skill 2',
start: '2020-09-09 07:00:00',
end: '2020-09-09 09:00:00',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
{
id: '9993',
resourceId: '11',
title: 'event 6 - Area 11 - Skill 1',
start: '2020-09-09 06:00:00',
end: '2020-09-09 07:00:00',
SkillPriority: '1',
},
{
id: '9994',
resourceId: '11',
title: 'event 7 - Area 11 - Skill 2',
start: '2020-09-09 06:00:00',
end: '2020-09-09 12:00:00',
scheduleTitle: 'dummy tile test',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
{
id: '9995',
resourceId: '11',
title: 'event 8 - Area 11 - Skill 2',
start: '2020-09-09 06:00:00',
end: '2020-09-09 07:00:00',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
{
id: '9996',
resourceId: '12',
title: 'event 3 - Area 12 - Skill 1',
start: '2020-09-09 07:00:00',
end: '2020-09-09 09:00:00',
SkillPriority: '1',
},
{
id: '9997',
resourceId: '22',
title: 'event 4 - Area 22 - Skill 1',
start: '2020-09-09 08:00:00',
end: '2020-09-09 10:00:00',
SkillPriority: '1',
},
{
id: '9998',
resourceId: '21',
title: 'event 5 - Area 21 - Skill 1',
start: '2020-09-09 09:00:00',
end: '2020-09-09 11:00:00',
SkillPriority: '1',
},
{
id: '9999',
resourceId: '22',
title: 'event 2 - Area 22 - Skill 1',
start: '2020-09-09 07:00:00',
end: '2020-09-09 09:00:00',
SkillPriority: '1',
},
{
id: '10000',
resourceId: '12',
title: 'event 9 - Area 12 - Skill 1',
start: '2020-09-09 07:00:00',
end: '2020-09-09 09:00:00',
SkillPriority: '1',
},
{
id: '10001',
resourceId: '11',
title: 'event 10 - Area 11 - Skill 1',
start: '2020-09-09 06:00:00',
end: '2020-09-09 06:15:00',
SkillPriority: '1',
},
{
id: '10002',
resourceId: '11',
title: 'event 11 - Area 11 - Skill 2',
start: '2020-09-09 06:15:00',
end: '2020-09-09 06:30:00',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
{
id: '10003',
resourceId: '11',
title: 'event 12 - Area 11 - Skill 2',
start: '2020-09-09 06:00:00',
end: '2020-09-09 12:00:00',
SkillPriority: '1',
},
{
id: '10004',
resourceId: '11',
title: 'event 13 - Area 11 - Skill 1',
start: '2020-09-09 06:00:00',
end: '2020-09-09 06:30:00',
SkillPriority: '2',
backgroundColor: 'green',
borderColor: 'green',
},
];