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}); + +}