|
|
|
@ -708,4 +708,18 @@ $(window).on('beforeunload', function(event) {
|
|
|
|
|
function sendStorage(){ |
|
|
|
|
const batchEntityData = localStorage.getItem('batchEntity'); |
|
|
|
|
window.parent.postMessage({ batchEntity: batchEntityData }, '*'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function updateLinksLag(data) { |
|
|
|
|
data.data.forEach(task => { |
|
|
|
|
data.links.forEach(link => { |
|
|
|
|
if (link.target == task.id) { |
|
|
|
|
let predecessor = data.data.find(item => item.id == link.source); |
|
|
|
|
if (predecessor) { |
|
|
|
|
let lag = gantt.calculateDuration(new Date(predecessor.end_date), new Date(task.start_date)); |
|
|
|
|
link.lag = lag; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|