<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>jQuery纵向树形结构图菜单代码</TITLE>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- <link rel="stylesheet" href="css/demo.css" type="text/css"> -->
<link rel="stylesheet" href="css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="css/zTreeStyle/animate.css" type="text/css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="js/jquery.ztree.excheck.js"></script>
<!--
<script type="text/javascript" src="js/jquery.ztree.exedit.js"></script>
-->
<SCRIPT type="text/javascript">
var setting = {
treeObj : null,
check: {
enable: true
},
data: {
simpleData: {
enable: true,
idKey: "id",
pIdKey: "pId",
rootPId: 0
}
},
callback: {
onCheck: zTreeOnCheck
},
view: {
showLine: false,
showIcon: false,
showTitle: false,
// fontCss : {color:"red"}
}
};
var zNodes =[{"id":"1","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"临时设施","PROJECTNAME":"","corpId":""},{"id":"11","pId":"1","securityOptions":[],"corpCode":"","PERMITID":"","name":"施工区","PROJECTNAME":"","corpId":""},{"id":"111","pId":"11","securityOptions":[],"corpCode":"","PERMITID":"","name":"门卫室","PROJECTNAME":"","corpId":""},{"id":"112","pId":"11","securityOptions":[],"corpCode":"","PERMITID":"","name":"配电室","PROJECTNAME":"","corpId":""},{"id":"113","pId":"11","securityOptions":[],"corpCode":"","PERMITID":"","name":"仓库","PROJECTNAME":"","corpId":""},{"id":"114","pId":"11","securityOptions":[],"corpCode":"","PERMITID":"","name":"卷场机操作室","PROJECTNAME":"","corpId":""},{"id":"115","pId":"11","securityOptions":[],"corpCode":"","PERMITID":"","name":"饮水室、吸烟室","PROJECTNAME":"","corpId":""},{"id":"12","pId":"1","securityOptions":[],"corpCode":"","PERMITID":"","name":"办公区","PROJECTNAME":"","corpId":""},{"id":"121","pId":"12","securityOptions":[],"corpCode":"","PERMITID":"","name":"办公室","PROJECTNAME":"","corpId":""},{"id":"122","pId":"12","securityOptions":[],"corpCode":"","PERMITID":"","name":"医务保健室","PROJECTNAME":"","corpId":""},{"id":"123","pId":"12","securityOptions":[],"corpCode":"","PERMITID":"","name":"会议室","PROJECTNAME":"","corpId":""},{"id":"124","pId":"12","securityOptions":[],"corpCode":"","PERMITID":"","name":"现场监控","PROJECTNAME":"","corpId":""},{"id":"13","pId":"1","securityOptions":[],"corpCode":"","PERMITID":"","name":"生活区","PROJECTNAME":"","corpId":""},{"id":"131","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"宿舍","PROJECTNAME":"","corpId":""},{"id":"132","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"食堂和储物间","PROJECTNAME":"","corpId":""},{"id":"133","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"活动室","PROJECTNAME":"","corpId":""},{"id":"134","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"卫生间","PROJECTNAME":"","corpId":""},{"id":"135","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"淋浴间","PROJECTNAME":"","corpId":""},{"id":"136","pId":"13","securityOptions":[],"corpCode":"","PERMITID":"","name":"洗漱间","PROJECTNAME":"","corpId":""},{"id":"2","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"安全防护","PROJECTNAME":"","corpId":""},{"id":"21","pId":"2","securityOptions":[],"corpCode":"","PERMITID":"","name":"防护棚","PROJECTNAME":"","corpId":""},{"id":"211","pId":"21","securityOptions":[],"corpCode":"","PERMITID":"","name":"钢筋、木工作业区防护棚","PROJECTNAME":"","corpId":""},{"id":"212","pId":"21","securityOptions":[],"corpCode":"","PERMITID":"","name":"搅拌设备防护棚","PROJECTNAME":"","corpId":""},{"id":"22","pId":"2","securityOptions":[],"corpCode":"","PERMITID":"","name":"临边防护","PROJECTNAME":"","corpId":""},{"id":"221","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"基坑周边防护","PROJECTNAME":"","corpId":""},{"id":"222","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"楼层、阳台临边防护","PROJECTNAME":"","corpId":""},{"id":"223","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"楼梯临边防护","PROJECTNAME":"","corpId":""},{"id":"224","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"竖向洞口防护","PROJECTNAME":"","corpId":""},{"id":"225","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"屋面临边防护","PROJECTNAME":"","corpId":""},{"id":"226","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"安全通道","PROJECTNAME":"","corpId":""},{"id":"227","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"电梯门、进口防护","PROJECTNAME":"","corpId":""},{"id":"228","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"水平预留洞口防护","PROJECTNAME":"","corpId":""},{"id":"229","pId":"22","securityOptions":[],"corpCode":"","PERMITID":"","name":"悬挑式钢平台","PROJECTNAME":"","corpId":""},{"id":"3","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"消防设施","PROJECTNAME":"","corpId":""},{"id":"4","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"临时用电","PROJECTNAME":"","corpId":""},{"id":"41","pId":"4","securityOptions":[],"corpCode":"","PERMITID":"","name":"总配电柜(箱)、分配电箱、开关箱安装设置","PROJECTNAME":"","corpId":""},{"id":"411","pId":"41","securityOptions":[],"corpCode":"","PERMITID":"","name":"总配电柜(箱)","PROJECTNAME":"","corpId":""},{"id":"412","pId":"41","securityOptions":[],"corpCode":"","PERMITID":"","name":"分配电箱","PROJECTNAME":"","corpId":""},{"id":"413","pId":"41","securityOptions":[],"corpCode":"","PERMITID":"","name":"开关箱","PROJECTNAME":"","corpId":""},{"id":"5","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"脚手架","PROJECTNAME":"","corpId":""},{"id":"51","pId":"5","securityOptions":[],"corpCode":"","PERMITID":"","name":"扣件式钢管脚手架","PROJECTNAME":"","corpId":""},{"id":"52","pId":"5","securityOptions":[],"corpCode":"","PERMITID":"","name":"型钢悬挑式脚手架","PROJECTNAME":"","corpId":""},{"id":"53","pId":"5","securityOptions":[],"corpCode":"","PERMITID":"","name":"满堂脚手架","PROJECTNAME":"","corpId":""},{"id":"54","pId":"5","securityOptions":[],"corpCode":"","PERMITID":"","name":"满堂支撑架","PROJECTNAME":"","corpId":""},{"id":"6","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"基坑支护","PROJECTNAME":"","corpId":""},{"id":"61","pId":"6","securityOptions":[],"corpCode":"","PERMITID":"","name":"型钢桩横挡板支护","PROJECTNAME":"","corpId":""},{"id":"62","pId":"6","securityOptions":[],"corpCode":"","PERMITID":"","name":"混凝土灌注桩支护","PROJECTNAME":"","corpId":""},{"id":"63","pId":"6","securityOptions":[],"corpCode":"","PERMITID":"","name":"土钉墙支护","PROJECTNAME":"","corpId":""},{"id":"7","pId":"0","securityOptions":[],"corpCode":"","PERMITID":"","name":"起重机械设备","PROJECTNAME":"","corpId":""},{"id":"71","pId":"7","securityOptions":[],"corpCode":"","PERMITID":"","name":"塔吊","PROJECTNAME":"","corpId":""},{"id":"711","pId":"71","securityOptions":[],"corpCode":"","PERMITID":"","name":"保险装置设置和有效性","PROJECTNAME":"","corpId":""},{"id":"712","pId":"71","securityOptions":[],"corpCode":"","PERMITID":"","name":"多塔作业防碰撞措施","PROJECTNAME":"","corpId":""},{"id":"713","pId":"71","securityOptions":[],"corpCode":"","PERMITID":"","name":"基础安全状况","PROJECTNAME":"","corpId":""},{"id":"714","pId":"71","securityOptions":[],"corpCode":"","PERMITID":"","name":"与外电线路安全距离","PROJECTNAME":"","corpId":""},{"id":"715","pId":"71","securityOptions":[],"corpCode":"","PERMITID":"","nam