<template>
<ejs-gantt id="gantt"
//...
@endEdit="endEdit" >
</ejs-gantt>
</template>
<script>
//...
methods: {
//...
endEdit(args){
console.log('triggered')
}
},
</script> |
onActionComplete(args)
{
//…….
if (args.type === 'save') {
//…….
EXAMPLE_DATA.push(args.data.taskData);
this.data = cloneDeep(EXAMPLE_DATA);
}
//…….
} |
[ganttChart.vue]
//...
data() {
return {
dataSource: new DataManager({
url: 'http://localhost:7777/GanttEJ2/getData',
crossDomain: true
}) ;
//...
Method: {
onActionComplete: function (args) {
if (args.action == "add”) {
$.ajax({
type: "POST",
url: 'http://localhost:7777/GanttEJ2/addData
data: args.data.taskData,
//...
});
}
if (args.action == "DialogEditing" || args.action == "CellEditing") {
$.ajax({
type: "POST",
url: 'http://localhost:7777/GanttEJ2/updateData
data: args.data.taskData,
//...
});
}
if (args.action == "delete") {
$.ajax({
type: "POST",
url: 'http://localhost:7777/GanttEJ2/deleteData
data: args.data.taskData,
//...
});
}
}
}); |