【发布时间】:2020-04-24 16:43:24
【问题描述】:
在 DHTMLX 甘特图中
我需要在左侧面板中显示所有层次结构任务,例如
- 父母
1.1 子父
1.1.1 任务
但是右侧面板我只需要显示子任务,而不是父子任务。
参考链接:https://dhtmlx.com/docs/products/dhtmlxGantt/02_features.html
需要: 1. 我需要隐藏战略定义和获取/创建...仅右侧蓝色条。
【问题讨论】:
在 DHTMLX 甘特图中
我需要在左侧面板中显示所有层次结构任务,例如
但是右侧面板我只需要显示子任务,而不是父子任务。
参考链接:https://dhtmlx.com/docs/products/dhtmlxGantt/02_features.html
需要: 1. 我需要隐藏战略定义和获取/创建...仅右侧蓝色条。
【问题讨论】:
请使用task_class template 指定将应用于有子任务栏以隐藏它们的 CSS 类
和getChildren方法检查目标任务是否有一级子任务:
gantt.templates.task_class = function(start, end, task){
var children = gantt.getChildren(task.id);
if(children.length)
return "hideTask";
return "";
};
CSS:
.hideTask{visibility: hidden;}
【讨论】: