index.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {extend name="../../base/view/common/base" /}
  2. <!-- 主体 -->
  3. {block name="body"}
  4. <div class="p-page">
  5. <form class="layui-form gg-form-bar border-t border-x">
  6. <div class="layui-input-inline" style="width:120px;">
  7. <select name="action">
  8. <option value="">请选择类型</option>
  9. {volist name="$type_action" id="vo"}
  10. <option value="{$vo}">{$vo}</option>
  11. {/volist}
  12. </select>
  13. </div>
  14. <div class="layui-input-inline" style="width:300px;">
  15. <input type="text" name="keywords" placeholder="昵称/操作数据id" class="layui-input" autocomplete="off" />
  16. </div>
  17. <div class="layui-input-inline" style="width:150px;">
  18. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
  19. <button type="reset" class="layui-btn layui-btn-reset" lay-filter="reset">清空</button>
  20. </div>
  21. </form>
  22. <table class="layui-hide" id="log" lay-filter="log"></table>
  23. </div>
  24. {/block}
  25. <!-- /主体 -->
  26. <!-- 脚本 -->
  27. {block name="script"}
  28. <script>
  29. const moduleInit = ['tool'];
  30. function gouguInit() {
  31. var table = layui.table, form = layui.form;
  32. var tableIns = table.render({
  33. elem: '#log',
  34. title: '操作日志列表',
  35. url: "/home/log/index", //数据接口
  36. page: true, //开启分页
  37. limit: 20,
  38. height: 'full-114',
  39. cols: [
  40. [ //表头
  41. {
  42. field: 'id',
  43. title: 'ID号',
  44. align: 'center',
  45. width: 90
  46. }, {
  47. field: 'action',
  48. title: '操作',
  49. align: 'center',
  50. width: 80
  51. }, {
  52. field: 'content',
  53. title: '操作描述',
  54. width: 200
  55. }, {
  56. field: 'param_id',
  57. title: '操作数据ID',
  58. align: 'center',
  59. width: 100
  60. },{
  61. field: 'param',
  62. title: '操作详细数据信息',
  63. }, {
  64. field: 'ip',
  65. title: 'IP地址',
  66. align: 'center',
  67. width: 130
  68. }, {
  69. field: 'create_time',
  70. title: '操作时间',
  71. fixed: 'right',
  72. align: 'center',
  73. width: 160
  74. }
  75. ]
  76. ]
  77. });
  78. //监听搜索提交
  79. form.on('submit(webform)', function (data) {
  80. tableIns.reload({
  81. where: data.field,
  82. page: {
  83. curr: 1
  84. }
  85. });
  86. return false;
  87. });
  88. }
  89. </script>
  90. {/block}
  91. <!-- /脚本 -->