diff --git a/frontend/views/menu/index.php b/frontend/views/menu/index.php index bd03163..56d1d58 100644 --- a/frontend/views/menu/index.php +++ b/frontend/views/menu/index.php @@ -102,14 +102,23 @@ use \common\libs\MyLib; //使得table有一定的高度,出现滚动条 function table(){ - //获取body高度 - var a=$(".gray-bg").height(); - //获取条件选择高度 - var b=$('#searchFrm').height(); - //获取标题高度 - var c=$('.ibox-title').height(); - $('.fixed-table-body').css({'height': a-b-c-100}); - } + //获取body高度 + var a=$(".gray-bg").height(); + //获取标题高度 + var c=$('.ibox-title').height(); + //获取条件选择高度 + var b=$('#searchFrm').height(); + //获取table高度 + var e=$("row").height(); + var d=a-c-b-100; + if(e>d){ + $('.fixed-table-body').css({'height':d}); + console.log("滚动条"); + }else{ + $('.fixed-table-body').css({'height':e}); + console.log("没有滚动条"); + } + } $(function() { search(); table(); diff --git a/frontend/views/permissions/index.php b/frontend/views/permissions/index.php index cd5e25d..bc3e2de 100644 --- a/frontend/views/permissions/index.php +++ b/frontend/views/permissions/index.php @@ -105,15 +105,16 @@ use \common\libs\MyLib; var c=$('.ibox-title').height(); //获取条件选择高度 var b=$('#searchFrm').height(); - console.log(b); //获取table高度 var e=$("row").height(); - var d= a-c-b-100; + var d=a-c-b-100; if(e>d){ - $('.fixed-table-body').css({'height':d}); + $('.fixed-table-body').css({'height':d}); + console.log("滚动条"); }else{ $('.fixed-table-body').css({'height':e}); - } + console.log("没有滚动条"); + } } $(function() {