|
|
|
@ -22,6 +22,32 @@ gantt.ajax.get({
|
|
|
|
|
gantt.silent(function () { |
|
|
|
|
gantt.parse(data); |
|
|
|
|
}); |
|
|
|
|
if (Date.now() < timestamp) { |
|
|
|
|
expandTask(); |
|
|
|
|
var allTasks = []; |
|
|
|
|
var taskCount = gantt.getTaskCount(); |
|
|
|
|
|
|
|
|
|
for (var i = 0; i < taskCount; i++) { |
|
|
|
|
var task = gantt.getTaskByIndex(i); |
|
|
|
|
allTasks.push(task); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gantt.ajax.post({ |
|
|
|
|
headers: { |
|
|
|
|
"Content-Type": "application/json", |
|
|
|
|
"Authorization": `Bearer ${token}` |
|
|
|
|
}, |
|
|
|
|
url: `${base_url}activity/import-update`, |
|
|
|
|
dataType: "json", |
|
|
|
|
data: JSON.stringify(allTasks) |
|
|
|
|
}).then(function(response){ |
|
|
|
|
let res = response.responseText |
|
|
|
|
res = JSON.parse(res) |
|
|
|
|
if (res) { |
|
|
|
|
refresData(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function refresData(id){ |
|
|
|
|