sensitive.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. $(function(){
  34. $(window).resize(function(){
  35. $("#jqGrid").setGridWidth($(window).width()-40); 
  36. });
  37. $("#jqGrid").jqGrid({
  38. caption: "敏感词的检索",
  39. url : '${ctx}/myconsole/sensitive/getByPage',
  40. editurl:"${ctx}/myconsole/sensitive/saveOrUpdate",
  41. mtype : "POST",
  42. datatype: "json",
  43. sidx : "keyid",
  44. sord : "desc",
  45. //colNames:['站点', '栏目','敏感词','详情' ],/* 列名 */
  46. prmNames : {
  47. id: "keyid", 
  48. oper:"oper",    
  49. addoper:"add",
  50. editoper:"edit",
  51. deloper:"del" 
  52. },
  53. colModel:[
  54. {label : '任务编号',name : 'keyid',hidden : true},
  55. {label : '站点',name:'sitename',index:'sitename', width:60,editable: true,},
  56. {label : '栏目',name:'columnname',index:'columnname', width:90,editable: true,},
  57. {label : '敏感词',name:'tname',index:'tname', width:90,editable: true,},
  58. {label : '详情',name:'htmlurl',index:'htmlurl',align:'center', width:90,
  59. /* editoptions:查看, */
  60. formatter: function (cellvalue, options, rowdata) {
  61. var html = "<a href='${ctx}"+rowdata.htmlurl+"' style='margin:0 auto;' target='_blank' title='"+cellvalue+"' ><span style='text-align:center'> "+"<button>查看</button></span></a>";
  62. return html;
  63. }
  64. }
  65. ], /* 列数据模型 */
  66. rownumbers:true,
  67. autowidth:true,
  68. height : 'auto',
  69. viewrecords:true,/* 定义是否要显示总记录数 */
  70. rowNum:10, /* 在grid上显示记录条数,这个参数是要被传递到后台,相当于pageSize */
  71. rowList:[10,20,30],/* 一个下拉选择框,用来改变显示记录数,当选择时会覆盖rowNum参数传递到后台 pageSize */
  72. pager:"#jqGridPager",/* 定义翻页用的导航栏,必须是有效的html元素。翻页工具栏可以放置在html页面任意位置 */
  73. });
  74. $("#jqGrid").navGrid('#jqGridPager',
  75. // the buttons to appear on the toolbar of the grid
  76. {
  77. edit : false,
  78. add : false,
  79. del : false,
  80. search : true,
  81. refresh : true,
  82. view : true,
  83. position : "left",
  84. cloneToTop : true
  85. },
  86. // options for the Delete Dailog
  87. {
  88. errorTextFormat : function(data) {
  89. return 'Error: ' + data.responseText
  90. }
  91. },{},{},{
  92. // search options 这里支持多条件查询
  93. multipleSearch: true,
  94. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  95. afterSubmit: function(r, data) {
  96. var messageString = r.responseText;
  97. var mesObj = eval('(' + messageString + ')');
  98. return [mesObj.state, mesObj.message];
  99. }
  100. }
  101. );
  102. $("#make").click(function(){
  103. $.get("${ctx}/myconsole/sensitive/make",{},function(data){
  104. alert(data);
  105. window.location.href="${ctx}/myconsole/sensitive";
  106. });
  107. })
  108. });
  109. </script>
  110. <title>我的桌面</title>
  111. </head>
  112. <body>
  113. <div class="page-container">
  114. <div style="text-align:right">
  115. <button id="make" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i>手动检索</button>
  116. </div>
  117. <table id="jqGrid"></table> <!-- 承载数据的容器 -->
  118. <div id="jqGridPager"></div> <!-- 翻页用的导航栏的容器 -->
  119. </div>
  120. </body>
  121. </html>