onBeforeAutoSchedule
信息
此功能仅在 PRO 版中提供。
Description
在自动排程之前触发
onBeforeAutoSchedule: (taskId: string | number) => boolean;
Parameters
taskId- (必填)string | number - 根任务的 ID
Returns
result- (boolean) - 表示事件的默认操作是否将被触发(true)还是取消(false)
Example
gantt.attachEvent("onBeforeAutoSchedule",function(taskId){
// 在这里插入您的自定义逻辑
return true;
});
Related samples
Details
注释
此事件在 auto_scheduling 扩展中定义,因此您需要激活 auto_scheduling 插件。请在 自动排程 文章中阅读详细信息。
该事件是可阻塞的。返回 false 将取消后续处理。
Related API
- auto_scheduling
- auto_scheduling_descendant_links
- auto_scheduling_initial
- auto_scheduling_move_projects
- auto_scheduling_project_constraint
- auto_scheduling_strict
- auto_scheduling_use_progress
- findCycles
- isCircularLink
- onAfterAutoSchedule
- onAfterTaskAutoSchedule
- onBeforeTaskAutoSchedule
- onCircularLinkError
- onAutoScheduleCircularLink