report.ui.js 911 B

12345678910111213141516171819202122232425262728293031323334353637
  1. window.selectAll = function(e)
  2. {
  3. let allChecked = true;
  4. $('input[name=charts]').each(function()
  5. {
  6. if(!$(this).prop('checked')) allChecked = false;
  7. });
  8. $('input[name=charts]').each(function()
  9. {
  10. $(this).prop('checked', !allChecked);
  11. });
  12. };
  13. window.clickInit = function(e)
  14. {
  15. initReport();
  16. };
  17. window.handleShowReportTab = (event) =>
  18. {
  19. $(event.target).find('[data-zui-echarts]').each(function()
  20. {
  21. const echart = $(this).zui();
  22. if(echart) echart.chart.resize();
  23. });
  24. };
  25. function initReport()
  26. {
  27. const chartType = $('a[data-toggle=tab].active').data('param');
  28. const form = new FormData();
  29. $('input[name=charts]').each(function()
  30. {
  31. if($(this).prop('checked')) form.append('charts[]', $(this).val());
  32. })
  33. postAndLoadPage($.createLink('bug', 'report', params + '&chartType=' + chartType), form, '#report');
  34. }