如题,在报表模板中动态隐藏了一部分sheet,加载到决策系统,一切正常。当放入定时调度后,生成的快照,把不该隐藏的也隐藏了,JS代码如下:
- function hidepage(Querydate){
- $('.fr-sheetbutton-middlepart').each(function(index,e){
- if(index>3){
-
- //定义查询字符串
- var sql='';
- if(e.innerHTML.charAt(4)!=4){
- sql = "SQL(\"TD_OA\",\"select count(*) from flow_data_137 where 条件1\",1,1)";
- }else{
- sql = "SQL(\"TD_OA\",\"select count(*) from flow_data_137 where 条件2\",1,1)";
- }
- var Count = FR.remoteEvaluate(sql);
-
- if(Count==0){
- var $sheet=$("li[title="+e.innerHTML+"]");
- if($sheet.find("span").hasClass("fr-sheetbutton-endpart")){
- $sheet.prev().find("span[class='fr-sheetbutton-thirdpart']").attr("class","fr-sheetbutton-endpart");
- }
- $sheet.remove();
- }
- }
- })
- }
复制代码 生成的cpr快照,就是index>3的sheet全部隐藏了,和实际的不符
|