dustbinwebinfo.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" >
  21. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  22. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  23. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  24. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  25. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  26. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  27. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  28. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  29. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  30. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  31. <script type="text/javascript" src="${ctx}/assets/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
  32. <!--[if IE 6]>
  33. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  34. <script>DD_belatedPNG.fix('*');</script>
  35. <![endif]-->
  36. <script type="text/javascript">
  37. $(function() {
  38. $(window).resize(function(){
  39. $("#jqGrid").setGridWidth($(window).width()-41); 
  40. });
  41. $("#jqGrid").jqGrid({
  42. url : '${ctx}/myconsole/webinfo/getDustbinByPage',
  43. mtype : "POST",
  44. datatype : "json",
  45. postData : {'columnID' : '${column.columnid!}','TState':'dustbin'},
  46. multiselect: true,
  47. caption:'信息管理',
  48. prmNames : { //定义表单的主键 // Default valuesprmNames: {page:“page”,rows:“rows”, sort: “sidx”,order: “sord”, search:“_search”, nd:“nd”, npage:null} 当参数为null时不会被发到服务器端
  49. id: "keyid", 
  50. oper:"oper",    
  51. addoper:"add",
  52. editoper:"edit",
  53. deloper:"del" 
  54. },
  55. colModel : [ {
  56. label : '数据编号',
  57. name : 'keyid',
  58. key : true,
  59. editable: false,
  60. hidden:true
  61. }, {
  62. label : '标题',
  63. name : 'title',
  64. width : 200,
  65. formatter: function (cellvalue, options, rowdata) {
  66. var html = "<a href='${ctx}/${currentSite.SiteID!}/${column.columnid!}/"+rowdata.infoserial+".html' target='_blank' title='"+cellvalue+"' >"+cellvalue+"</a>";
  67. return html;
  68. }
  69. }, {
  70. label : '信息序号',
  71. hidden : true,
  72. name : 'infoserial',
  73. width : 50,
  74. },{
  75. label : '发布人',
  76. name : 'releasename',
  77. width : 50,
  78. }, {
  79. label : '发布时间',
  80. name : 'releasetime',
  81. width : 100,
  82. }],
  83. rownumbers : true,//添加左侧行号
  84. viewrecords : true,//是否在浏览导航栏显示记录总数
  85. rowNum : 10,//每页显示记录数
  86. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  87. autowidth : true,
  88. sortname : 'sortID',
  89. sortorder : 'asc',
  90. height : 'auto',
  91. pager : "#jqGridPager",
  92. //屏蔽点击任意单元格选中checkbox的问题
  93. beforeSelectRow: function (rowid, e) {
  94. var $myGrid = $(this),
  95. i = $.jgrid.getCellIndex($(e.target).closest('td')[0]),
  96. cm = $myGrid.jqGrid('getGridParam', 'colModel');
  97. return (cm[i].name === 'cb');
  98. }
  99. });
  100. });
  101. //选择数据状态下拉列表重新取数据
  102. function reload()
  103. {
  104. $("#jqGrid").jqGrid('setGridParam', {
  105. datatype : "json",
  106. postData : {'columnID' : '${column.columnid!}','TState':'dustbin'}
  107. }).trigger('reloadGrid');
  108. }
  109. //文章还原到草稿箱 韩林平 2016-11-29
  110. function setDraft()
  111. {
  112. var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
  113. if(data.length <=0){
  114. layer.msg('请选择要操作的数据',{icon: 5,time:1500});
  115. return false;
  116. }
  117. $.getJSON("${ctx}/myconsole/webinfo/setDraft", {
  118. keyids : data+""
  119. }, function(json){
  120. if(json.status == 'y'){
  121. layer.msg('文章还原到草稿箱成功!',{icon: 6,time:1500});
  122. reload();
  123. }else{
  124. layer.msg('文章还原到草稿箱失败!',{icon: 5,time:1500});
  125. }
  126. });
  127. }
  128. //批量删除文章 韩林平2016-11-30
  129. function finalDelete(){
  130. var data = jQuery('#jqGrid').jqGrid('getGridParam','selarrrow');
  131. if(data.length <=0){
  132. layer.msg('请选择要操作的数据',{icon: 5,time:1500});
  133. return false;
  134. }
  135. $.getJSON("${ctx}/myconsole/webinfo/finalDelete", {
  136. keyids : data+""
  137. }, function(json){
  138. if(json.status == 'y'){
  139. layer.msg(json.message,{icon: 6,time:2500});
  140. reload();
  141. }else{
  142. layer.msg(json.message,{icon: 5,time:2500});
  143. }
  144. });
  145. }
  146. //查询
  147. function query()
  148. {
  149. parent.layer.open({
  150. type: 1,
  151. title: '选择查询条件',
  152. btn: ['查询','取消'],
  153. yes:function(index, layero){
  154. var btnName = $('#TState').val();
  155. $("#jqGrid").jqGrid('setGridParam', {
  156. datatype : "json",
  157. postData : {'columnID' : '${column.columnid!}','TState':'dustbin','KeyWord':$(layero).find("#keyword").val(),'BeginDate':$(layero).find("#begindate").val(),'EndDate':$(layero).find("#enddate").val()}
  158. }).trigger('reloadGrid');
  159. parent.layer.close(index);
  160. },
  161. skin: 'layui-layer-rim', //加上边框
  162. area: ['350px', '480px'], //宽高
  163. content: '<br><div class="row cl"><label class="form-label col-xs-1 col-sm-5">&nbsp;关键字:</label>'+
  164. '<div class="formControls col-xs-1 col-sm-6"><input type="text" class="input-text" id="keyword" name="keyword"></div></div>'+
  165. '<br><div class="row cl"><label class="form-label col-xs-1 col-sm-5">&nbsp;发布开始时间:</label>'+
  166. '<div class="formControls col-xs-1 col-sm-6"><input type="text" class="input-text" id="begindate" name="begindate"></div></div>'+
  167. '<br><div class="row cl"><label class="form-label col-xs-1 col-sm-5">&nbsp;发布结束时间:</label>'+
  168. '<div class="formControls col-xs-1 col-sm-6"><input type="text" class="input-text" id="enddate" name="enddate"></div></div>',
  169. success:function(layero, index){
  170. $(layero).find("#begindate").on("click",function(){
  171. WdatePicker();
  172. })
  173. $(layero).find("#enddate").on("click",function(){
  174. WdatePicker();
  175. })
  176. }
  177. });
  178. }
  179. </script>
  180. <title>我的桌面</title>
  181. </head>
  182. <body>
  183. <div>
  184. <div class="page-container">
  185. <div class="cl pd-5 bg-1 bk-gray">
  186. <span class="l">
  187. <a class="btn btn-primary radius withdrawc" onclick="setDraft()" href="javascript:;">
  188. <i class="Hui-iconfont">&#xe6de;</i> 还原到草稿箱
  189. </a>
  190. <a class="btn btn-danger radius deletec" href="javascript:;" onclick="finalDelete()">
  191. <i class="Hui-iconfont">&#xe6e2;</i> 彻底删除
  192. </a>
  193. <a class="btn btn-primary radius query" onclick="query()" href="javascript:;">
  194. <i class="Hui-iconfont">&#xe665;</i> 检索
  195. </a>
  196. </span>
  197. </div>
  198. <table id="jqGrid"></table>
  199. <div id="jqGridPager"></div>
  200. </div>
  201. </div>
  202. </body>
  203. </html>