log.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. </style>
  11. <body>
  12. <div class="layui-fluid">
  13. <table id="log" lay-filter="log"></table>
  14. </div>
  15. {/block}
  16. {block name="js"}
  17. <script>
  18. layui.config({
  19. base: '__LAYUI__/',
  20. urlbase: '/sys'
  21. }).extend({
  22. index: 'lib/index' //主入口模块
  23. }).use(['index', 'table'], function () {
  24. var $ = layui.$,
  25. table = layui.table;
  26. table.render({
  27. elem: '#log',
  28. url: '{:url("operate/log", ["id"=>$id])}',
  29. page: true,
  30. cols: [
  31. [{
  32. type: 'numbers',
  33. field: 'id',
  34. fixed: 'left',
  35. title: '序号',
  36. }, {
  37. field: 'addtime',
  38. title: '操作时间',
  39. }, {
  40. field: 'ip',
  41. title: 'IP',
  42. }, {
  43. field: 'content',
  44. title: '操作内容',
  45. }]
  46. ],
  47. text: '对不起,加载出现异常!'
  48. });
  49. });
  50. </script>
  51. {/block}