log_list.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>日志列表</title>
  7. <style>
  8. </style>
  9. </head>
  10. <body layout:fragment="content">
  11. <nav class="breadcrumb">
  12. <i class="Hui-iconfont">&#xe67f;</i>
  13. 首页
  14. <span class="c-gray en">&gt;</span>系统管理
  15. <span class="c-gray en">&gt;</span>日志管理
  16. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
  17. <i class="Hui-iconfont">&#xe68f;</i>
  18. </a>
  19. </nav>
  20. <form id="myForm" th:action="@{/admin/log/list}" th:method="get">
  21. <div class="page-container">
  22. <div class="text-c">
  23. <label class="conditionLabel">姓名:</label>
  24. <input type="text" class="input-text" style="width:200px" placeholder="请输入用户名" name="username" th:value="${username}"/>
  25. <label> 操作时间:</label>
  26. <input type="text" class="input-text" style="width:150px" id="startTime" name="startTime" th:value="${startTime}"/>
  27. <label> - </label>
  28. <input type="text" class="input-text" style="width:150px" th:id="endTime" th:name="endTime" th:value="${endTime}"/>
  29. <button type="submit" class="btn btn-primary">
  30. 搜索
  31. </button>
  32. </div>
  33. <div class="cl pd-5 bg-1 bk-gray mt-20">
  34. <span class="l">
  35. <a onClick="log_del('/admin/log/deleteBatch')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 删除</a>
  36. </span>
  37. <span class="r" >共有数据:<strong th:text="${pageInfo.total}" id="total">54</strong> 条</span>
  38. </div>
  39. <table class="table table-border table-bordered table-bg table-hover">
  40. <thead>
  41. <tr class="text-c">
  42. <th width="25"><input type="checkbox" name="" value=""/></th>
  43. <!-- <th>日志类型</th> -->
  44. <th>姓名</th>
  45. <th>操作</th>
  46. <th>操作时间</th>
  47. <th>用户IP</th>
  48. <!-- <th width="150">操作</th> -->
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
  53. <td><input type="checkbox" th:value="*{id}" th:id="${iterStat.index+1}" name="id"/></td>
  54. <!-- <td class="td-status">
  55. <span class="label radius" th:unless="*{logType==0}">异常日志</span>
  56. <span class="label radius label-success" th:if="*{logType==0}">操作日志</span>
  57. </td> -->
  58. <td th:text="*{username}"></td>
  59. <td th:text="*{operation}"></td>
  60. <td th:text="*{create_time}"></td>
  61. <td th:text="*{requestIp}"></td>
  62. <!-- <td class="td-manage">
  63. <a title="详情" th:onclick="'javascript:user_dialog(\'详情\',\'/admin/user/check/'+*{id}+'\',\'800\',\'500\');'" class="ml-5" style="text-decoration:none">详情</a>
  64. </td> -->
  65. </tr>
  66. </tbody>
  67. </table>
  68. <div th:replace="admin/common/page :: page"></div>
  69. </div>
  70. </form>
  71. <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
  72. <script th:inline="javascript">
  73. laydate.render({
  74. elem: '#startTime', //指定元素
  75. format: 'yyyy-MM-dd HH:mm:ss',
  76. type: 'datetime'
  77. });
  78. laydate.render({
  79. elem: '#endTime', //指定元素
  80. format: 'yyyy-MM-dd HH:mm:ss',
  81. type: 'datetime'
  82. });
  83. /*管理员-删除*/
  84. function log_del(url) {
  85. var ids = '';
  86. var obj = $("input[name='id']:checked");
  87. if (obj.length == 0) {
  88. errorMessage("请选择记录!");
  89. return false;
  90. }
  91. obj.each(function (index, item) {
  92. //ids.push(item.value);
  93. ids=ids+item.value+",";
  94. });
  95. ids=ids.substring(0,ids.length-1);
  96. layer.confirm('确认要删除吗?', function (index) {
  97. //此处请求后台程序,下方是成功后的前台处理……
  98. $.ajax({
  99. type: "Put",
  100. dataType: "json",
  101. url: pagePath+url,
  102. data: {
  103. "timestamp": new Date().getTime(),
  104. "ids": ids
  105. },
  106. success: function (result) {
  107. if (result.success) {
  108. smileMessage(result.message)
  109. setTime();
  110. } else {
  111. errorMessage(result.message);
  112. }
  113. },
  114. error: function () {
  115. errorMessage('系统错误!');
  116. }
  117. });
  118. });
  119. }
  120. </script>
  121. </body>
  122. </html>