log.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {extend name="public/layout" /} {block name="title"}操作日志{/block}
  2. {block name="body"}
  3. <style>
  4. html,
  5. body {
  6. display: block;
  7. /*min-width: 1100px;*/
  8. background-color: white;
  9. }
  10. .layui-fluid {
  11. padding: 15px 30px;
  12. }
  13. .layui-table thead tr,
  14. .layui-table-header {
  15. background-color: #D8E6F1 !important;
  16. }
  17. </style>
  18. <body>
  19. <div class="layui-fluid">
  20. <table id="log" lay-filter="log"></table>
  21. </div>
  22. {/block}
  23. {block name="js"}
  24. <script>
  25. layui.config({
  26. base: '__LAYUI__/',
  27. urlbase: '/sys'
  28. }).extend({
  29. index: 'lib/index' //主入口模块
  30. }).use(['index', 'table'], function () {
  31. var $ = layui.$,
  32. table = layui.table;
  33. table.render({
  34. elem: '#log',
  35. url: '{:url("operate/log", ["id"=>$id])}',
  36. page: true,
  37. height: 'full-50',
  38. cols: [
  39. [{
  40. type: 'numbers',
  41. field: 'id',
  42. fixed: 'left',
  43. title: '序号',
  44. }, {
  45. field: 'addtime',
  46. title: '操作时间',
  47. }, {
  48. field: 'ip',
  49. title: 'IP',
  50. }, {
  51. field: 'content',
  52. title: '操作内容',
  53. }]
  54. ],
  55. text: '对不起,加载出现异常!'
  56. });
  57. });
  58. </script>
  59. {/block}