export.excel.html.hook.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace zin;
  3. $type = data('type');
  4. $executionID = data('executionID');
  5. $orderBy = data('orderBy');
  6. ?>
  7. <?php if($type == 'group'):?>
  8. <script>
  9. $(function()
  10. {
  11. $('#exportPanel .form-group, #exportPanel .form-row').addClass('hidden');
  12. $('#exportPanel .form-group[data-name=fileName], #exportPanel .form-row:last-child').removeClass('hidden');
  13. $('#exportPanel .form-group[data-name=fileType]').remove();
  14. $('#exportPanel .form-actions').after("<input type='hidden' name='fileType' value='<?php echo $type;?>' />");
  15. $('#exportPanel .form-actions').after("<input type='hidden' name='executionID' value='<?php echo $executionID;?>' />");
  16. $('#exportPanel .form-actions').after("<input type='hidden' name='orderBy' value='<?php echo $orderBy;?>' />");
  17. })
  18. </script>
  19. <?php endif;?>
  20. <?php if($type == 'tree'):?>
  21. <?php
  22. $radioHtml = <<<EOT
  23. <div class="check-list-inline ml-4">
  24. <div class="radio-primary">
  25. <input type="radio" id="excel0" name="excel" checked value="0">
  26. <label for="excel0">word</label>
  27. </div>
  28. <div class="radio-primary">
  29. <input type="radio" id="excelexcel" name="excel" value="excel">
  30. <label for="excelexcel">excel</label>
  31. </div>
  32. </div>
  33. EOT;
  34. ?>
  35. <script>
  36. $(function()
  37. {
  38. $('#exportPanel .form-group[data-name=fileType]').remove();
  39. $('#exportPanel .form-actions').after("<input type='hidden' name='fileType' value='<?php echo $type;?>' />");
  40. $('#exportPanel .form-group, #exportPanel .form-row').addClass('hidden');
  41. $('#exportPanel .form-group[data-name=fileName], #exportPanel .form-row:last-child').removeClass('hidden');
  42. $('#exportPanel .form-group[data-name=fileName] [name=fileName]').addClass('w-2/3');
  43. $('#exportPanel .form-group[data-name=fileName]').append(<?php echo json_encode($radioHtml);?>);
  44. })
  45. </script>
  46. <?php endif;?>