From fabfc87741a1cf67cbf7cc9051da9b60d456f829 Mon Sep 17 00:00:00 2001 From: wangxin Date: Thu, 12 Jul 2018 14:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=8A=A5=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=87=8D=E5=86=99=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=97?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/views/report/list.jsp | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index 6d038dbb5..5ae4ecbcb 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -124,6 +124,45 @@ var ajaxReport=function(url,target){ } }); }; +//自定义列设置事件 +function customColumnClick(){ + + + var submit = function(v,h,f) { + var abVisCols = [true]; + top.$(".customColumnList input[type='checkbox']").each(function(){ + abVisCols[$(this).val()] = $(this).prop("checked"); + }); + + var key = getLocationPathName()+"_visCols"; + Cookies.set(key,JSON.stringify(abVisCols),{expires:7}); + customColumnInit(); + + return true; + } + + + var html = "
"; + $(".active .table tr th").each(function(colIndex,obj){ + + if(colIndex==0) { //第一列th含 checkbox ,结束本次循环, 下标从1开始反之0开始 + var ckVal = $(this).find("input[type='checkbox']").val(); + if(typeof(ckVal) != "undefined") { + return true; + } + } + if($(this).hasClass("cfgDesc")){ + return true; + } + var checked = ($(this).is(":visible") ? "checked='checked'":""); + var ckbox_html = ""; + html+="
"; + }) + html +="
"; + + top.$.jBox(html,{title:" Custom Columns",showIcon:false,opacity:0.3,submit:submit}); + +}