27 lines
804 B
JavaScript
27 lines
804 B
JavaScript
$(document).off('click','.batch-btn').on('click', '.batch-btn', function()
|
|
{
|
|
const dtable = zui.DTable.query($(this).target);
|
|
const checkedList = dtable.$.getChecks();
|
|
if(!checkedList.length) return;
|
|
|
|
const url = $(this).data('url');
|
|
const form = new FormData();
|
|
checkedList.forEach((id) => form.append('executionIDList[]', id.replace("pid", '')));
|
|
|
|
if($(this).hasClass('ajax-btn'))
|
|
{
|
|
$.ajaxSubmit({url, data: form});
|
|
}
|
|
else
|
|
{
|
|
postAndLoadPage(url, form);
|
|
}
|
|
}).off('click', '#actionBar .export').on('click', '#actionBar .export', function()
|
|
{
|
|
const dtable = zui.DTable.query($('#table-execution-all'));
|
|
const checkedList = dtable.$.getChecks();
|
|
if(!checkedList.length) return;
|
|
|
|
$.cookie.set('checkedItem', checkedList);
|
|
});
|