gantt悬浮时间显示

This commit is contained in:
shijing 2024-01-19 11:17:50 +08:00
parent 3a3d89d127
commit b2343d5438
1 changed files with 3 additions and 1 deletions

View File

@ -62,12 +62,14 @@ export default {
];
gantt.attachEvent('onGanttReady', function () {
gantt.templates.tooltip_text = function (start, end, task) {
let endTime = end.getTime()-24*60*60*1000;
let end_date = new Date(endTime);
return task.number +
'<br/>任务量:' + task.count +
'<br/>当日产量:' + task.count_real +
'<br/>合格数:' + task.count_ok +
'<br/>开工时间:' + gantt.templates.tooltip_date_format(start) +
'<br/>完工时间:' + gantt.templates.tooltip_date_format(start);
'<br/>完工时间:' + gantt.templates.tooltip_date_format(end_date);
};
});
gantt.attachEvent("onTaskClick", async function(id, e) {