跳到主要内容

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

Details

注释

此事件在 auto_scheduling 扩展中定义,因此您需要激活 auto_scheduling 插件。请在 自动排程 文章中阅读详细信息。

该事件是可阻塞的。返回 false 将取消后续处理。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.