* code for task #78910.

This commit is contained in:
wangyidong
2022-12-07 10:58:26 +08:00
parent 595ec286b6
commit 1119afb709
@@ -86,12 +86,12 @@
minTimeGap = Math.min(minTimeGap, endDatetime - startDatetime);
item.tasks = [];
item.completeTasks = [];
item.progress = 0;
item.progress = Number.parseFloat(item.taskProgress.replace('%', ''), 10);
plans.push(item);
}
else if(item.type === 'task')
{
item.progress = Number.parseInt(item.taskProgress.replace('%', ''), 10);
item.progress = Number.parseFloat(item.taskProgress.replace('%', ''), 10);
tasks.push(item);
}
});
@@ -105,7 +105,6 @@
plan = plansMap[plan.parent];
if(typeof(plan) != 'object') return;
}
plan.progress += task.progress;
if(task.progress === 100) plan.completeTasks.push(task);
plan.tasks.push(task);
});
@@ -122,7 +121,6 @@
/* Update gantt plans and bars */
$.each(plans, function(index, plan)
{
plan.progress = !plan.tasks.length ? 0 : plan.progress / plan.tasks.length;
var $plan = $('<div class="gantt-plan"></div>');
$plan.append('<div class="strong" title="' + plan.name + '">' + plan.text + '</div>');
$plans.append($plan);