//#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