JS技术

Javascript教程_JS版组织结构图_Javascript教程

字号+ 作者:H5之家 来源:H5之家 2015-09-27 13:10 我要评论( )

Javascript教程_JS版组织结构图,学习Javascript教程_JS版组织结构图,Javascript教程_JS版组织结构图,查看Javascript教程_JS版组织结构图,原来想在网上找,结果这

原来想在网上找,结果这个东西竟然没有,找到一个C#版的还是要收费,无奈只能苦战三天,终于搞定了,请各位测试,有可能往下加节点会有不对的也说不定。
请不要期待兼容性,从来不顾及这个
如果各位有更好的思路请不吝指教
另外,目前只做了一种展示方式,如果各位有兴趣需要,等我再更新
功能:支持自定义节点样式,无限级节点支持,节点间宽度高度间隔自定义,颜色线条大小自定义
修正部分错误
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>员工结构</title>
<script language="javascript" src=""></script>
<style type="text/css">
<!--
.speis {
 PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 5px; PADDING-TOP: 0px;
 text-align:center;
}
*{
 font-size:12px;
}
#LoadBox{
 text-align:center;
 margin-top:200px;
}
-->
</style>
</head>
<body>
<div id="LoadBox">员工组织结构图正在生成,请不要刷新或者关闭窗口,稍后……</div>
<script language="javascript">
var Emp208=new OrgNode();
Emp208.Text="张亮";
Emp208.Link="EmpStructure.asp?EmpNo=0425";
</script>
<script language="javascript">
var Emp239=new OrgNode();
Emp239.Text="刘冬";
Emp239.Link="EmpStructure.asp?EmpNo=0611";
Emp208.Nodes.Add(Emp239);
</script>
<script language="javascript">
var Emp326=new OrgNode();
Emp326.Text="郝红";
Emp326.Link="EmpStructure.asp?EmpNo=0915";
Emp239.Nodes.Add(Emp326);
</script>
<script language="javascript">
var Emp346=new OrgNode();
Emp346.Text="刘冬明";
Emp346.Link="EmpStructure.asp?EmpNo=0956";
Emp239.Nodes.Add(Emp346);
</script>
<script language="javascript">
var Emp349=new OrgNode();
Emp349.Text="毛永富";
Emp349.Link="EmpStructure.asp?EmpNo=0971";
Emp239.Nodes.Add(Emp349);
</script>
<script language="javascript">
var Emp395=new OrgNode();
Emp395.Text="苏灿明";
Emp395.Link="EmpStructure.asp?EmpNo=1081";
Emp239.Nodes.Add(Emp395);
</script>
<script language="javascript">
var Emp628=new OrgNode();
Emp628.Text="方杰";
Emp628.Link="EmpStructure.asp?EmpNo=1330";
Emp239.Nodes.Add(Emp628);
</script>
<script language="javascript">
var Emp631=new OrgNode();
Emp631.Text="姚林";
Emp631.Link="EmpStructure.asp?EmpNo=1333";
Emp239.Nodes.Add(Emp631);
</script>
<script language="javascript">
var Emp659=new OrgNode();
Emp659.Text="林斌";
Emp659.Link="EmpStructure.asp?EmpNo=1358";
Emp239.Nodes.Add(Emp659);
</script>
<script language="javascript">
var Emp664=new OrgNode();
Emp664.Text="周建宇";
Emp664.Link="EmpStructure.asp?EmpNo=1365";
Emp239.Nodes.Add(Emp664);
</script>
<script language="javascript">
var Emp668=new OrgNode();
Emp668.Text="胡院和";
Emp668.Link="EmpStructure.asp?EmpNo=1368";
Emp239.Nodes.Add(Emp668);
</script>
<script language="javascript">
var Emp390=new OrgNode();
Emp390.Text="叶金江";
Emp390.Link="EmpStructure.asp?EmpNo=1071";
Emp208.Nodes.Add(Emp390);
</script>
<script language="javascript">
var Emp418=new OrgNode();
Emp418.Text="郝钢铁";
Emp418.Link="EmpStructure.asp?EmpNo=1117";
Emp208.Nodes.Add(Emp418);
</script>
<script language="javascript">
var Emp189=new OrgNode();
Emp189.Text="高军";
Emp189.Link="EmpStructure.asp?EmpNo=0147";
Emp418.Nodes.Add(Emp189);
</script>
<script language="javascript">
var Emp222=new OrgNode();
Emp222.Text="梁恒平";
Emp222.Link="EmpStructure.asp?EmpNo=0541";
Emp418.Nodes.Add(Emp222);
</script>
<script language="javascript">
var Emp288=new OrgNode();
Emp288.Text="文丰勇";
Emp288.Link="EmpStructure.asp?EmpNo=0804";
Emp418.Nodes.Add(Emp288);
</script>
<script language="javascript">
var Emp336=new OrgNode();
Emp336.Text="李海燕";
Emp336.Link="EmpStructure.asp?EmpNo=0941";
Emp418.Nodes.Add(Emp336);
</script>
<script language="javascript">
var Emp357=new OrgNode();
Emp357.Text="林亮亮";
Emp357.Link="EmpStructure.asp?EmpNo=0991";
Emp418.Nodes.Add(Emp357);
</script>
<script language="javascript">
var Emp385=new OrgNode();
Emp385.Text="陈凌峰";
Emp385.Link="EmpStructure.asp?EmpNo=1065";
Emp418.Nodes.Add(Emp385);
</script>
<script language="javascript">
var Emp394=new OrgNode();
Emp394.Text="邓以刚";
Emp394.Link="EmpStructure.asp?EmpNo=1080";
Emp418.Nodes.Add(Emp394);
</script>
<script language="javascript">
var Emp505=new OrgNode();
Emp505.Text="刘捷";
Emp505.Link="EmpStructure.asp?EmpNo=1220";
Emp418.Nodes.Add(Emp505);
</script>
<script language="javascript">
var Emp450=new OrgNode();
Emp450.Text="龚文平";
Emp450.Link="EmpStructure.asp?EmpNo=1121";
Emp208.Nodes.Add(Emp450);
</script>
<script language="javascript">
var Emp181=new OrgNode();
Emp181.Text="周学敏";
Emp181.Link="EmpStructure.asp?EmpNo=0073";
Emp450.Nodes.Add(Emp181);
</script>
<script language="javascript">
var Emp182=new OrgNode();
Emp182.Text="张毅";
Emp182.Link="EmpStructure.asp?EmpNo=0082";
Emp450.Nodes.Add(Emp182);
</script>
<script language="javascript">
var Emp193=new OrgNode();
Emp193.Text="刘杰";
Emp193.Link="EmpStructure.asp?EmpNo=0166";
Emp450.Nodes.Add(Emp193);
</script>
<script language="javascript">
var Emp204=new OrgNode();
Emp204.Text="谷永强";
Emp204.Link="EmpStructure.asp?EmpNo=0357";
Emp450.Nodes.Add(Emp204);
</script>
<script language="javascript">
var Emp217=new OrgNode();
Emp217.Text="范琨";
Emp217.Link="EmpStructure.asp?EmpNo=0514";
Emp450.Nodes.Add(Emp217);
</script>
<script language="javascript">
var Emp318=new OrgNode();
Emp318.Text="张海水";
Emp318.Link="EmpStructure.asp?EmpNo=0895";
Emp217.Nodes.Add(Emp318);
</script>
<script language="javascript">
var Emp207=new OrgNode();
Emp207.Text="张谊";
Emp207.Link="EmpStructure.asp?EmpNo=0430";
Emp318.Nodes.Add(Emp207);
</script>
<script language="javascript">
var Emp372=new OrgNode();
Emp372.Text="王鹏";
Emp372.Link="EmpStructure.asp?EmpNo=1025";
Emp318.Nodes.Add(Emp372);
</script>
<script language="javascript">
var Emp433=new OrgNode();
Emp433.Text="杨峰";
Emp433.Link="EmpStructure.asp?EmpNo=1147";
Emp217.Nodes.Add(Emp433);
</script>
<script language="javascript">
var Emp437=new OrgNode();
Emp437.Text="冯卫宾";
Emp437.Link="EmpStructure.asp?EmpNo=1144";
Emp217.Nodes.Add(Emp437);
</script>
<script language="javascript">
var Emp457=new OrgNode();
Emp457.Text="姜文彬";
Emp457.Link="EmpStructure.asp?EmpNo=1178";
Emp217.Nodes.Add(Emp457);
</script>
<script language="javascript">
var Emp568=new OrgNode();
Emp568.Text="王洪福";
Emp568.Link="EmpStructure.asp?EmpNo=1267";
Emp217.Nodes.Add(Emp568);
</script>
<script language="javascript">
var Emp663=new OrgNode();
Emp663.Text="任学强";
Emp663.Link="EmpStructure.asp?EmpNo=1362";
Emp217.Nodes.Add(Emp663);
</script>
<script language="javascript">
var Emp283=new OrgNode();
Emp283.Text="于超";
Emp283.Link="EmpStructure.asp?EmpNo=0785";
Emp450.Nodes.Add(Emp283);
</script>
<script language="javascript">
var Emp309=new OrgNode();
Emp309.Text="赵刚";
Emp309.Link="EmpStructure.asp?EmpNo=0878";
Emp283.Nodes.Add(Emp309);
</script>
<script language="javascript">
var Emp589=new OrgNode();
Emp589.Text="于乐";
Emp589.Link="EmpStructure.asp?EmpNo=1290";
Emp283.Nodes.Add(Emp589);
</script>
<script language="javascript">
var Emp296=new OrgNode();
Emp296.Text="桑志杰";
Emp296.Link="EmpStructure.asp?EmpNo=0846";
Emp450.Nodes.Add(Emp296);
</script>
<script language="javascript">
var Emp325=new OrgNode();
Emp325.Text="徐向威";
Emp325.Link="EmpStructure.asp?EmpNo=0914";
Emp450.Nodes.Add(Emp325);
</script>
<script language="javascript">
var Emp331=new OrgNode();
Emp331.Text="张恒会";
Emp331.Link="EmpStructure.asp?EmpNo=0931";
Emp450.Nodes.Add(Emp331);
</script>
<script language="javascript">
var Emp403=new OrgNode();
Emp403.Text="张晓辉";
Emp403.Link="EmpStructure.asp?EmpNo=1094";
Emp450.Nodes.Add(Emp403);
</script>
<script language="javascript">
var Emp451=new OrgNode();
Emp451.Text="孙波";
Emp451.Link="EmpStructure.asp?EmpNo=1118";
Emp450.Nodes.Add(Emp451);
</script>
<script language="javascript">
var Emp209=new OrgNode();
Emp209.Text="殷丽娜";
Emp209.Link="EmpStructure.asp?EmpNo=0437";
Emp451.Nodes.Add(Emp209);
</script>
<script language="javascript">
var Emp599=new OrgNode();
Emp599.Text="吴楠";
Emp599.Link="EmpStructure.asp?EmpNo=1301";
Emp451.Nodes.Add(Emp599);
</script>
<script language="javascript">
var Emp582=new OrgNode();
Emp582.Text="徐岩";
Emp582.Link="EmpStructure.asp?EmpNo=1268";
Emp450.Nodes.Add(Emp582);
</script>
<script language="javascript">
var Emp660=new OrgNode();
Emp660.Text="魏宏葳";
Emp660.Link="EmpStructure.asp?EmpNo=1359";
Emp450.Nodes.Add(Emp660);
</script>
<script language="javascript">
var Emp671=new OrgNode();
Emp671.Text="米来";
Emp671.Link="EmpStructure.asp?EmpNo=1372";
Emp660.Nodes.Add(Emp671);
</script>
<script language="javascript">
var Emp672=new OrgNode();
Emp672.Text="程钰涵";
Emp672.Link="EmpStructure.asp?EmpNo=1373";
Emp660.Nodes.Add(Emp672);
</script>
<script language="javascript">
var Emp665=new OrgNode();
Emp665.Text="任学强";
Emp665.Link="EmpStructure.asp?EmpNo=13622";
Emp450.Nodes.Add(Emp665);
</script>
<script language="javascript">
var Emp555=new OrgNode();
Emp555.Text="叶晓霞";
Emp555.Link="EmpStructure.asp?EmpNo=1225";
Emp208.Nodes.Add(Emp555);
</script>
<script language="javascript">
var Emp649=new OrgNode();
Emp649.Text="时伟侠2";
Emp649.Link="EmpStructure.asp?EmpNo=01372";
Emp208.Nodes.Add(Emp649);
</script>
<script language="javascript">
var Emp306=new OrgNode();
Emp306.Text="张锐";
Emp306.Link="EmpStructure.asp?EmpNo=0866";
Emp649.Nodes.Add(Emp306);
</script>
<script language="javascript">
var Emp332=new OrgNode();
Emp332.Text="张万德";
Emp332.Link="EmpStructure.asp?EmpNo=0932";
Emp649.Nodes.Add(Emp332);
</script>
<script language="javascript">
var Emp650=new OrgNode();
Emp650.Text="孙振华2";
Emp650.Link="EmpStructure.asp?EmpNo=03492";
Emp649.Nodes.Add(Emp650);
</script>
<script language="javascript">
var Emp337=new OrgNode();
Emp337.Text="廉亚琼";
Emp337.Link="EmpStructure.asp?EmpNo=0942";
Emp650.Nodes.Add(Emp337);
</script>
<script language="javascript">
var OrgShows=new OrgShow(Emp208);
OrgShows.Top=50;
OrgShows.Left=50;
OrgShows.IntervalWidth=10;
OrgShows.IntervalHeight=20;
OrgShows.ShowType=2;
OrgShows.BoxHeight=100;
//OrgShows.BoxTemplet="<div id=\"{Id}\" class=\"OrgBox\"><img src="{EmpPhoto}\" /><span>{EmpName}</span><div>{department}</div></div>"
OrgShows.Run();
$("LoadBox").style.display="none";
</script>
</body>
</html>

运行后刷新才能正常显示

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • JavaScript入门教程(二)_javascript教程教程

    JavaScript入门教程(二)_javascript教程教程

    2015-10-10 14:25

  • JavaScript入门教程(五)_javascript教程教程

    JavaScript入门教程(五)_javascript教程教程

    2015-10-10 14:21

  • JavaScript入门教程(四)_javascript教程教程

    JavaScript入门教程(四)_javascript教程教程

    2015-10-10 14:19

  • JavaScript入门教程(三)_javascript教程教程

    JavaScript入门教程(三)_javascript教程教程

    2015-10-10 14:17

网友点评