easyui修改列表内容后刷新列表

easyui修改列表内容后刷新列表

发布者:IT人在线 | 发表时间:2019/7/12 15:03:54

在框架页面中加入

 

/**

 * 刷新指定的tab里面的数据

 * @param title 选项卡标题

 * @param refreshTabFunc  自定义的刷新方法(再各个页面具体实现)

 */

function refreshTabData(title,refreshGridFunc)

{

    if ($("#tabs" ).tabs('exists', title)) {

        $('#tabs').tabs('select' , title);

        typeof refreshGridFunc === 'function' && refreshGridFunc.call();

    }

list列表页中:

window.top["reload_formList"] = function () {

    $("#formList").datagrid("reload");

 

};

方法存储在window.top属性里面去,方法的名字叫reload_formList实现具体代码写在里面。

编辑完成后就直接写:

 

window.parent.refreshTabData("检验单",window.top. reload_formList);