|
|
@ -367,6 +367,32 @@ function setGanttOpen() { |
|
|
|
localStorage.setItem('ganttOpen', JSON.stringify(ganttOpen)); |
|
|
|
localStorage.setItem('ganttOpen', JSON.stringify(ganttOpen)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function compareData(data){ |
|
|
|
|
|
|
|
expandTask(); |
|
|
|
|
|
|
|
var allTasks = []; |
|
|
|
|
|
|
|
var taskCount = gantt.getTaskCount(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < taskCount; i++) { |
|
|
|
|
|
|
|
var task = gantt.getTaskByIndex(i); |
|
|
|
|
|
|
|
allTasks.push(task); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
allTasks.forEach((task, index) => { |
|
|
|
|
|
|
|
if (task.start_date != data.data[index].start_date) { |
|
|
|
|
|
|
|
gantt.getTask(task.id).start_date = task.start_date; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (task.end_date != data.data[index].end_date) { |
|
|
|
|
|
|
|
gantt.getTask(task.id).end_date = task.end_date; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (task.planned_start != data.data[index].planned_start) { |
|
|
|
|
|
|
|
gantt.getTask(task.id).planned_start = task.planned_start; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (task.planned_end != data.data[index].planned_end) { |
|
|
|
|
|
|
|
gantt.getTask(task.id).planned_end = task.planned_end; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
gantt.updateTask(task.id); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getGanttOpen() { |
|
|
|
function getGanttOpen() { |
|
|
|
let ganttOpen = localStorage.getItem('ganttOpen'); |
|
|
|
let ganttOpen = localStorage.getItem('ganttOpen'); |
|
|
|
if (ganttOpen) { |
|
|
|
if (ganttOpen) { |
|
|
|