errorlog.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  21. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  22. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  23. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  24. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  25. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  26. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  27. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  28. <!--[if IE 6]>
  29. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  30. <script>DD_belatedPNG.fix('*');</script>
  31. <![endif]-->
  32. <script type="text/javascript">
  33. //普通字符转换成转义符
  34. function html2Escape(sHtml) {
  35. return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
  36. }
  37. //转义符换成普通字符
  38. function escape2Html(str) {
  39. var arrEntities={'lt':'<','gt':'>','nbsp':' ','amp':'&','quot':'"'};
  40. return str.replace(/&(lt|gt|nbsp|amp|quot);/ig,function(all,t){return arrEntities[t];});
  41. }
  42. $(function() {
  43. $(window).resize(function(){
  44. $("#tree").setGridWidth($(window).width()-40); 
  45. });
  46. $("#tree").jqGrid({
  47. caption:'系统异常日志查看',
  48. url : '${ctx}/myconsole/complaint/log/getErrorLogList',
  49. editurl:"${ctx}/myconsole/loginlog/saveOrUpdate",
  50. mtype : "POST",
  51. datatype : "json",
  52. sidx : "opttime",
  53. sord : "desc",
  54. prmNames : {
  55. id: "tid", 
  56. oper:"oper",    
  57. addoper:"add",
  58. editoper:"edit",
  59. deloper:"del" 
  60. },
  61. colModel : [{
  62. label : '操作人',
  63. name : 'username',
  64. width : 40,
  65. },{
  66. label : '请求路径',
  67. name : 'requesturl',
  68. width : 150,
  69. },{
  70. label : '异常类名称',
  71. name : 'controllername',
  72. width : 60,
  73. edittype:"text",
  74. },{
  75. label : '方法名称',
  76. name : 'methodname',
  77. width : 35,
  78. },{
  79. label : '行号',
  80. name : 'codeline',
  81. width : 15,
  82. },{
  83. label : '运行异常名称',
  84. name : 'exceptionname',
  85. width : 100,
  86. cellattr: addCellAttr,
  87. },{
  88. label : '记录时间',
  89. name : 'time',
  90. width : 60,
  91. }],
  92. rownumbers : true,//添加左侧行号
  93. viewrecords : true,//是否在浏览导航栏显示记录总数
  94. rowNum : 5,//每页显示记录数
  95. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  96. autowidth : true,
  97. height : 'auto',
  98. pager : "#pager",
  99. });
  100. jQuery('#tree').navGrid('#pager',
  101. // the buttons to appear on the toolbar of the grid
  102. {
  103. edit : false,
  104. add : false,
  105. del : false,
  106. search : true,
  107. refresh : true,
  108. view : true,
  109. position : "left",
  110. cloneToTop : true
  111. },
  112. // options for the Delete Dailog
  113. {
  114. errorTextFormat : function(data) {
  115. return 'Error: ' + data.responseText
  116. }
  117. },{},{},{
  118. // search options 这里支持多条件查询
  119. multipleSearch: true,
  120. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  121. afterSubmit: function(r, data) {
  122. var messageString = r.responseText;
  123. var mesObj = eval('(' + messageString + ')');
  124. return [mesObj.state, mesObj.message];
  125. }
  126. }
  127. );
  128. /* jQuery('#tree').jqGrid('bindKeys'); */
  129. })
  130. //改变列样式
  131. function addCellAttr(rowId, val, rawObject, cm, rdata) {
  132. return "style='background-color:#FFCC66'";
  133. }
  134. </script>
  135. <title>我的桌面</title>
  136. </head>
  137. <body>
  138. <div class="page-container">
  139. <table id="tree"></table>
  140. <div id="pager"></div>
  141. </div>
  142. <footer class="footer mt-20">
  143. <div class="container">
  144. <p></p>
  145. </div>
  146. </footer>
  147. </body>
  148. </html>