123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <!--[if lt IE 9]>
- <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
- <![endif]-->
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
- <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
- <!--[if IE 6]>
- <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
- <script>DD_belatedPNG.fix('*');</script>
- <![endif]-->
- <script type="text/javascript">
- $(function(){
- $(window).resize(function(){
- $("#jqGrid").setGridWidth($(window).width()-40);
- });
-
- $("#jqGrid").jqGrid({
- caption: "敏感词的检索",
- url : '${ctx}/myconsole/sensitive/getByPage',
- editurl:"${ctx}/myconsole/sensitive/saveOrUpdate",
- mtype : "POST",
- datatype: "json",
- sidx : "keyid",
- sord : "desc",
- //colNames:['站点', '栏目','敏感词','详情' ],/* 列名 */
- prmNames : {
- id: "keyid",
- oper:"oper",
- addoper:"add",
- editoper:"edit",
- deloper:"del"
- },
- colModel:[
- {label : '任务编号',name : 'keyid',hidden : true},
- {label : '站点',name:'sitename',index:'sitename', width:60,editable: true,},
- {label : '栏目',name:'columnname',index:'columnname', width:90,editable: true,},
- {label : '敏感词',name:'tname',index:'tname', width:90,editable: true,},
- {label : '详情',name:'htmlurl',index:'htmlurl',align:'center', width:90,
- /* editoptions:查看, */
- formatter: function (cellvalue, options, rowdata) {
- var html = "<a href='${ctx}"+rowdata.htmlurl+"' style='margin:0 auto;' target='_blank' title='"+cellvalue+"' ><span style='text-align:center'> "+"<button>查看</button></span></a>";
- return html;
- }
- }
-
- ], /* 列数据模型 */
- rownumbers:true,
- autowidth:true,
- height : 'auto',
- viewrecords:true,/* 定义是否要显示总记录数 */
- rowNum:10, /* 在grid上显示记录条数,这个参数是要被传递到后台,相当于pageSize */
- rowList:[10,20,30],/* 一个下拉选择框,用来改变显示记录数,当选择时会覆盖rowNum参数传递到后台 pageSize */
- pager:"#jqGridPager",/* 定义翻页用的导航栏,必须是有效的html元素。翻页工具栏可以放置在html页面任意位置 */
- });
- $("#jqGrid").navGrid('#jqGridPager',
- // the buttons to appear on the toolbar of the grid
- {
- edit : false,
- add : false,
- del : false,
- search : true,
- refresh : true,
- view : true,
- position : "left",
- cloneToTop : true
- },
- // options for the Delete Dailog
- {
- errorTextFormat : function(data) {
- return 'Error: ' + data.responseText
- }
- },{},{},{
- // search options 这里支持多条件查询
- multipleSearch: true,
- sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
- afterSubmit: function(r, data) {
- var messageString = r.responseText;
- var mesObj = eval('(' + messageString + ')');
- return [mesObj.state, mesObj.message];
- }
- }
- );
-
- $("#make").click(function(){
-
- $.get("${ctx}/myconsole/sensitive/make",{},function(data){
- alert(data);
- window.location.href="${ctx}/myconsole/sensitive";
- });
-
- })
-
- });
-
-
- </script>
- <title>我的桌面</title>
- </head>
- <body>
- <div class="page-container">
- <div style="text-align:right">
- <button id="make" class="btn btn-primary radius" type="button"><i class="Hui-iconfont"></i>手动检索</button>
- </div>
- <table id="jqGrid"></table> <!-- 承载数据的容器 -->
- <div id="jqGridPager"></div> <!-- 翻页用的导航栏的容器 -->
- </div>
- </body>
- </html>
|