界面数据列表,表头浮动

This commit is contained in:
leijun
2018-09-27 17:18:07 +08:00
parent 80accfdfa9
commit 1246062bf2
63 changed files with 158 additions and 101 deletions

View File

@@ -176,7 +176,8 @@ optgroup {
table {
border-collapse: collapse;
border-spacing: 0; }
border-spacing: 0;
}
td,
th {
@@ -1542,7 +1543,7 @@ pre {
clear: both; }
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
position: relative;
min-height: 1px;
/* padding-left: 15px;
padding-right: 15px; */
@@ -2038,7 +2039,7 @@ th {
width: 100%;
max-width: 100%;
margin-bottom: 10px;
margin-top: 10px;
margin-top: -1px;
}
.table > thead > tr > th,
.table > thead > tr > td,
@@ -2230,6 +2231,7 @@ table th[class*="col-"] {
position: fixed;
right: 14px;
left: 14px;
margin-top: 20px;
}
@media screen and (max-width: 767px) {
.table-responsive {

View File

@@ -547,6 +547,10 @@ $(function(){
$(".protocol").removeClass("hidden").removeClass("disabled");
$(".btn-red-hollow").addClass("hidden");
}
$("#messageBox .close").on("click",function(){
heightDiv(1);
})
});
window.onload=function(){
$("span[id^=open]").click(function(){
@@ -596,6 +600,18 @@ window.onload=function(){
heightDiv();
},500);
var tableCont = document.querySelector('.table-responsive');
function scrollHandle (e){
console.log(this);
var scrollTop = this.scrollTop;
$('th').css('transform','translateY(' + scrollTop + 'px)');
$('thead tr').css('z-index','2147482468');
$('thead tr').css('position','relative');
$('th').css('border','1px solid rgb(255, 255, 255)');
$('th').css('background-clip','padding-box');
}
tableCont.addEventListener('scroll',scrollHandle);
$('#contentTable').attr("margin-top",'0px');
}
var setInterceptDefaultInfo=function(cfgId){
var action=$("input[name='action']:checked").val();
@@ -1835,14 +1851,23 @@ var initCommIpVal=function(){
}
}
function heightDiv(){
function heightDiv(type){
var hei=document.documentElement.clientHeight;
hei=hei-71;
hei=hei-91;
var rowheigth=0;
if($('.row')){
rowheigth=$('.row').height();
hei=hei-rowheigth;
}
if(type != 1){
if($("#messageBox")){
var messageH=$("#messageBox").height();
if(messageH > 0){
hei=hei-messageH-52;
}
}
}
if($('.table-responsive')){
$('.table-responsive').css({'height':hei+'px'});
}

View File

@@ -325,12 +325,18 @@ function filterActionInit() {
function tzheight(){
var hei=document.documentElement.clientHeight;
hei=hei-71;
hei=hei-91;
var rowheigth=0;
if($('.row')){
rowheigth=$('.row').height();
hei=hei-rowheigth;
}
if($("#messageBox")){
var messageH=$("#messageBox").height();
if(messageH > 0){
hei=hei-messageH-52;
}
}
if($('.table-responsive')){
$('.table-responsive').css({'height':hei+'px'});
}