index_search.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <fieldset>
  2. <legend>条件搜索</legend>
  3. <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
  4. <div class="layui-form-item layui-inline">
  5. <label class="layui-form-label">操作账号</label>
  6. <label class="layui-input-inline">
  7. <input name="username" value="{:input('get.username')}" placeholder="请输入操作账号" class="layui-input">
  8. </label>
  9. </div>
  10. <div class="layui-form-item layui-inline">
  11. <label class="layui-form-label">操作节点</label>
  12. <label class="layui-input-inline">
  13. <input name="node" value="{:input('get.node')}" placeholder="请输入操作节点" class="layui-input">
  14. </label>
  15. </div>
  16. <div class="layui-form-item layui-inline">
  17. <label class="layui-form-label">操作行为</label>
  18. <div class="layui-input-inline">
  19. <select name="action" lay-search class="layui-select">
  20. <option value=''>-- 全部日志 --</option>
  21. {foreach $actions as $action}{if $action eq input('get.action')}
  22. <option selected value="{$action}">{$action}</option>
  23. {else}
  24. <option value="{$action}">{$action}</option>
  25. {/if}{/foreach}
  26. </select>
  27. </div>
  28. </div>
  29. <div class="layui-form-item layui-inline">
  30. <label class="layui-form-label">操作描述</label>
  31. <label class="layui-input-inline">
  32. <input name="content" value="{:input('get.content')}" placeholder="请输入操作内容" class="layui-input">
  33. </label>
  34. </div>
  35. <div class="layui-form-item layui-inline">
  36. <label class="layui-form-label">位置地址</label>
  37. <label class="layui-input-inline">
  38. <input name="geoip" value="{:input('get.geoip')}" placeholder="请输入位置地址" class="layui-input">
  39. </label>
  40. </div>
  41. <div class="layui-form-item layui-inline">
  42. <label class="layui-form-label">操作时间</label>
  43. <label class="layui-input-inline">
  44. <input data-date-range name="create_at" value="{:input('get.create_at')}" placeholder="请选择操作时间" class="layui-input">
  45. </label>
  46. </div>
  47. <div class="layui-form-item layui-inline">
  48. <button type="submit" class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
  49. <button type="button" data-form-export="{:url('index')}?type={$type|default=''}" class="layui-btn layui-btn-primary">
  50. <i class="layui-icon layui-icon-export"></i> 导 出
  51. </button>
  52. </div>
  53. </form>
  54. </fieldset>
  55. <script>
  56. window.form.render();
  57. require(['excel'], function (excel) {
  58. excel.bind(function (data) {
  59. data.forEach(function (item, index) {
  60. data[index] = [item.username, item.node, item.geoip, item.isp, item.action, item.create_at];
  61. });
  62. data.unshift(['操作账号', '访问节点', '访问IP地址', '访问地理区域', '访问操作', '操作时间']);
  63. return data;
  64. }, '操作日志');
  65. });
  66. </script>