1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 5 <title>无标题文档</title> 6 <style type="text/css"> 7 <!-- 8 .zz { 9 height: 600px; 10 width: 958px; 11 border: 1px solid #CCCCCC; 12 margin-top: 5px; 13 margin-bottom: 5px; 14 margin-left:auto; 15 margin-right:auto; 16 17 overflow:auto; 18 white-space:nowrap; 19 position:relative; 20 background:#25a317; 21 } 22 a {font-family: "宋体"; 23 font-size: 12pt; 24 color: #666666; 25 text-decoration: none;} 26 --> 27 </style> 28 29 </head> 30 <script language="javascript"> 31 function $(id) { return document.getElementById(id) } 32 function offset(node) { 33 var x = node.offsetLeft; 34 var y = node.offsetTop; 35 var w = node.offsetWidth; 36 var h = node.offsetHeight; 37 var parent = node.offsetParent; 38 while (parent != null) { 39 x += parent.offsetLeft; 40 y += parent.offsetTop; 41 parent = parent.offsetParent; 42 } 43 if (w == 0) { 44 w += parseInt(node.currentStyle.width); 45 w += parseInt(node.currentStyle.paddingRight); 46 w += parseInt(node.currentStyle.paddingLeft); 47 w += parseInt(node.currentStyle.borderWidth) * 2; 48 } 49 if (h == 0) { 50 h += parseInt(node.currentStyle.height); 51 h += parseInt(node.currentStyle.paddingTop); 52 h += parseInt(node.currentStyle.paddingBottom); 53 h += parseInt(node.currentStyle.borderWidth) * 2; 54 } 55 return { x: x, y: y, w: w, h: h }; 56 } 57 58 function OrgNode() { 59 this.Text = null; 60 this.Link = null; 61 this.Description = "点击查看相关人员"; 62 this.BoxWidth = null; 63 this.BoxHeight = null; 64 this.parentNode = null; 65 this.NodeGroupId = null; //同一层的级别序号,从零开始 66 this.NodeOrderId = null; //同一级中的序号,从零开始 67 this.TopLine = null; 68 this.BottomLine = null; 69 this.Depth = null; 70 this.Top = null; 71 this.Left = null; 72 this.Type = null; 73 this.Nodes = []; 74 this.customParam = []; //节点自定义参数 75 var This = this; 76 this.Nodes.Add = function (OrgNode_) { 77 OrgNode_.parentNode = This; 78 This.Nodes[This.Nodes.length] = OrgNode_; 79 } 80 this.Box = null; 81 this.Templet = null; 82 this.Id = "OrgNode_" + GetRandomId(20); 83 84 this.inIt = function () { 85 if (this.inIted == true) return; 86 var tempDiv = document.createElement("DIV"); 87 document.getElementById("zz").appendChild(tempDiv); 88 //document.body.appendChild(tempDiv); 89 90 var tempHTML = this.Templet; 91 tempHTML = tempHTML.replace("{Id}", this.Id); 92 tempHTML = tempHTML.replace("{Text}", this.Text); 93 tempHTML = (this.Link == null) ? tempHTML.replace("{Link}", "JavaScript:void(0)") : tempHTML.replace("{Link}", this.Link); 94 tempHTML = tempHTML.replace("{Description}", this.Description); 95 for (var Param_ in this.customParam) { 96 tempHTML = tempHTML.replace("{" + Param_ + "}", this.customParam[Param_]); 97 } 98 tempDiv.innerHTML = tempHTML; 99 this.Box = $(this.Id); 100 101 if (this.BoxWidth != null) { 102 if (offset(this.Box).w < this.BoxWidth) { 103 this.Box.style.width = this.BoxWidth + "px"; 104 if (offset(this.Box).w > this.BoxWidth) { 105 this.Box.style.width = (this.BoxWidth - (offset(this.Box).w - this.BoxWidth)) + "px"; 106 } 107 } 108 } 109 110 if (this.BoxHeight != null) { 111 if (offset(this.Box).h < this.BoxHeight) { 112 this.Box.style.height = this.BoxHeight + "px"; 113 if (offset(this.Box).h > this.BoxHeight) { 114 this.Box.style.height = (this.BoxHeight - (offset(this.Box).h - this.BoxHeight)) + "px"; 115 } 116 } 117 } 118 119 this.Width = offset(this.Box).w; 120 this.Height = offset(this.Box).h; 121 this.inIted = true; 122 } 123 124 function GetRandomId(n_) { 125 var litter = "abcdefghijklmnopqrstuvwxyz" 126 litter += litter.toUpperCase() 127 litter += "1234567890"; 128 var idRnd = ""; 129 for (var i = 1; i <= n_; i++) { 130 idRnd += litter.substr((0 + Math.round(Math.random() * (litter.length - 0))), 1) 131 } 132 return idRnd; 133 } 134 } 135 136 137 function OrgShow(OrgNode_) { 138 this.LineSize = 2; 139 this.LineColor = "#000000"; 140 141 this.IntervalWidth = 100; 142 this.IntervalHeight = 50; 143 this.Top = 0; 144 this.Left = 0; 145 this.Depth = 0; 146 this.Nodes = []; 147 this.DepthGroup = []; //this.DepthGroup[n].Nodes 层深节点集合 148 //this.DepthGroup[n].NodeGroups[m] 层深节点按上层分类集合 this.DepthGroup[n].NodeGroups[m][k]层深节点 149 var This = this; 150 this.BoxWidth = null; 151 this.BoxHeight = null; 152 this.BoxTemplet = null; 153 this.ShowType = null; 154 155 this.Run = function () { 156 BoxInit(OrgNode_); 157 GetDepth(OrgNode_); 158 SetDepthsHeight()//设置层深高度 159 160 //*************************** 161 for (var n = 1; n <= this.Depth; n++) {//设置顶距离 162 var tempTop = this.Top + GetDepthHeightToRoot(n); 163 var tempNodes = this.DepthGroup[n].Nodes; 164 for (var m = 0; m < tempNodes.length; m++) { 165 tempNodes[m].Top = tempTop; 166 } 167 } 168 169 //*************************** 170 for (var n = this.Depth; n >= 1; n--) {//设置左距离 171 var DepthNodes = this.DepthGroup[n].Nodes; 172 if (n == this.Depth) { 173 for (var m = 0; m < DepthNodes.length; m++) { 174 if (m == 0) { 175 DepthNodes[m].Left = 0; 176 } else { 177 DepthNodes[m].Left = DepthNodes[m - 1].Left + DepthNodes[m - 1].Width + this.IntervalWidth; 178 } 179 } 180 } else { 181 for (var m = 0; m < DepthNodes.length; m++) {//根据下级节点位置,确定节点位置 182 if (DepthNodes[m].Nodes.length != 0) { 183 var tempNodeLeft_ = DepthNodes[m].Nodes[0].Left + (GetGroupWidthByNode(DepthNodes[m].Nodes[0]) / 2); 184 tempNodeLeft_ -= (DepthNodes[m].Width / 2); 185 DepthNodes[m].Left = tempNodeLeft_; 186 } 187 } 188 for (var m = 0; m < DepthNodes.length; m++) { 189 if (DepthNodes[m].Left == null) {//没有下级节点的, 190 SetLeftByDepthNode(DepthNodes, m, "LTR"); 191 } 192 } 193 194 for (var m = 1; m < DepthNodes.length; m++) {//修正错误位置 195 var ErrDistance = this.IntervalWidth - (DepthNodes[m].Left - DepthNodes[m - 1].Left - DepthNodes[m - 1].Width); 196 if (ErrDistance > 0) { 197 for (var u_ = m; u_ < DepthNodes.length; u_++) { 198 AmendNodeLeft(DepthNodes[u_], ErrDistance); 199 } 200 } 201 } 202 } 203 } 204 SetDepthGroupWidth();//设置群组宽度 205 206 var MaxLeftValue = this.Nodes[0].Left; 207 for (var n = 1; n < this.Nodes.length; n++) {//取得最小左距离 208 if (MaxLeftValue > this.Nodes[n].Left) { 209 MaxLeftValue = this.Nodes[n].Left; 210 } 211 } 212 MaxLeftValue = (-MaxLeftValue) + this.Left; 213 for (var n = 0; n < this.Nodes.length; n++) {//重新设置距离 214 this.Nodes[n].Left += MaxLeftValue; 215 this.Nodes[n].Box.style.left = this.Nodes[n].Left + "px" 216 this.Nodes[n].Box.style.top = this.Nodes[n].Top + "px" 217 } 218 219 220 //*************************** 221 for (var n = 1; n <= this.Depth; n++) {//设置竖线条 222 var tempNodes = this.DepthGroup[n].Nodes; 223 for (var m = 0; m < tempNodes.length; m++) { 224 if (n != this.Depth) {//设置底线条 225 if (tempNodes[m].Nodes.length != 0) { 226 var tempLineLeft = tempNodes[m].Left + (tempNodes[m].Width / 2); 227 var tempLineHeight = ((this.IntervalHeight - this.LineSize) / 2); 228 tempLineHeight += (this.DepthGroup[n].Height - tempNodes[m].Height); 229 var tempLineTop = tempNodes[m].Top + tempNodes[m].Height; 230 var tempBottomLine = new CreateLine(2, tempLineTop, tempLineLeft, tempLineHeight, this.LineSize, this.LineColor, "LineBottom_" + tempNodes[m].Id); 231 tempNodes[m].BottomLine = tempBottomLine.Line; 232 } 233 } 234 if (n != 1) {//设置顶线条 235 var tempLineLeft = tempNodes[m].Left + (tempNodes[m].Width / 2); 236 var tempLineHeight = ((this.IntervalHeight - this.LineSize) / 2); 237 var tempLineTop = tempNodes[m].Top - tempLineHeight; 238 if (this.DepthGroup[tempNodes[m].Depth].NodeGroups[tempNodes[m].NodeGroupId].length == 1) {//如果只有一个节点 239 var tempBottomLineHeight = parseFloat(tempNodes[m].parentNode.BottomLine.style.height) + this.LineSize; 240 tempNodes[m].parentNode.BottomLine.style.height = (tempLineHeight + tempBottomLineHeight) + "px"; 241 } else { 242 var temptopLine = new CreateLine(2, tempLineTop, tempLineLeft, tempLineHeight, this.LineSize, this.LineColor, "LineTop_" + tempNodes[m].Id); 243 tempNodes[m].TopLine = temptopLine.Line; 244 } 245 } 246 } 247 } 248 249 for (var n = 2; n <= this.Depth; n++) {//设置横线条 250 var tempNodeGroups_ = this.DepthGroup[n].NodeGroups; 251 for (var m = 0; m < tempNodeGroups_.length; m++) { 252 if (tempNodeGroups_[m].length != 1) { 253 var tempLineWidth = tempNodeGroups_[m].Width - (tempNodeGroups_[m][0].Width / 2) + this.LineSize; 254 tempLineWidth -= (tempNodeGroups_[m][tempNodeGroups_[m].length - 1].Width / 2); 255 var tempLineTop = tempNodeGroups_[m][0].Top - ((this.IntervalHeight - this.LineSize) / 2) - this.LineSize; 256 var tempLineLeft = tempNodeGroups_[m][0].Left + (tempNodeGroups_[m][0].Width / 2); 257 var tempGroupLine = new CreateLine(1, tempLineTop, tempLineLeft, tempLineWidth, this.LineSize, this.LineColor, "LineGroup_" + tempNodeGroups_[m][0].Id); 258 } 259 } 260 } 261 262 //************************************************************************************************* 263 264 function AmendNodeLeft(Node_, ErrDistance_) {//修正错误位置 265 Node_.Left = Node_.Left + ErrDistance_; 266 if (Node_.Nodes.length != 0) { 267 for (var n = 0; n < Node_.Nodes.length; n++) { 268 AmendNodeLeft(Node_.Nodes[n], ErrDistance_); 269 } 270 } 271 } 272 273 274 } 275 276 // 根据群组中任一节点,取得群组宽度 277 function GetGroupWidthByNode(Node_) {//根据群组中任一节点,取得群组宽度 278 var tempNodesGroup_ = This.DepthGroup[Node_.Depth].NodeGroups[Node_.NodeGroupId]; 279 var tempGroupWidth_ = tempNodesGroup_[tempNodesGroup_.length - 1].Left - tempNodesGroup_[0].Left; 280 tempGroupWidth_ += tempNodesGroup_[tempNodesGroup_.length - 1].Width 281 return tempGroupWidth_; 282 } 283 284 285 function SetLeftByDepthNode(DepthNodes_, NodeId, Type) { 286 if (Type == "LTR" && NodeId == DepthNodes_.length - 1) { 287 SetLeftByDepthNode(DepthNodes_, NodeId, "RTL"); 288 return; 289 } 290 if (Type == "RTL" && NodeId == 0) { 291 SetLeftByDepthNode(DepthNodes_, NodeId, "LTR"); 292 return; 293 } 294 var FindIndex = null; 295 if (Type == "LTR") { 296 for (var r_ = NodeId + 1; r_ < DepthNodes_.length; r_++) { 297 if (DepthNodes_[r_].Left != null) { 298 FindIndex = r_; 299 break; 300 } 301 } 302 if (FindIndex == null) { 303 SetLeftByDepthNode(DepthNodes_, NodeId, "RTL"); 304 return; 305 } else { 306 for (var r_ = FindIndex - 1; r_ >= NodeId; r_--) { 307 DepthNodes_[r_].Left = DepthNodes_[r_ + 1].Left - This.IntervalWidth - DepthNodes_[r_].Width; 308 } 309 } 310 } 311 if (Type == "RTL") { 312 for (var r_ = NodeId - 1; r_ >= 0; r_--) { 313 if (DepthNodes_[r_].Left != null) { 314 FindIndex = r_; 315 break; 316 } 317 } 318 if (FindIndex == null) { 319 SetLeftByDepthNode(DepthNodes_, NodeId, "LTR"); 320 return; 321 } else { 322 for (var r_ = FindIndex + 1; r_ <= NodeId; r_++) { 323 DepthNodes_[r_].Left = DepthNodes_[r_ - 1].Left + This.IntervalWidth + DepthNodes_[r_ - 1].Width; 324 } 325 } 326 } 327 } 328 329 330 331 332 333 334 // 取得距离顶层的高度 335 function GetDepthHeightToRoot(DepthId) {//取得距离顶层的高度 336 var tempHeight_ = 0; 337 for (var x_ = DepthId; x_ >= 1; x_--) { 338 tempHeight_ += This.DepthGroup[x_].Height; 339 } 340 tempHeight_ += This.IntervalHeight * (DepthId - 1); 341 tempHeight_ -= This.DepthGroup[DepthId].Height; 342 return tempHeight_; 343 } 344 345 // 根据下级节点位置设置节点位置 346 function SetLeftPosByChildNode(Node_, ChildNode_) {//根据下级节点位置设置节点位置 347 var tempNodeGroups = This.DepthGroup[ChildNode_.Depth].NodeGroups[ChildNode_.NodeGroupId]; 348 var tempNodeLeft; 349 if (tempNodeGroups.length == 1) { 350 tempNodeLeft = ((ChildNode_.Width / 2) + ChildNode_.Left) - (Node_.Width / 2); 351 } else { 352 tempNodeLeft = GetFirstLeftPos(ChildNode_) + (tempNodeGroups.Width / 2) - (Node_.Width / 2); 353 } 354 Node_.Left = tempNodeLeft; 355 } 356 357 // 根据节点位置取得同一级中首个节点的位置 358 // Node_ 为首节点 359 function GetFirstLeftPos(Node_) {//根据节点位置取得同一级中首个节点位置 360 if (Node_.NodeOrderId == 0) {//Node_为首节点 361 return Node_.Left; 362 } 363 var tempWidth = 0; 364 for (var k_ = 0; k_ <= Node_.NodeOrderId; k_++) { 365 var tempGroupsNode = This.DepthGroup[Node_.Depth].NodeGroups[Node_.NodeGroupId][k_]; 366 tempWidth += tempGroupsNode.Width; 367 } 368 tempWidth += (Node_.NodeOrderId * This.IntervalWidth); 369 return ((Node_.Left - tempWidth) + (Node_.Width / 2)); 370 } 371 372 // 取得层宽 373 function ChildNodesWidth(OrgObj) {//取得层宽 374 var ReWidth = 0; 375 for (var s_ = 0; s_ < OrgObj.Nodes.length; s_++) { 376 ReWidth += OrgObj.Nodes[s_].Width; 377 } 378 ReWidth += (OrgObj.Nodes.length - 1) * This.IntervalWidth; 379 return ReWidth; 380 } 381 382 // 设置层深宽度 383 function SetDepthGroupWidth() {//设置层深宽度 384 for (var n_ = 1; n_ <= This.Depth; n_++) { 385 var tempNodeGroups = This.DepthGroup[n_].NodeGroups; 386 for (var m_ = 0; m_ < tempNodeGroups.length; m_++) { 387 tempNodeGroups[m_].Width = GetGroupWidthByNode(tempNodeGroups[m_][0]); 388 } 389 } 390 } 391 392 // 设置层深高度 393 function SetDepthsHeight() {//设置层深高度 394 for (var n_ = 1; n_ <= This.Depth; n_++) { 395 var tempNodes_ = This.DepthGroup[n_].Nodes; 396 var MaxHeight = 0; 397 for (var m_ = 0; m_ < tempNodes_.length; m_++) { 398 if (tempNodes_[m_].Height > MaxHeight) { 399 MaxHeight = tempNodes_[m_].Height; 400 } 401 } 402 This.DepthGroup[n_].Height = MaxHeight; 403 } 404 } 405 406 // 取得层深,层群集 407 function GetDepth(OrgObj) {//取得层深,层群集 408 This.Nodes[This.Nodes.length] = OrgObj; 409 OrgObj.Depth = (This.Depth == 0) ? This.Depth + 1 : OrgObj.parentNode.Depth + 1; 410 This.Depth = (OrgObj.Depth > This.Depth) ? OrgObj.Depth : This.Depth; 411 if (typeof (This.DepthGroup[OrgObj.Depth]) != "object") { 412 This.DepthGroup[OrgObj.Depth] = []; 413 This.DepthGroup[OrgObj.Depth].Nodes = []; 414 This.DepthGroup[OrgObj.Depth].NodeGroups = []; 415 } 416 This.DepthGroup[OrgObj.Depth].Nodes[This.DepthGroup[OrgObj.Depth].Nodes.length] = OrgObj; 417 if (OrgObj.Depth == 1) { 418 This.DepthGroup[OrgObj.Depth].NodeGroups[0] = []; 419 This.DepthGroup[OrgObj.Depth].NodeGroups[0][0] = OrgObj; 420 OrgObj.NodeGroupId = 0; 421 OrgObj.NodeOrderId = 0; 422 } else { 423 if (This.DepthGroup[OrgObj.Depth].NodeGroups.length == 0) { 424 This.DepthGroup[OrgObj.Depth].NodeGroups[0] = []; 425 This.DepthGroup[OrgObj.Depth].NodeGroups[0][0] = OrgObj; 426 OrgObj.NodeGroupId = 0; 427 OrgObj.NodeOrderId = 0; 428 } else { 429 var GroupsLength = This.DepthGroup[OrgObj.Depth].NodeGroups.length; 430 var GroupNodesLength = This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength - 1].length; 431 if (OrgObj.parentNode == This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength - 1][GroupNodesLength - 1].parentNode) { 432 This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength - 1][GroupNodesLength] = OrgObj; 433 OrgObj.NodeGroupId = GroupsLength - 1; 434 OrgObj.NodeOrderId = GroupNodesLength; 435 } else { 436 if (typeof (This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength]) != "object") { 437 This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength] = []; 438 } 439 GroupNodesLength = This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength].length; 440 This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength][GroupNodesLength] = OrgObj; 441 OrgObj.NodeGroupId = GroupsLength; 442 OrgObj.NodeOrderId = GroupNodesLength; 443 } 444 } 445 } 446 447 if (OrgObj.Nodes.length != 0) { 448 for (var n = 0; n < OrgObj.Nodes.length; n++) { 449 GetDepth(OrgObj.Nodes[n]); 450 } 451 } 452 } 453 454 // 节点初始化 455 function BoxInit(OrgObj_) {//节点初始化 456 OrgObj_.Templet = GetBoxTemplet(); 457 OrgObj_.BoxWidth = This.BoxWidth; 458 OrgObj_.BoxHeight = This.BoxHeight; 459 OrgObj_.inIt(); 460 461 if (OrgObj_.Nodes.length != 0) { 462 for (var n = 0; n < OrgObj_.Nodes.length; n++) { 463 BoxInit(OrgObj_.Nodes[n]); 464 } 465 } 466 } 467 468 // 取得节点模板 469 function GetBoxTemplet() {//取得节点模板 470 if (This.BoxTemplet != null) return This.BoxTemplet; 471 var TempletStr = "<div id=\"{Id}\" style=\"font-size:12pt;padding:5px 5px 5px 5px;border:thin solid orange;background-color:lightgrey; clear:left;float:left;text-align:center;position:absolute;" 472 if (This.ShowType == 2) TempletStr += "writing-mode: tb-rl;"; 473 TempletStr += "\" title=\"{Description}\" ><a href=\"{Link}\" target=\"_blank\">{Text}</a></div>"; 474 return TempletStr; 475 } 476 477 function CreateLine(type_, top_, left_, long_, size_, color_, id_) { 478 this.Type = type_; 479 top_ = top_ + ""; 480 left_ = left_ + ""; 481 long_ = long_ + ""; 482 this.Top = (top_.substr(top_.length - 2).toLowerCase() != "px") ? top_ + "px" : top_; 483 this.Left = (left_.substr(left_.length - 2).toLowerCase() != "px") ? left_ + "px" : left_; 484 this.Long = (long_.substr(long_.length - 2).toLowerCase() != "px") ? long_ + "px" : long_; 485 this.Size = (size_ == undefined) ? "1px" : size_ + ""; 486 this.Id = (id_ == undefined) ? null : id_; 487 this.Size = (this.Size.substr(this.Size.length - 2).toLowerCase() != "px") ? this.Size + "px" : this.Size; 488 this.Color = (color_ == undefined) ? "#000000" : color_; 489 490 this.Line = document.createElement("DIV"); 491 document.getElementById("zz").appendChild(this.Line); 492 //document.body.appendChild(this.Line); 493 494 this.Line.innerText = "x"; 495 this.Line.style.position = "absolute"; 496 this.Line.style.top = this.Top; 497 this.Line.style.left = this.Left; 498 this.Line.style.overflow = "hidden"; 499 if (this.Type == 1) { 500 this.Line.style.borderTopColor = this.Color; 501 this.Line.style.borderTopWidth = this.Size; 502 this.Line.style.borderTopStyle = "solid"; 503 this.Line.style.width = this.Long; 504 this.Line.style.height = "0px"; 505 } else { 506 this.Line.style.borderLeftColor = this.Color; 507 this.Line.style.borderLeftWidth = this.Size; 508 this.Line.style.borderLeftStyle = "solid"; 509 this.Line.style.height = this.Long; 510 this.Line.style.width = "0px"; 511 } 512 if (this.Id != null) this.Line.id = this.Id; 513 } 514 } 515 </script> 516 <body> 517 <div class="zz" id="zz"> 518 <div id="LoadBox">员工组织结构图正在生成,请不要刷新或者关闭窗口,稍后……</div> 519 <script language="javascript"> 520 var xy0101 = new OrgNode(); 521 xy0101.Text = "总经理(1)"; 522 xy0101.Description = "总经理:某某(电话:XXXXXXXXXXX)" 523 xy0101.Link = "#"; 524 525 var xy0201 = new OrgNode(); 526 xy0201.Text = "副总经理(1)"; 527 xy0201.Description = "副总经理:某某" 528 xy0201.Link = "#"; 529 xy0101.Nodes.Add(xy0201); 530 531 var xy0301 = new OrgNode(); 532 xy0301.Text = "综合支撑部(1)"; 533 xy0301.Description = "主任:某某" 534 xy0301.Link = "#"; 535 xy0201.Nodes.Add(xy0301); 536 537 var xy0302 = new OrgNode(); 538 xy0302.Text = "政企客户销售中心(1)"; 539 xy0302.Description = "经理:某某" 540 xy0302.Link = "#"; 541 xy0201.Nodes.Add(xy0302); 542 543 var xy0303 = new OrgNode(); 544 xy0303.Text = "网络服务部(1)"; 545 xy0303.Description = "经理:某某" 546 xy0303.Link = "#"; 547 xy0201.Nodes.Add(xy0303); 548 549 var xy0304 = new OrgNode(); 550 xy0304.Text = "公众客户销售中心(2)"; 551 xy0304.Description = "经理:某某 经理:某某" 552 xy0304.Link = "#"; 553 xy0201.Nodes.Add(xy0304); 554 555 var xy0401 = new OrgNode(); 556 xy0401.Text = "人力资源(1)"; 557 xy0401.Description = "人事:某某" 558 xy0401.Link = "#"; 559 xy0301.Nodes.Add(xy0401); 560 561 var xy0402 = new OrgNode(); 562 xy0402.Text = "财会室(1)"; 563 xy0402.Description = "财务:某某" 564 xy0402.Link = "#"; 565 xy0301.Nodes.Add(xy0402); 566 567 var xy0403 = new OrgNode(); 568 xy0403.Text = "秘书室(1)"; 569 xy0403.Description = "秘书:某某" 570 xy0403.Link = "#"; 571 xy0301.Nodes.Add(xy0403); 572 573 var xy0404 = new OrgNode(); 574 xy0404.Text = "车队(5)"; 575 xy0404.Description = "队长:某某 驾驶员:某某 驾驶员:某某 驾驶员:某某 驾驶员:某某" 576 xy0404.Link = "#"; 577 xy0301.Nodes.Add(xy0404); 578 579 var xy0405 = new OrgNode(); 580 xy0405.Text = "销售支撑(1)"; 581 xy0405.Description = "支撑:某某" 582 xy0405.Link = "#"; 583 xy0302.Nodes.Add(xy0405); 584 585 var xy0406 = new OrgNode(); 586 xy0406.Text = "行业客户经理(6)"; 587 xy0406.Description = "经理:某某 经理:某某 经理:某某 经理:某某 经理:某某 经理:某某" 588 xy0406.Link = "#"; 589 xy0302.Nodes.Add(xy0406); 590 591 var xy0406a = new OrgNode(); 592 xy0406a.Text = "VIP客户经理(2)"; 593 xy0406a.Description = "客户经理:某某 客户经理:某某" 594 xy0406a.Link = "#"; 595 xy0302.Nodes.Add(xy0406a); 596 597 var xy0407 = new OrgNode(); 598 xy0407.Text = "网络服务支撑(1)"; 599 xy0407.Description = "服务支撑:某某" 600 xy0407.Link = "#"; 601 xy0303.Nodes.Add(xy0407); 602 603 var xy0408 = new OrgNode(); 604 xy0408.Text = "综合设备维护组(11)"; 605 xy0408.Description = "班长:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某 设备维护:某某" 606 xy0408.Link = "#"; 607 xy0303.Nodes.Add(xy0408); 608 609 var xy0409 = new OrgNode(); 610 xy0409.Text = "管线维护组(9)"; 611 xy0409.Description = "班长:某某 管线维护:某某 管线维护:某某 管线维护:某某 管线维护:某某 管线维护:某某 管线维护:某某 管线维护:某某 管线维护:某某" 612 xy0409.Link = "#"; 613 xy0303.Nodes.Add(xy0409); 614 615 var xy0410 = new OrgNode(); 616 xy0410.Text = "装移维护组(7)"; 617 xy0410.Description = "班长:某某 装移维护:某某 装移维护:某某 装移维护:某某 装移维护:某某 装移维护:某某 装移维护:某某" 618 xy0410.Link = "#"; 619 xy0303.Nodes.Add(xy0410); 620 621 var xy0411 = new OrgNode(); 622 xy0411.Text = "网络客户经理(8)"; 623 xy0411.Description = "班长:某某 经理:某某 经理:某某 经理:某某 经理:某某 经理:某某 经理:某某 经理:某某" 624 xy0411.Link = "#"; 625 xy0304.Nodes.Add(xy0411); 626 627 var xy0412 = new OrgNode(); 628 xy0412.Text = "销售支撑(1)"; 629 xy0412.Description = "支撑:某某" 630 xy0412.Link = "#"; 631 xy0304.Nodes.Add(xy0412); 632 633 var xy0413 = new OrgNode(); 634 xy0413.Text = "业务支撑(3)"; 635 xy0413.Description = "支撑:某某 支撑:某某 支撑:某某" 636 xy0413.Link = "#"; 637 xy0304.Nodes.Add(xy0413); 638 639 var xy0414 = new OrgNode(); 640 xy0414.Text = "营业厅值班长(4)"; 641 xy0414.Description = "值班长:某某 值班长:某某 值班长:某某 值班长:某某" 642 xy0414.Link = "#"; 643 xy0304.Nodes.Add(xy0414); 644 645 var xy0415 = new OrgNode(); 646 xy0415.Text = "农村支局(0)"; 647 xy0415.Link = "#"; 648 xy0304.Nodes.Add(xy0415); 649 650 var xy0501 = new OrgNode(); 651 xy0501.Text = "后山支局(2)"; 652 xy0501.Description = "支局长:某某 客户经理:某某" 653 xy0501.Link = "#"; 654 xy0415.Nodes.Add(xy0501); 655 656 var xy0502 = new OrgNode(); 657 xy0502.Text = "摩尼支局(1)"; 658 xy0502.Description = "支局长:某某" 659 xy0502.Link = "#"; 660 xy0415.Nodes.Add(xy0502); 661 662 var xy0503 = new OrgNode(); 663 xy0503.Text = "两河支局(2)"; 664 xy0503.Description = "支局长:某某 客户经理:某某" 665 xy0503.Link = "#"; 666 xy0415.Nodes.Add(xy0503); 667 668 var xy0504 = new OrgNode(); 669 xy0504.Text = "马岭支局(2)"; 670 xy0504.Description = "支局长:某某 客户经理:某某" 671 xy0504.Link = "#"; 672 xy0415.Nodes.Add(xy0504); 673 674 var xy0505 = new OrgNode(); 675 xy0505.Text = "天池支局(2)"; 676 xy0505.Description = "支局长:某某 客户经理:某某" 677 xy0505.Link = "#"; 678 //xy0415.Nodes.Add(xy0505); 679 xy0404.Nodes.Add(xy0505); 680 681 var xy0506 = new OrgNode(); 682 xy0506.Text = "城郊支局(2)"; 683 xy0506.Description = "支局长:某某 客户经理:某某" 684 xy0506.Link = "#"; 685 //xy0415.Nodes.Add(xy0506); 686 //xy0401.Nodes.Add(xy0506); 687 xy0505.Nodes.Add(xy0506); 688 </script> 689 690 <script language="javascript"> 691 var OrgShows = new OrgShow(xy0101); 692 OrgShows.Top = 20; 693 OrgShows.Left = 20; 694 OrgShows.IntervalWidth = 12; 695 OrgShows.IntervalHeight = 50; 696 OrgShows.ShowType = 2; 697 OrgShows.BoxHeight = 80; 698 OrgShows.LineSize = 5; //设置线条大小 699 OrgShows.LineColor = "#cccccc"; //设置线条颜色 700 //OrgShows.BoxTemplet="<div id=\"{Id}\" class=\"OrgBox\"><img src=\"{EmpPhoto}\" /><span>{EmpName}</span><div>{department}</div></div>" 701 OrgShows.Run(); 702 $("LoadBox").style.display = "none"; 703 </script> 704 </div> 705 </body> 706 </html>