在初始化table之前,要将table销毁,否则会保留上次加载的内容
1 $("#table").bootstrapTable('destroy');
2 $("#table").bootstrapTable({
3 dataType: "json",
4 method: 'get',
5 contentType: "application/x-www-form-urlencoded",
6 cache: false,
7 url:url,
8 queryParams: queryParams,
9 columns:col,
10 pagination:true,
11 sidePagination:'server',
12 pageNumber:1,
13 pageSize:10,
14 pageList:[10, 25, 50, 100, 'All'],
15 onCheck: function (row) {
16 var id = checkid;
17 //遍历所有的row 获取name
18 //params["ids"] .add(row.agancyid);
19 params["ids"] += row[""+id+""] +",";
20 }
21 })