//构建养护用户分页
function fnPage(data){
    var html='<ul  class="pagination pagination-sm">';
    if( data.previousPage == 0) {
        html+='<li class="page-item disabled"><span class="page-link" aria-label="Previous"> <span aria-hidden="true"><i class="fal fa-chevron-left"></i></span> </span> </li>';
    }else{
        html+='<li class="page-item "> <a' +
            ' parameter="'+ data.parameter+'" currentPage="'+ data.previousPage +'" class="page-link" href="javascript:void(0)" aria-label="Previous"> <span aria-hidden="true"><i class="fal fa-chevron-left"></i></span> </a> </li>';
    }

    if( data.currentPage>=data.pageWidth ) {
    	html+='<li class="page-item">'+
    		'<a parameter="'+data.parameter+'" currentPage="1" class="page-link" href="javascript:void(0)">1</a></li><li class="page-item "><span ><span aria-hidden="true">...</span></span></li>';
    }
    
    for (i = data.startPage; i <= data.endPage; i++) {
        if(data.currentPage == i){
            html+='<li class="page-item active" aria-current="page"> <span class="page-link"> ' +
                ''+ i +'<span class="sr-only">(current)</span> </span> </li>';
        }else{
            html+='<li class="page-item">' +
                ' <a parameter="'+data.parameter+'" currentPage="'+i+'" class="page-link" href="javascript:void(0)">' +
                ''+i+'</a> ' +
                '</li>';
        }
    }

    if( data.totalPage >data.pageWidth && data.totalPage!= data.currentPage ) {
    	html+='<li class="page-item "><span><span aria-hidden="true">...</span></span></li>';
    }
    
    
    if( data.nextPage == data.currentPage||data.totalPage==0) {
        html+='<li class="page-item disabled"> <span class="page-link"  aria-label="Next"> <span aria-hidden="true"><i class="fal fa-chevron-right"></i></span> </span> </li>';
    }else{
        html+='<li class="page-item"> <a ' +
            'parameter="'+ data.parameter +'" currentPage="'+ data.nextPage +'" class="page-link" href="#" aria-label="Next"  > <span aria-hidden="true"><i class="fal fa-chevron-right"></i></span> </a> </li>';
    }
    html+='</ul>';
    
    
    $('div[pageDetail]').html(html);
    $('div[page]').show();
}