According to different condition BootStrap asynchronous refresh the table abnormal solutions

1. Description

OpenShowDetail.table1.refresh({query: queryData});

Of this wonderful place to refresh, click on this date data no data, business data this month, this year there is data, but this year after clicking, no data then click on today's date when this background check, but the table shows this data for this month is like this, cache is cleaned up, or so, do not know what

2. Solution

After the destruction, re-initialize the table

    //先销毁
    $('#OrderListTable').bootstrapTable('destroy');
    $('#GoodsListTable').bootstrapTable('destroy');
    //再初始化表格
    var defaultColunms1 = OpenShowDetail.initColumn1();
    var table1 = new BSTable("OrderListTable", "url", defaultColunms1);
    table1.setPaginationType("client");
    table1.setQueryParams(queryData);
    OpenShowDetail.table1 = table1.init();

    //初始化商品表
    var defaultColunms2 = OpenShowDetail.initColumn2();
    var table2 = new BSTable("GoodsListTable", "url", defaultColunms2);
    table2.setPaginationType("client");
    table2.setQueryParams(queryData);
    OpenShowDetail.table2 = table2.init();

 

Guess you like

Origin blog.csdn.net/LuckFairyLuckBaby/article/details/91889544