var setting = {data:{simpleData:{enable:true,idKey:"id",pIdKey:"pId",rootPId:'0'}},
async:{enable:true,// 異步加載必須設置爲true , 當異步加載時,須要設置isparent 的值,這樣當isParent爲false時,此節點不被加載,不然,則會加載全部節點
url: "${ctx}/group/jcfxGroupTree/treeData",
otherParam: ["id", treeId]
},
callback:{onClick:function(event, treeId, treeNode){
treeId = treeNode.id;
$('#officeContent').attr("src","${ctx}/group/jcfxGroupTree/list?id="+treeId);
}//,
//beforeAsync: zTreeBeforeAsync異步
}
};
$(document).ready(function()
{$.fn.zTree.init($("#ztree"), setting);}); async