datastat.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <head>
  2. <link rel="stylesheet" href="/static/css/common.css"/>
  3. <link rel="stylesheet" href="/static/layui/css/layui.css" media="all"/>
  4. <script type="text/javascript" src="/static/layui/layui.js"></script>
  5. <script type="text/javascript" src="/static/js/jquery.min.js"></script>
  6. <script type="text/javascript" src="/static/js/template.js"></script>
  7. <style type="text/css">
  8. .layout_dialog {
  9. background: linear-gradient(39deg, #081531 0%, #233d76 100%);
  10. overflow: hidden;
  11. outline: 0;
  12. border-radius: 2px;
  13. position: fixed !important;
  14. z-index: 10000;
  15. color: #B9E3FF;
  16. border: 1px solid #62A9FF;
  17. display: none;
  18. left: 50%;
  19. top: 50%;
  20. }
  21. .layout_close {
  22. background-image: url(/static/images/btn_close.png);
  23. width: 14px;
  24. height: 14px;
  25. float: right;
  26. background-repeat: no-repeat;
  27. margin: 12px 15px 0 0;
  28. cursor: pointer;
  29. }
  30. .person_info_title {
  31. float: left;
  32. width: 100%;
  33. height: 3rem;
  34. line-height: 3rem;
  35. background-color: rgb(29, 38, 71);
  36. text-align: center;
  37. color: #fff;
  38. letter-spacing: 1px;
  39. font-size: 1rem;
  40. }
  41. .clearn {
  42. background: #000000 !important;
  43. opacity: 0.7;
  44. width: 100%;
  45. height: 100%;
  46. z-index: 102;
  47. position: absolute;
  48. left: 0;
  49. top: 0;
  50. line-height: 0;
  51. font-size: 0;
  52. overflow: hidden;
  53. display: none;
  54. }
  55. </style>
  56. </head>
  57. <div class="layui-form" lay-filter="example" style="margin:20px auto 0 auto;width:93%;" id="add_container">
  58. <div class="layui-row" style="background-color: #f2f2f2;">
  59. <table id="otherdata" lay-filter="otherdata" style="width: 100%;text-align: center;line-height: 2.5rem;">
  60. <thead style="font-weight: bold;font-size: 1rem;color: #aa8989;border-bottom: 1px solid #e1d4d4;">
  61. <tr><td width="20%">用户名</td><td width="10%">操作IP</td><td width="10%">操作类型</td><td width="20%">事件类型</td><td width="30%">操作时间</td><td width="10%">操作次数</td></tr>
  62. </thead>
  63. <tbody style="color: #999;background-color: #fdfafa;line-height: 1.5rem;">
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. <script type="text/html" id="data_tpl">
  69. {{each data}}
  70. <tr>
  71. <td>{{$value.staff}}</td><td>{{$value.ip}}</td><td>{{$value.logtypename}}</td><td>{{$value.eventtypename}}</td><td>{{$value.dt}}</td><td>{{$value.num}}</td>
  72. </tr>
  73. {{/each}}
  74. </script>
  75. <script type="text/javascript">
  76. $(document).ready(function () {
  77. var startdate=parent.$("#text_startdate").val();
  78. var enddate=parent.$("#text_startdate").val();
  79. layui.use(['layer', 'form'], function () {
  80. parent.$.getJSON("/api/log/datastat",{"startdate":startdate,"enddate":enddate},function(jsodnata){
  81. if(jsodnata.code!=0){
  82. layer.msg(jsodnata.msg);
  83. return;
  84. }
  85. $("#otherdata>tbody").html(template('data_tpl',jsodnata));
  86. });
  87. });
  88. });
  89. </script>