webServicelog.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. if(null == sHtml || sHtml == ''){
  36. return '';
  37. }
  38. return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
  39. }
  40. //转义符换成普通字符
  41. function escape2Html(str) {
  42. if(null == str || str == ''){
  43. return '';
  44. }
  45. var arrEntities={'lt':'<','gt':'>','nbsp':' ','amp':'&','quot':'"'};
  46. return str.replace(/&(lt|gt|nbsp|amp|quot);/ig,function(all,t){return arrEntities[t];});
  47. }
  48. $(function() {
  49. $(window).resize(function(){
  50. $("#tree").setGridWidth($(window).width()-40); 
  51. });
  52. $("#tree").jqGrid({
  53. caption:'接口日志查看',
  54. url : '${ctx}/myconsole/complaint/log/getWebServiceLogList',
  55. editurl:"${ctx}/myconsole/loginlog/saveOrUpdate",
  56. mtype : "POST",
  57. datatype : "json",
  58. sidx : "opttime",
  59. sord : "desc",
  60. prmNames : {
  61. id: "keyid", 
  62. oper:"oper",    
  63. addoper:"add",
  64. editoper:"edit",
  65. deloper:"del" 
  66. },
  67. colModel : [{
  68. label : '交易类型',
  69. name : 'clienttype',
  70. width : 60,
  71. formoptions:{
  72. elmsuffix:"*"
  73. },
  74. editrules:{required:true}
  75. },{
  76. label : '交易时间',
  77. name : 'time',
  78. width : 60,
  79. },{
  80. label : '请求报文',
  81. name : 'requestmessage',
  82. width : 150,
  83. edittype:"text",
  84. formatter:function(cellvalue, options) {
  85. return html2Escape(cellvalue);
  86. },
  87. unformat:function(cellvalue, options){
  88. return escape2Html(cellvalue);
  89. },
  90. },{
  91. label : '响应报文',
  92. name : 'responsemessage',
  93. width : 150,
  94. formatter:function(cellvalue, options) {
  95. return html2Escape(cellvalue);
  96. },
  97. unformat:function(cellvalue, options){
  98. return escape2Html(cellvalue);
  99. },
  100. }],
  101. rownumbers : true,//添加左侧行号
  102. viewrecords : true,//是否在浏览导航栏显示记录总数
  103. rowNum : 5,//每页显示记录数
  104. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  105. autowidth : true,
  106. height : 'auto',
  107. pager : "#pager",
  108. });
  109. jQuery('#tree').navGrid('#pager',
  110. // the buttons to appear on the toolbar of the grid
  111. {
  112. edit : false,
  113. add : false,
  114. del : false,
  115. search : true,
  116. refresh : true,
  117. view : true,
  118. position : "left",
  119. cloneToTop : true
  120. },
  121. // options for the Delete Dailog
  122. {
  123. errorTextFormat : function(data) {
  124. return 'Error: ' + data.responseText
  125. }
  126. },{},{},{
  127. // search options 这里支持多条件查询
  128. multipleSearch: true,
  129. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  130. afterSubmit: function(r, data) {
  131. var messageString = r.responseText;
  132. var mesObj = eval('(' + messageString + ')');
  133. return [mesObj.state, mesObj.message];
  134. }
  135. }
  136. );
  137. /* jQuery('#tree').jqGrid('bindKeys'); */
  138. })
  139. </script>
  140. <title>我的桌面</title>
  141. </head>
  142. <body>
  143. <div class="page-container">
  144. <table id="tree"></table>
  145. <div id="pager"></div>
  146. </div>
  147. <footer class="footer mt-20">
  148. <div class="container">
  149. <p></p>
  150. </div>
  151. </footer>
  152. </body>
  153. </html>