分页查询
有2种查询方法:客户端查询和服务端查询
第一种 客户端分页查查询
客户端是后台直接查出所有的数据,前端进行操作
function initTable() {
$('#tableId').bootstrapTable({
url: basePath + '/excelImport/tzImportList?gsbh='+code,
method: 'GET',
//间隔颜色
striped: true,
//开启分页
pagination: true,
//默认true,true:分页条无限循环
paginationLoop: false,
//客户端查询
sidePagination: 'client',
//初始页
pageNumber: 1,
//每页记录数
pageSize: 10,
//默认为true,会机智地根据情况显示分页(pagination)或卡片视图(card view)
smartDisplay:false,
//列
columns: [{
checkbox:true},
{
title: '操作',
field: 'operate',
align: 'center',
valign: 'middle',
events: operateEvents,
formatter: operateFormatter,
// checkbox: true,
},
{
field: 'ID', title: '',visible: false},
{
field: 'GSMC', title: '公司'},
{
field: 'LX'