借助此链接,我已经在我的angularjs
应用程序中注入了DHtmlX
调度程序。我已经按照上述链接的所有步骤进行操作,它正在工作。
现在,我正在尝试在角度DHtmlX
调度器中添加时间线事件。但是我不明白如何在上面添加时间线事件。请帮忙解决这个问题。
任何建议或帮助将不胜感激,提前感谢
我有办法在angularjs的DHtmlX调度程序上添加时间线事件,
首先将此 js 文件dhtmlxscheduler_timeline.js添加到您的 angularjs 项目中。(将其添加到 src/assets/js 文件夹中并调用此文件)
第二次将此代码添加到"dhxScheduler"指令中`
var sections=[
{key:1, label:"Section A"},
{key:2, label:"Section B"}
];
scheduler.createTimelineView({
name: "timeline",
x_unit:"minute",//measuring unit of the X-Axis.
x_date:"%H:%i", //date format of the X-Axis
x_step:30, //X-Axis step in 'x_unit's
x_size:24, //X-Axis length specified as the total number of 'x_step's
x_start:0, //X-Axis offset in 'x_unit's
x_length:48,
first_hour:10,
last_hour:18,
y_unit: sections,
y_property:"unit_id",
render:"bar"
});
//--------------- end of timeline -----------//
scheduler.init($element[0], $scope.scheduler.date, $scope.scheduler.mode);
scheduler.parse([
{id:1, text:"Task1", start_date:"12/10/2013 12:00", end_date:"12/10/2013 21:00",
unit_id:"1"},
{id:2, text:"Task2", start_date:"17/10/2013 09:00", end_date:"17/10/2013 15:00",
unit_id:"2"}
],"json");`
有关此内容的更多详细信息,请访问以下两个链接1) 链接12) 链接2
第三行添加到视图文件(html文件)
<div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>
第四行添加到"dhxTemplate"指令中
scheduler.locale.labels.timeline_tab ="Timeline";
这对我有用,希望这也对你们有用,谢谢