gantt悬浮时间显示
This commit is contained in:
parent
3a3d89d127
commit
b2343d5438
|
|
@ -62,12 +62,14 @@ export default {
|
||||||
];
|
];
|
||||||
gantt.attachEvent('onGanttReady', function () {
|
gantt.attachEvent('onGanttReady', function () {
|
||||||
gantt.templates.tooltip_text = function (start, end, task) {
|
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 +
|
return task.number +
|
||||||
'<br/>任务量:' + task.count +
|
'<br/>任务量:' + task.count +
|
||||||
'<br/>当日产量:' + task.count_real +
|
'<br/>当日产量:' + task.count_real +
|
||||||
'<br/>合格数:' + task.count_ok +
|
'<br/>合格数:' + task.count_ok +
|
||||||
'<br/>开工时间:' + gantt.templates.tooltip_date_format(start) +
|
'<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) {
|
gantt.attachEvent("onTaskClick", async function(id, e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue