标签:
//#region zTree配置数据
var setting = {
async: {
enable: true,
url: GetUrl(‘/Dept/GetDeptTree‘),
dataFilter: filter
},
data: {
simpleData: { enable: true }
},
callback: {
onClick: onClick
}
};
function filter(treeId, parentNode, childNodes) {
if (!childNodes) return null;
for (var i = 0, l = childNodes.length; i < l; i++) {
childNodes[i].name = childNodes[i].name.replace(/\.n/g, ‘.‘);
}
return childNodes;
}
function onClick(event, treeId, treeNode, clickFlag) {
$("#hidTreeDept").val(treeNode.id);
$("#hidTreeDeptName").val(treeNode.name);
}
//#endregion
js代码折叠的方法//#region 代码 //#endregion
标签:
原文地址:http://www.cnblogs.com/treeleaf/p/4485518.html