FullCalendar Resource TimeLineView 中每个资源的多个营业时间
FullCalendar Multiple businesshours per resource in Resource TimeLineView
我想在 ResourceTimeLine 视图中查看多个营业时间,因此我为按资源实现了多个营业时间。例如,星期一到星期三 - 8H 到 17H 和星期四到星期五 - 15H 到 23H 对于资源,其他资源有另一个工作时间。
在 Fullcalendar 组件的文档中 (https://fullcalendar.io/docs/businessHours-per-resource) 说它可以使用数组:
businessHours: [ // specify an array instead
{
daysOfWeek: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
startTime: '08:00', // 8am
endTime: '18:00' // 6pm
},
{
daysOfWeek: [ 4, 5 ], // Thursday, Friday
startTime: '10:00', // 10am
endTime: '16:00' // 4pm
}
]
在 Outsystems 中,我将营业时间定义为一个数组,没关系,显示了正确的信息,但是当我将事件拖放到资源时,它不会调用操作来保存更改。
如果我实施单个营业时间,当我将事件拖放到资源时,它已经调用了操作并保存了更改信息。但我需要多个营业时间。我找不到这个问题的根源。你能帮帮我吗?
我的 Json 关于完整日历的外部系统组件的对象,:
"newResource":{
"id":"8547",
"title":"Adelino Silva",
"parentId":"1",
"businessHours":{
"defs":{
"0": {"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{}, "publicId":"", "ui":{"startEditable":null, "durationEditable":null, "constraints":[], "overlap":null, "allows":[], "backgroundColor":"", "borderColor":"", "textColor":"", "classNames":["fc-nonbusiness"]}, "defId":"0", "sourceId":"", "allDay":false, "hasEnd":true, "resourceIds":[], "resourceEditable":null, "recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":28800000},"endTime":{"years":0, "months":0,"days":0, "milliseconds":45000000}, "startRecur":null,"endRecur":null}, "duration":{"years":0, "months":0, "days":0, "milliseconds":16200000}}},
"1":{"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{},"publicId":"","ui":{"startEditable":null,"durationEditable":null,"constraints":[],"overlap":null,"allows":[],"backgroundColor":"","borderColor":"","textColor":"","classNames":["fc-nonbusiness"]},"defId":"1","sourceId":"","allDay":false,"hasEnd":true,"resourceIds":[],"resourceEditable":null,"recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":48600000},"endTime":{"years":0,"months":0,"days":0,"milliseconds":61200000},"startRecur":null,"endRecur":null},"duration":{"years":0,"months":0,"days":0,"milliseconds":12600000}}}
},
"instances":{}
},
下一个没有营业时间和有多个营业时间的视频示例。
我发现了问题。问题出在 CallbackEvent 结构上,不接受 Resource 的 BusinessHours 列表。
解决方案:
我为 CallbackEvent 结构创建了一个只有一个工作时间的资源结构,它起作用了。
enter image description here
我想在 ResourceTimeLine 视图中查看多个营业时间,因此我为按资源实现了多个营业时间。例如,星期一到星期三 - 8H 到 17H 和星期四到星期五 - 15H 到 23H 对于资源,其他资源有另一个工作时间。
在 Fullcalendar 组件的文档中 (https://fullcalendar.io/docs/businessHours-per-resource) 说它可以使用数组:
businessHours: [ // specify an array instead
{
daysOfWeek: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
startTime: '08:00', // 8am
endTime: '18:00' // 6pm
},
{
daysOfWeek: [ 4, 5 ], // Thursday, Friday
startTime: '10:00', // 10am
endTime: '16:00' // 4pm
}
]
在 Outsystems 中,我将营业时间定义为一个数组,没关系,显示了正确的信息,但是当我将事件拖放到资源时,它不会调用操作来保存更改。
如果我实施单个营业时间,当我将事件拖放到资源时,它已经调用了操作并保存了更改信息。但我需要多个营业时间。我找不到这个问题的根源。你能帮帮我吗?
我的 Json 关于完整日历的外部系统组件的对象,:
"newResource":{
"id":"8547",
"title":"Adelino Silva",
"parentId":"1",
"businessHours":{
"defs":{
"0": {"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{}, "publicId":"", "ui":{"startEditable":null, "durationEditable":null, "constraints":[], "overlap":null, "allows":[], "backgroundColor":"", "borderColor":"", "textColor":"", "classNames":["fc-nonbusiness"]}, "defId":"0", "sourceId":"", "allDay":false, "hasEnd":true, "resourceIds":[], "resourceEditable":null, "recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":28800000},"endTime":{"years":0, "months":0,"days":0, "milliseconds":45000000}, "startRecur":null,"endRecur":null}, "duration":{"years":0, "months":0, "days":0, "milliseconds":16200000}}},
"1":{"groupId":"_businessHours", "title":"", "url":"", "rendering":"inverse-background", "extendedProps":{},"publicId":"","ui":{"startEditable":null,"durationEditable":null,"constraints":[],"overlap":null,"allows":[],"backgroundColor":"","borderColor":"","textColor":"","classNames":["fc-nonbusiness"]},"defId":"1","sourceId":"","allDay":false,"hasEnd":true,"resourceIds":[],"resourceEditable":null,"recurringDef":{"typeId":0,"typeData":{"daysOfWeek":[1,2,3,4,5],"startTime":{"years":0,"months":0,"days":0,"milliseconds":48600000},"endTime":{"years":0,"months":0,"days":0,"milliseconds":61200000},"startRecur":null,"endRecur":null},"duration":{"years":0,"months":0,"days":0,"milliseconds":12600000}}}
},
"instances":{}
},
下一个没有营业时间和有多个营业时间的视频示例。
我发现了问题。问题出在 CallbackEvent 结构上,不接受 Resource 的 BusinessHours 列表。 解决方案: 我为 CallbackEvent 结构创建了一个只有一个工作时间的资源结构,它起作用了。
enter image description here