Fastadmin在原有筛选条件filter基础之上,js重新附加新条件
$(document).on('click','.small_customer_number_item',function(){ var small_customer_number_index = $(this).attr('small_customer_number_index'); var options = table.bootstrapTable('getOptions'); var queryParams = options.queryParams; options.pageNumber =1; options.queryParams = function (params) { params = queryParams(params);//这一行必须要存在,否则在点击下一页时会丢失搜索栏数据 var filter = params.filter ? JSON.parse(params.filter) : {}; var op = params.op ? JSON.parse(params.op) : {}; filter.small_customer_number_index = small_customer_number_index; op.small_customer_number_index = '='; params.filter = JSON.stringify(filter); params.op = JSON.stringify(op); return params; }; table.bootstrapTable('refresh', {}); return false; })