detail.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="keywords" content="">
  8. <meta name="description" content="">
  9. <title></title>
  10. <link rel="stylesheet" href="../../../component/pear/css/pear.css">
  11. <style>
  12. input {border: 0; background: none;width: 100%;}
  13. .layui-table th {background-color: #F9F9F9;}
  14. </style>
  15. </head>
  16. <body>
  17. <form class="layui-form" lay-filter="edit">
  18. <input type="hidden" name="id">
  19. <div class="mainBox">
  20. <div class="main-container">
  21. <div class="main-container">
  22. <table class="layui-table" style="table-layout:fixed;">
  23. <tr>
  24. <th colspan="1">
  25. 操作模块
  26. </th>
  27. <td colspan="2">
  28. <input type="text" name="title" disabled
  29. placeholder="" autocomplete="off" >
  30. </td>
  31. <th colspan="1">
  32. 操作类型
  33. </th>
  34. <td colspan="2">
  35. <input type="text" name="operationType" disabled
  36. placeholder="" autocomplete="off" >
  37. </td>
  38. </tr>
  39. <tr>
  40. <th colspan="1">
  41. 操作状态
  42. </th>
  43. <td colspan="2">
  44. <input type="text" name="status" disabled
  45. placeholder="" autocomplete="off" >
  46. </td>
  47. <th colspan="1">
  48. 消耗时间
  49. </th>
  50. <td colspan="2">
  51. <input type="text" name="useTime" disabled
  52. placeholder="" autocomplete="off" >
  53. </td>
  54. </tr>
  55. <tr>
  56. <th colspan="1">
  57. 请求方式
  58. </th>
  59. <td colspan="2">
  60. <input type="text" name="httpMethod" disabled
  61. placeholder="" autocomplete="off" >
  62. </td>
  63. <th colspan="1">
  64. 登录地址
  65. </th>
  66. <td colspan="2">
  67. <input type="text" name="remoteAddr" disabled
  68. placeholder="" autocomplete="off" >
  69. </td>
  70. </tr>
  71. <tr>
  72. <th colspan="1">
  73. 操作人员
  74. </th>
  75. <td colspan="2">
  76. <input type="text" name="username" disabled
  77. placeholder="" autocomplete="off" >
  78. </td>
  79. <th colspan="1">
  80. 操作时间
  81. </th>
  82. <td colspan="2">
  83. <input type="text" name="createTime" disabled
  84. placeholder="" autocomplete="off" >
  85. </td>
  86. </tr>
  87. <tr>
  88. <th colspan="1">
  89. 浏览器
  90. </th>
  91. <td colspan="5">
  92. <input type="text" name="browser" disabled
  93. placeholder="" autocomplete="off" >
  94. </td>
  95. </tr>
  96. <tr>
  97. <th colspan="1">
  98. 登录地区
  99. </th>
  100. <td colspan="5">
  101. <div id="area"></div>
  102. </td>
  103. </tr>
  104. <tr>
  105. <th colspan="1">
  106. 请求地址
  107. </th>
  108. <td colspan="5">
  109. <input type="text" name="requestUri" disabled
  110. placeholder="" autocomplete="off" >
  111. </td>
  112. </tr>
  113. <tr>
  114. <th colspan="1">
  115. 请求方法
  116. </th>
  117. <td colspan="5">
  118. <input type="text" name="classMethod" disabled
  119. placeholder="" autocomplete="off">
  120. </td>
  121. </tr>
  122. <tr>
  123. <th colspan="1">
  124. 请求参数
  125. </th>
  126. <td colspan="5">
  127. <pre id="queryParams"></pre>
  128. </td>
  129. </tr>
  130. <tr>
  131. <th colspan="1">
  132. 返回内容
  133. </th>
  134. <td colspan="5">
  135. <pre id="response"></pre>
  136. </td>
  137. </tr>
  138. <tr>
  139. <th colspan="1">
  140. 异常信息
  141. </th>
  142. <td colspan="5">
  143. <div id="exception"></div>
  144. </td>
  145. </tr>
  146. </table>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="bottom">
  151. <div class="button-container">
  152. <button type="button" class="pear-btn pear-btn-primary"
  153. onclick="parent.layer.closeAll();">关 闭</button>
  154. </div>
  155. </div>
  156. </form>
  157. <script src="../../../component/js/jquery.min.js"></script>
  158. <script src="../../../component/layui/layui.js"></script>
  159. <script src="../../../component/pear/pear.js"></script>
  160. <script>
  161. layui.use(['json', 'request', 'form'], function () {
  162. var request = layui.request,
  163. form = layui.form;
  164. var MODULE_PATH = '/system/log/v1/';
  165. layer.ready(function() {
  166. var id = request.getQueryString("id");
  167. if (id) {
  168. request.httpGet(MODULE_PATH + id, function(result) {
  169. result.data.useTime = result.data.useTime + "ms";
  170. $('#exception').text(result.data.exception);
  171. $('#area').text(result.data.province + result.data.city + result.data.area);
  172. $('#response').jsonViewer(JSON.parse(result.data.response), {collapsed: true});
  173. $('#queryParams').jsonViewer(JSON.parse(result.data.queryParams), {collapsed: true});
  174. result.data.status = result.data.status === 1? '成功': '失败';
  175. result.data.createTime = layui.util.toDateString(result.data.createTime, 'yyyy-MM-dd HH:mm:ss');
  176. form.val('edit', result.data);
  177. });
  178. }
  179. });
  180. })
  181. </script>
  182. </body>
  183. </html>