diff --git a/src/components/GanttComponent.vue b/src/components/GanttComponent.vue index 9923a81d..587b7f6f 100644 --- a/src/components/GanttComponent.vue +++ b/src/components/GanttComponent.vue @@ -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 + '
任务量:' + task.count + '
当日产量:' + task.count_real + '
合格数:' + task.count_ok + '
开工时间:' + gantt.templates.tooltip_date_format(start) + - '
完工时间:' + gantt.templates.tooltip_date_format(start); + '
完工时间:' + gantt.templates.tooltip_date_format(end_date); }; }); gantt.attachEvent("onTaskClick", async function(id, e) {