index.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {extend name='main'}
  2. {block name="button"}
  3. <!--{if auth("clear")}-->
  4. <button data-load='{:url("clear")}' data-confirm="确定要清理所有记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>清理所有日志</button>
  5. <!--{/if}-->
  6. <!--{if auth("remove")}-->
  7. <button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些记录吗?" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除日志</button>
  8. <!--{/if}-->
  9. {/block}
  10. {block name="content"}
  11. <div class="think-box-shadow table-block">
  12. {include file='oplog/index_search'}
  13. <table class="layui-table margin-top-10" lay-skin="line">
  14. {notempty name='list'}
  15. <thead>
  16. <tr>
  17. <th class='list-table-check-td think-checkbox'>
  18. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  19. </th>
  20. <th class='text-left nowrap'>操作权限</th>
  21. <th class='text-left nowrap'>操作行为</th>
  22. <th class='text-left nowrap'>地理位置</th>
  23. <th class='text-left nowrap'>操作时间</th>
  24. <th></th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. {foreach $list as $key=>$vo}
  29. <tr>
  30. <td class='list-table-check-td think-checkbox'>
  31. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  32. </td>
  33. <td class="text-left nowrap">
  34. 操作账号:<span class="font-w7">{$vo.username|default='-'}</span><br>
  35. 操作节点:<span class="color-desc">{$vo.node|default='-'}</span>
  36. </td>
  37. <td class='text-left nowrap padding-row-0 padding-right-0'>
  38. <p class="color-text layui-elip">{$vo.action|default='-'}</p>
  39. <span class="color-desc">{$vo.content|default='-'}</span>
  40. </td>
  41. <td class='text-left nowrap'>
  42. <p class="color-text">{$vo.geoip|default='-'}</p>
  43. <p class="color-desc">{$vo.isp|default='-'}</p>
  44. </td>
  45. <td class='text-left nowrap'>
  46. 日期:{$vo.create_at|format_datetime|str_replace=' ','<br><span class="color-desc">时间:',###|raw}</span>
  47. </td>
  48. <td class='text-left nowrap'>
  49. <!--{if auth("remove")}-->
  50. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该日志吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
  51. <!--{/if}-->
  52. </td>
  53. </tr>
  54. {/foreach}
  55. </tbody>
  56. {/notempty}
  57. </table>
  58. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  59. </div>
  60. {/block}
  61. {block name='script'}
  62. <script>
  63. (function (layers) {
  64. $('body').off('click', '[data-tips-desc]').on('click', '[data-tips-desc]', function () {
  65. return layers.push(layer.tips($(this).find('textarea').html(), this, {tips: 3, time: 0, maxWidth: 500})), false;
  66. }).off('click', '.layui-body').on('click', '.layui-body', function () {
  67. layers.forEach(function (value, index) {
  68. layer.close(value), delete layers[index];
  69. });
  70. });
  71. $(window).on('hashchange', function () {
  72. layers.forEach(function (value, index) {
  73. layer.close(value), delete layers[index];
  74. });
  75. });
  76. })([]);
  77. </script>
  78. {/block}