* [perf story #59018] ajax response gantt drag event for validateResources function for gantt wg.

This commit is contained in:
wangyidong
2024-07-15 10:04:18 +08:00
committed by 谢杞钰
parent d319d3fda6
commit 12af4f5fb8
+21 -1
View File
@@ -304,6 +304,26 @@ function validateResources(id)
if(type == 'task') itemID = task.id.split("-")[1];
if(type == 'plan') itemID = task.id;
if(type == 'point') itemID = task.id.split("-")[2];
let postData = {
'id' : itemID,
'startDate' : from.toLocaleDateString('en-CA'),
'endDate' : to.toLocaleDateString('en-CA'),
'type' : type
};
$.ajax({
url: $.createLink('programplan', 'ajaxResponseGanttDragEvent'),
dataType: "json",
async: false,
data: postData,
type: "post",
success: function(response)
{
if(response.result == 'fail' && response.message)
{
zui.Messager.show({content: response.message, type: 'danger-outline', icon: 'exclamation-sign'});
flag = false;
}
}
});
return flag;
}