论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > Javascript教程
Tag:验证,特效,入门,实例,验证,表单,特效,正则表达式,跑马灯,document,函数,代码,getElementByID,菜单,图片,视频教程

Javascript教程_JS版组织结构图

文章类别:Javascript | 发表日期:2010-5-4 9:40:50

原来想在网上找,结果这个东西竟然没有,找到一个C#版的还是要收费,无奈只能苦战三天,终于搞定了,请各位测试,有可能往下加节点会有不对的也说不定。
请不要期待兼容性,从来不顾及这个
如果各位有更好的思路请不吝指教
另外,目前只做了一种展示方式,如果各位有兴趣需要,等我再更新
功能:支持自定义节点样式,无限级节点支持,节点间宽度高度间隔自定义,颜色线条大小自定义
修正部分错误
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>员工结构</title>
<script language="javascript" src="http://www.on-cn.cn/js/organization.js"></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>
运行后刷新才能正常显示
视频教程列表
文章教程搜索
 
Javascript推荐教程
Javascript热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058