|
|
|
@ -355,6 +355,37 @@ function initializationColumn()
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setGanttOpen(){ |
|
|
|
|
let ganttOpen = []; |
|
|
|
|
gantt.eachTask(function (task) { |
|
|
|
|
const existingIndex = ganttOpen.findIndex(item => item.id === task.id); |
|
|
|
|
if (existingIndex !== -1) { |
|
|
|
|
ganttOpen[existingIndex].open = task.$open; |
|
|
|
|
} else { |
|
|
|
|
ganttOpen.push({ |
|
|
|
|
"id": task.id, |
|
|
|
|
"open": task.$open |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
localStorage.setItem('ganttOpen', JSON.stringify(ganttOpen)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getGanttOpen(){ |
|
|
|
|
let ganttOpen = localStorage.getItem('ganttOpen'); |
|
|
|
|
if (ganttOpen) { |
|
|
|
|
// Parse the stored data into a JavaScript object
|
|
|
|
|
ganttOpen = JSON.parse(ganttOpen); |
|
|
|
|
gantt.eachTask(function (task) { |
|
|
|
|
const index = ganttOpen.findIndex(item => item.id == task.id); |
|
|
|
|
if (index !== -1) { |
|
|
|
|
task.$open = ganttOpen[index].open; |
|
|
|
|
} else { |
|
|
|
|
task.$open = false;
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(document).ready(function () { |
|
|
|
|
$("#critalPathBox").on("change", function (){ |
|
|
|
|