browse.ui.js 638 B

123456789101112131415161718
  1. $(document).off('click', '[data-formaction]').on('click', '[data-formaction]', function () {
  2. const $this = $(this);
  3. if ($this.attr('class').indexOf('disabled') !== -1) return;
  4. const dtable = zui.DTable.query($('#auditcls'));
  5. const checkedList = dtable.$.getChecks();
  6. if (!checkedList.length) return;
  7. const postData = new FormData();
  8. checkedList.forEach((id) => postData.append('auditclIdList[]', id));
  9. if ($this.data('page') == 'batch') {
  10. postAndLoadPage($this.data('formaction'), postData);
  11. }
  12. else {
  13. $.ajaxSubmit({ "url": $this.data('formaction'), "data": postData });
  14. }
  15. });