123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <!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" />
- <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
- <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
- <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.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>
- <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.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() {
- $.ajax({
- async: false,
- type : "POST",
- url : "${ctx}/myconsole/webinfo/getColumnOptionsBySite",
- dataType : 'text',
- success : function(data) {
- $("#columnID").append(data);
- }
- });
- $(window).resize(function(){
- $("#jqGrid").setGridWidth($(window).width()-41);
- });
- $("#jqGrid").jqGrid({
- url : '${ctx}/myconsole/webinfo/getRelatingInfo',
- mtype : "POST",
- datatype : "json",
- postData : {'KeyID':'${KeyID}','columnID':$('#columnID').val(),'KeyWord':$('#KeyWord').val(),'BeginDate':$('#BeginDate').val(),'EndDate':$('#EndDate').val()},
- multiselect: true,
- caption:'信息管理',
- prmNames : { //定义表单的主键 // Default valuesprmNames: {page:“page”,rows:“rows”, sort: “sidx”,order: “sord”, search:“_search”, nd:“nd”, npage:null} 当参数为null时不会被发到服务器端
- id: "keyid",
- oper:"oper",
- addoper:"add",
- editoper:"edit",
- deloper:"del"
-
- },
- colModel : [ {
- label : '数据编号',
- name : 'keyid',
- key : true,
- editable: false,
- hidden:true
- }, {
- label : '标题',
- name : 'title',
- width : 200,
- formatter: function (cellvalue, options, rowdata) {
- var html = "<a href='"+rowdata.url+"' target='_blank' title='"+cellvalue+"' >"+cellvalue+"</a>";
- return html;
- }
- }, {
- label : '信息序号',
- hidden : true,
- name : 'infoserial',
- width : 50,
- },{
- label : '发布人',
- name : 'releasename',
- width : 50,
- }, {
- label : '发布时间',
- name : 'releasetime',
- width : 100,
- }],
- rownumbers : true,//添加左侧行号
- viewrecords : true,//是否在浏览导航栏显示记录总数
- rowNum : 10,//每页显示记录数
- rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
- autowidth : true,
- sortname : 'sortID',
- sortorder : 'asc',
- height : 'auto',
- pager : "#jqGridPager",
- //屏蔽点击任意单元格选中checkbox的问题
- beforeSelectRow: function (rowid, e) {
- var $myGrid = $(this),
- i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
- cm = $myGrid.jqGrid('getGridParam', 'colModel');
- return (cm[i].name === 'cb');
- }
- });
- //拖动排序
- $('#jqGrid').jqGrid('sortableRows', {
- update:function(ev, ui){
- var item = ui.item[0], ri = item.rowIndex, itemId = item.id;
- var array = $('#jqGrid').jqGrid('getDataIDs');
- var options = 'next';//标识参照ID 是取得当前元素的后一个
- if(ri == array.length){//说明在列表最末尾,拿他当前一行数据作为参照物
- ri -=2;
- options = 'pre';//标识参照ID 是取得当前元素的前一个
- }
- alert(itemId);
- alert(array[ri]);
- $.post("${ctx}/myconsole/webinfo/sort/", {
- KeyID: itemId,
- ReferKeyID: array[ri],
- OptionType: options
- });
- }
- });
- //切换资源状态时,动态刷新数据;同时判断发布和撤稿按钮是否可用
- $('#TState').change(reload);
- });
- //选择数据状态下拉列表重新取数据
- function query()
- {
-
- $("#jqGrid").jqGrid('setGridParam', {
- datatype : "json",
- postData : {'KeyID':'${KeyID}','columnID':$('#columnID').val(),'KeyWord':$('#KeyWord').val(),'BeginDate':$('#BeginDate').val(),'EndDate':$('#EndDate').val()}
- }).trigger('reloadGrid');
- }
- //设置关联信息2016-12-12
- function setRelating(){
- var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
- if(data.length <=0){
- layer.msg('请选择要操作的数据',{icon: 5,time:1500});
- return false;
- }
-
- $.getJSON("${ctx}/myconsole/webinfo/getRelating", {
- KeyID : '${KeyID}',
- keyids : data+""
- }, function(json){
- if(json.status == 'y'){
- opener.$("#relatinginfoid").val(json.relatinginfoid);
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){window.close();});
- }else{
- layer.alert(json.message, {
- skin: 'layui-layer-molv' //样式类名
- ,closeBtn: 0
- }, function(){});
- }
- });
-
-
- }
-
- </script>
- <title>我的桌面</title>
- </head>
- <body>
- <div>
-
- <div class="page-container">
- <div class="cl pd-5 bg-1 bk-gray">
- <span class="l">
-
- <span style="width: 100px" >
- 标题关键字:
- </span>
- <span class="select-box" style="width: 140px" >
- <input type="text" class="input-text required" size=20 placeholder="" id="KeyWord" name="KeyWord">
- </span>
- <span style="width: 100px" >
- 栏目:
- </span>
- <span class="select-box" style="width: 493px" >
- <select id="columnID" name="columnID" > </select>
- </span>
- <br>
- <span style="width: 100px" >
- 发布日期从:
- </span>
- <span class="select-box" style="width: 140px" >
- <input type="text" size=20 placeholder="" onfocus="WdatePicker()" id="BeginDate" name="BeginDate" class="input-text Wdate readyonly">
- </span>
- <span style="width: 50px" >
- 到:
- </span>
- <span class="select-box" style="width: 140px" >
- <input type="text" class="input-text required" size=20 placeholder="" onfocus="WdatePicker()" id="EndDate" name="EndDate" class="input-text Wdate readyonly">
- </span>
- <span style="width: 80px" >
- <a class="btn btn-primary radius query" onclick="query()" href="javascript:;">
- <i class="Hui-iconfont"></i> 检索
- </a>
- <a class="btn btn-danger radius deletec" href="javascript:;" onclick="setRelating()">
- <i class="Hui-iconfont"></i> 设置为关联信息
- </a>
- </span>
- </span>
- </div>
- <table id="jqGrid"></table>
- <div id="jqGridPager"></div>
- </div>
- </div>
-
- </body>
- </html>
|