analysis.blade.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @extends('admin.table_layouts')
  2. @section('content')
  3. <div class="page-content container">
  4. <x-admin.table-panel :title="trans('admin.menu.tools.analysis') . ' <small>' . trans('admin.tools.analysis.sub_title') . '</small>'" :theads="[trans('admin.tools.analysis.req_url')]">
  5. @if (Session::has('analysisErrorMsg'))
  6. <x-slot:filters>
  7. <x-alert type="danger" :message="Session::pull('analysisErrorMsg')" />
  8. </x-slot:filters>
  9. @endif
  10. <x-slot:tbody>
  11. @if (!empty($urlList))
  12. @foreach ($urlList as $url)
  13. <tr>
  14. <td> {{ $url }} </td>
  15. </tr>
  16. @endforeach
  17. @else
  18. <tr>
  19. <td colspan="1">{{ trans('admin.tools.analysis.not_enough') }}</td>
  20. </tr>
  21. @endif
  22. </x-slot:tbody>
  23. </x-admin.table-panel>
  24. </div>
  25. @endsection
  26. @push('javascript')
  27. <script>
  28. const TableDatatablesScroller = function() {
  29. const e = function() {
  30. const e = $("#analysis");
  31. e.dataTable({
  32. language: {
  33. aria: {
  34. sortAscending: ": activate to sort column ascending",
  35. sortDescending: ": activate to sort column descending"
  36. },
  37. emptyTable: "暂无数据",
  38. info: "第 _START_ 到 _END_ 条,共计 _TOTAL_ 条",
  39. infoEmpty: "未找到",
  40. infoFiltered: "(filtered1 from _MAX_ total entries)",
  41. lengthMenu: "_MENU_ entries",
  42. search: "搜索:",
  43. zeroRecords: "未找到"
  44. },
  45. buttons: [{
  46. extend: "print",
  47. className: "btn btn-outline-dark"
  48. },
  49. {
  50. extend: "pdf",
  51. className: "btn btn-outline-success"
  52. },
  53. {
  54. extend: "csv",
  55. className: "btn btn-outline-primary"
  56. }
  57. ],
  58. scrollY: 300,
  59. deferRender: !0,
  60. scroller: !0,
  61. stateSave: !0,
  62. order: [
  63. [0, "asc"]
  64. ],
  65. lengthMenu: [
  66. [10, 15, 20, -1],
  67. [10, 15, 20, "All"]
  68. ],
  69. pageLength: 20,
  70. dom: "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"
  71. });
  72. };
  73. return {
  74. init: function() {
  75. jQuery().dataTable && (e());
  76. }
  77. };
  78. }();
  79. jQuery(document).ready(function() {
  80. TableDatatablesScroller.init();
  81. });
  82. </script>
  83. @endpush