
var fvv={_Value:"",_Text:"",rmk:new Array(),grv:new Array(),sxv:null,hpm:null,ctrl:null,Title:"选择可视范围..."};if(ymr(DcxTree["T2079_27"]))DcxTree["T2079_27"]={};fvv.eni=function(a,b,c){fvv.rmk.push(parseInt(a,10));fvv.grv.push(b);fvv._Value=a;fvv._Text=b;fvv.TargetId=c;fvv.$target=$("#"+c);fvv.$target2=fvv.$target.find("div.S_bg5");fvv.$target3=fvv.$target.find("div.dcx-msgtoolbar2");if(fvv.$target2.length<1)fvv.$target2=null;fvv.cri()}
fvv.cjm=function(c,d,e,f){fvv.TargetId=$(c).attr("id");fvv.$target=$(c);fvv.$target2=fvv.$target.find("div.S_bg5");fvv.$target3=fvv.$target.find("div.dcx-msgtoolbar2");fvv.$target4=fvv.$target.find("div.dcx-msgtoolbar3");fvv.Height=fvv.$target2.height();if(fvv.$target2.length<1)fvv.$target2=null;if(fvv.sxv!=null){clearInterval(fvv.sxv);fvv.sxv=null}
var g=function(){if(!ymr(fvv.$target2)&&fvv.$target2.length>0){if(fvv.rmk.length>0&&fvv.Height!=fvv.$target2.height()){var h=fvv.$target2.height();fvv.Height=fvv.$target2.height();if(h<39)h=38;fvv.$target.height(h);if(document.all&&navigator.appVersion.match(/6./i)=="6.")fvv.$target4.height(h+10)}}};fvv.sxv=setInterval(g,1000);var j=fvv.hpm;var k=fvv.ctrl;var l=-1;if(ymr(j)){glg("LTreeRList.js","/js/Control/LTreeRList/LTreeRList.js");var m=fvv.agi();j=$(m);$(document.body).append(j);fvv.hpm=j;k={};k.$queryType=j.find("#d2079_queryType");k.zcb=j.find("#sptree27");k.$lTree=k.zcb.find("#sptree_left27");k.$rTree=k.zcb.find("#rightlist_ul27");fvv.ctrl=k;var n=k.$queryType.children("li");n.unbind("click").click(function(){n.removeClass("current");$(this).addClass("current");var a=parseInt($(this).attr("value"),10);if(a==1)j.find("a[isAddAllTree=1]").show();else j.find("a[isAddAllTree=1]").hide();j.attr("targetType",a);fvv.opx(a,a)});var o=$.browser.msie?"mouseenter":"mouseover";var p=$.browser.msie?"mouseleave":"mouseout";j.unbind(o).bind(o,function(){$(this).attr("isInDlg",1)});j.unbind(p).bind(p,function(){$(this).attr("isInDlg",0)});$(document).mouseup(function(a){if(j!=null){if(j.attr("IsShowing")=="2"){j.attr("IsShowing",1)}else if(j.attr("IsShowing")=="1"){if(j.attr("isInDlg")!="1"){j.hide();j.attr("IsShowing",0);$(c).find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}}}})}
if(parseInt(j.attr("targetType"),10)!=f){var q=k.zcb.attr("treeId");var m=new nzy();var r=0;if(f==1){var v=fvv._Value;var t=fvv._Text;r++;m.append("<li tvalue=\""+v+"\" treeid=\""+q+"\">");m.append("<a class=\"nd-remove\" title=\"移除\" href=\"javascript:void(0);\" onclick=\"javascript:fvv.plj(this,'"+q+"',1,'1');\">删除</a>");m.append("<a class=\"nd-right\" href=\"javascript:void(0);\">"+t+"</a>");m.append("</li>")}else if(f==2){var s=fvv.rmk;var u=fvv.grv;for(var i=0;i<s.length;i++){if(!isNaN(s[i])&&parseInt(s[i],10)>0){r++;var v=s[i];var t=u[i];m.append("<li tvalue=\""+v+"\" treeid=\""+q+"\">");m.append("<a class=\"nd-remove\" title=\"移除\" href=\"javascript:void(0);\" onclick=\"javascript:fvv.plj(this,'"+q+"',1,'1');\">删除</a>");m.append("<a class=\"nd-right\" href=\"javascript:void(0);\">"+t+"</a>");m.append("</li>")}}}
k.$rTree.html(m.toString());k.zcb.find("div.right-count").html("(<span>"+r+"</span>)");try{k.$rTree.unbind("sortable").sortable({update:function(a,b){}}).disableSelection()}catch(err){}}
l=parseInt(j.attr("targetType"),10);if(isNaN(l))j.attr("targetType",f);if(j.attr("targetType")=="1"){k.$rTree.parent().parent().parent().hide();j.width(385).css("padding-left","40px")}else{k.$rTree.parent().parent().parent().show();j.width(455).css("padding-left","10px")}
fvv.opx(0,f);var w=xfx(c,"Left")-1;var x=xfx(c,"Top")+$(c).height()+5;j.css({"left":w+"px","top":x+"px"});if(j.get(0).style.display=="none"){j.show();j.attr("isShowing",1);$(c).find(".dcx-msgtoolbar4").css({"background-position":"-13px 0px"})}else{j.attr("isShowing",0);j.hide();$(c).find(".dcx-msgtoolbar4").css({"background-position":"0px 0px"})}
if(parseInt(l,10)!=f){var y=k.$rTree.children();if(y.length<1)k.$lTree.find(".nd-checked").hide();else{k.$lTree.find("dl[dsl=2]").each(function(){var v=$(this).attr("tvalue");if(y.filter("[tvalue='"+v+"']").length>0)$(this).children("dt").find(".nd-checked").show();else $(this).children("dt").find(".nd-checked").hide()})}}}
fvv.opx=function(f,g){var h=fvv.hpm;var i=fvv.ctrl;if(isNaN(f)||f<1)f=parseInt(i.$queryType.find("li.current").attr("value"),10);var j=i.zcb;var k=i.$lTree;var l=i.$rTree;var m=k.children("div[contentType="+f+"]:first");if(!ymr(m.attr("isLoadFirst"))){m.parent().children().hide();m.show();return false}
var n=l.attr("treeId");var o=new nzy();var p=function(a,b){var c=$(a);var t="#sptree_left"+b;c=c.find(t);var d=c.find("dl[dsl=2]");d.find("a.nd-add-all").remove();d.find("a.nd-text").attr("isuser","1");var e=Dcx.Utility.wxo(c.html(),"sptree_Add","fvv.sptree_Add",0);m.html(e);m.parent().children().hide();m.show();m.attr("isLoadFirst","1");c.remove()};if(f==2){Dcx.SpTree.tkk("fvv.npj(","fvv.npj(",fvv.TargetId,1771,1,true,p)}else if(f==5){Dcx.SpTree.fpv("fvv.npj(","fvv.npj(",fvv.TargetId,1771,1,true,p)}}
fvv.dkp2=function(f,g,h,j){var k=f,tmp_parentId=g,tmp_clickedNode=h,tmp_qType=j;j=9;g=ymr(g)?0:g;var l=true;var m=null;var n=wbi(f,h);if(!ymr(h))l=false;if(ymr(n)||n.length<1){n=fvv.$lTree.children("[contenttype=2]")}
if(isNaN(j)||j<1){j=parseInt(fvv.ctrl.$queryType.find("li.current").attr("value"),10)}
var o=fvv.hpm;var p=fvv.ctrl;if(!l&&n.parent().attr("geted")=="1")return true;var q=jrb(f);var r=wtm(f);var s="/WebServices/System/System.asmx/GetChildDeptList";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:s,data:"{deptId:"+g+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取树节点失败。详情："+b);return false},success:function(a){try{qus=true}catch(err){}
a=hmy(a);if(ymr(a)){art.VLdialog.alert("读取树节点时失败3。",function(){},14,"提示");return false}
var b=0;var c=a;if(!ymr(c)){var d=new nzy();for(var i=0;i<c.length;i++){var v=c[i].DeptId;var t=c[i].DeptName;q=q+i+1;d.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"0\" geted2=\"0\" index=\""+q+"\" dsl=\"1\" class=\"nd-unfold\" isfold=\"1\">");d.append("<dt class=\"\">");d.append("<span class=\"spicon-close\" onclick=\"javascript:bjy(this);\">d</span>");d.append("<span class=\"spicon-fold\"></span>");d.append("<a class=\"nd-text\" href=\"javascript:void(0);\" onclick=\"javascript:fvv.npj(this);\">"+t+"</a>");d.append("<a class=\"nd-add-all\" title=\"全部增加\" href=\"javascript:void(0);\" onclick=\"javascript:fvv.otr(this);\">全部增加</a>");d.append("</dt>");d.append("<dd></dd>");d.append("</dl>")}
b=c.length;n.prepend(d.toString());if(parseInt(g,10)>0)fvv.dkp(k,tmp_parentId,tmp_clickedNode,tmp_qType)}
var e=n.prev();if(e.next().children().length<1&&!l&&(q>0&&a.Id<1)){e.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");e.find(".nd-add-all").hide()}
n.parent().attr("geted","1");umq(f,b+1)}});return}
fvv.dkp=function(f,g,h,j){g=ymr(g)?0:g;var k=true;var l=null;var m=wbi(f,h);if(!ymr(h))k=false;if(ymr(m)||m.length<1){art.VLdialog.alert("获取父级节点时失败",function(){},10,"提示");return false}
if(isNaN(j)||j<1){j=parseInt(fvv.ctrl.$queryType.find("li.current").attr("value"),10)}
var n=fvv.hpm;var o=fvv.ctrl;if(!k&&m.parent().attr("geted")=="1")return true;var p=jrb(f);var q=wtm(f);var r="/WebServices/System/User.asmx/fhf";$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:r,data:"{id:"+g+",qType:"+j+"}",dataType:'json',beforeSend:function(a){},complete:function(a,b){},error:function(a){var b=JSON2.stringify(a);if(b.length>600)b=b.substr(0,600);alert("读取树节点失败。详情："+b);return false},success:function(a){try{qus=true}catch(err){}
a=hmy(a);var b=m.prev();if(ymr(a)){a=new Array();b.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");b.find(".nd-add-all").hide()}
var c=0;var d=a;if(!ymr(d)){var e=new nzy();for(var i=0;i<d.length;i++){var v=d[i].UserId;var t=d[i].UserName;p=p+i+1;e.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"1\" index=\""+p+"\" dsl=\"2\" class=\"nd-unfold\" isfold=\"0\">");e.append("<dt class=\"\">");e.append("<span class=\"spicon-no\" onclick=\"javascript:bjy(this);\">d</span>");e.append("<span class=\"spicon-unfold\"></span>");e.append("<a class=\"nd-text\" href=\"javascript:void(0);\" isuser=\"1\" onclick=\"javascript:fvv.npj(this);\">"+t+"</a>");if(o.$rTree.children("li[tvalue='"+v+"']").length>0)e.append("<span class=\"nd-checked \">已选中</span>");else e.append("<span class=\"nd-checked hide\">已选中</span>");e.append("</dt>");e.append("<dd></dd>");e.append("</dl>")}
c=d.length;m.append(e.toString())}
if(b.next().children().length<1&&!k&&(p>0&&a.Id<1)){b.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");b.find(".nd-add-all").hide()}
m.parent().attr("geted","1");umq(f,c+1)}});return}
DcxTree["T2079_27"].egm=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2079&&i==27){var l=$(j).attr("tagName").toLowerCase();if(!isNaN(f)){fvv.dkp(i,f,j)}}}
fvv.ccwNode=DcxTree["T2079_27"].egm;fvv.plg=function(a){fvv.qlx(true)}
fvv.qlx=function(a){var b=fvv.hpm;var c=fvv.ctrl;var d=null;if(b.attr("targetType")=="1")d=c.$rTree.children(":first");else d=c.$rTree.children();var e=new Array();var f=new Array();d.each(function(){e.push($(this).attr("tvalue"));f.push($(this).find(".nd-right").text())});if(fvv.$target2==null){var g=new nzy();g.append("<div class=\"tag_edit S_line2\" id=\"d2078_Receiver\" style=\"border-width: 0px;\">\n");g.append("<div class=\"fake_input S_bg5 S_line2 clearfix\" style=\"border-width: 0px; padding-top: 0px;margin-top: 0px;\">\n");g.append("</div>\n");g.append("</div>\n");fvv.$target.find(".dcxmsgtoolbar2").html(g.toString());fvv.$target2=fvv.$target.find("div.S_bg5")}
var h=fvv.$target2;var i=fvv.Title;var j=true;fvv.rmk=e;fvv.grv=f;if(b.attr("targetType")!="1"){j=false}else{if(e.length>0){fvv._Value=e[0];fvv._Text=f[0]}}
if(e.length>0){fvv.$target3.css("padding","5px 6px");h.html(fvv.byq(e,f))}else{fvv.$target2=null;fvv.$target3.css("padding","10px 6px");fvv.$target3.html("<span style=\"font-weight:bold;\">+</span> "+i)}
if(a)fvv.hpm.hide()};fvv.cri=function(){var a=fvv.hpm;var b=fvv.ctrl;if(fvv.$target2==null){var c=new nzy();c.append("<div class=\"tag_edit S_line2\" id=\"d2078_Receiver\" style=\"border-width: 0px;\">\n");c.append("<div class=\"fake_input S_bg5 S_line2\" style=\"border-width: 0px; padding-top: 0px;margin-top: 0px;\">\n");c.append("</div>\n");c.append("</div>\n");fvv.$target.find(".dcxmsgtoolbar2").html(c.toString());fvv.$target2=fvv.$target.find("div.S_bg5")}
var d=fvv.$target2;var e=fvv.Title;var f=true;var g=fvv.rmk;var h=fvv.grv;if(g.length>0){fvv.$target3.css("padding","5px 6px");d.html(fvv.byq(g,h))}else{fvv.$target2=null;fvv.$target3.css("padding","10px 6px");fvv.$target3.html("<span style=\"font-weight:bold;\">+</span> "+e)}};fvv.otr=function(a){var b=fvv.hpm;if(b.attr("targetType")!="1"){otr(a);fvv.qlx(false)}}
fvv.oxt=function(){fvv.rmk=new Array();fvv.grv=new Array();fvv._Value=0;fvv._Text=null;if(!ymr(fvv.ctrl)&&!ymr(fvv.ctrl.$rTree)&&!ymr(fvv.ctrl.zcb)){fvv.eru(fvv.ctrl.$rTree.find("div.sptree_title").get(0),fvv.ctrl.zcb);fvv.$target2=null;fvv.$target3.css("padding","10px 6px");fvv.$target3.html("<span style=\"font-weight:bold;\">+</span> "+fvv.Title)}};fvv.eru=function(a,b){var c=fvv.hpm;var d=fvv.ctrl;eru(a,b);fvv.qlx(false)}
fvv.npj=function(a){if($(a).attr("isuser")=="1"){var b=fvv.hpm;var c=fvv.ctrl;var d=parseInt(c.$queryType.find("li.current").attr("value"),10);if(b.attr("targetType")=="1"){eru(c.$rTree.get(0),c.zcb);npj(a);fvv.qlx(true)}else{npj(a);fvv.qlx(false)}}else npj(a)}
fvv.otr=function(a){var b=fvv.hpm;if(b.attr("targetType")!="1"){otr(a);fvv.qlx(false)}}
fvv.dne=function(a){var b=fvv.hpm;if(b.attr("targetType")!="1"){otr(a);fvv.qlx(false)}}
fvv.plj=function(a,b,c,d){plj(a,b,c,d);var e=fvv.hpm;var f=fvv.ctrl;if(e.attr("targetType")=="1")fvv.qlx(true);else fvv.qlx(false)}
DcxTree["T2079_27"].ptq=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2079&&i==27){}}
fvv.byq=function(a,b){var c=new nzy();var d=a;var e=b;if(typeof(a)=="string"){d=a.split(',');e=b.split(',')}
if(!ymr(d)&&d.length>0){for(var i=0;i<d.length;i++){if(!ymr(d[i])){c.append("<div class=\"W_btn_arrow tag\" val=\""+d[i]+"\" txt=\""+e[i]+"\" style='float:left;clear:none;'><span class=\"S_func1\">"+e[i]+"<a href=\"javascript:void(0)\" class=\"W_ico12 icon_close\"></a></span></div>")}}}
return c.toString()}
fvv.agi=function(a){var b=new nzy();b.append("<div id=\"div_DefaultF_2079\" isform=\"1\" class=\"nui-menu\" onclick=\"javascript:$(this).attr('isShowing',1);\" entid=\"2079\" style=\"overflow:hidden;width: 455px; height: 453px;position :absolute ; left :0; top :0; display :none ;z-index:20100;background: #FFFFFF; padding:0px 0px 0px 10px;\">\n");b.append("<div id=\"div_FormHtml_DefaultF_2079\" >");b.append("    <div class=\"defaultform \"  style=\"margin-left: 0px;\">");b.append("        <div class=\"frame-div\">");b.append("            <ul class=\"ul-group\"  style=\"width: 510px;margin-top: 10px;\">");b.append("                <li class=\"li-area  \"  style=\"display:none;\">");b.append("                    <label class=\"area-title pad126\" style=\"width:81px;font-size: 13px;padding-top:0px;\">");b.append("                        </label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left:275px;margin-top:0px;\">");b.append("                        <div class=\"aui_buttons\" style=\"background-color: #ffffff;border-top-width:0px;\">");b.append("                            <button class=\"aui_state_highlight\" indexid=\"4\" type=\"button\">确&nbsp;&nbsp;定</button>");b.append("                            <button type=\"button\" indexid=\"6\"  onclick=\"javascript:fvv.hpm.hide();\" style=\"margin-left:20px;\" title=\"\">取&nbsp;消</button>");b.append("                        </div>");b.append("                    </div>");b.append("                </li>");b.append("                <li  class=\"li-area  \"   style=\"min-height: 35px;\">");b.append("                    <label class=\"area-title pad126\" style=\"width:21px;font-size: 12px;padding-top:4px;text-align: left;padding-left:12px;color:#999;\">");b.append("                        筛选：</label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left: 0px;width:320px;\">");b.append("                        <ul id=\"d2079_queryType\" class=\"tag-radio\">");var c=false;var d=false;b.append("                        <li value=\"2\" title=\"\" class=\""+(!c?"current":"")+"\"><a href=\"javascript:void(0);\"  target=\"\">组织</a></li>");b.append("                        <li value=\"5\" title=\"\" class=\"\"><a href=\"javascript:void(0);\"  target=\"\">通讯录</a></li>");b.append("                        </ul>");b.append("                </div>");b.append("                </li>");b.append("                <li class=\"li-area  \"  style=\"min-height: 400px;\">");b.append("                        </label>");b.append("                    <div class=\"field-content pad17\" style=\"margin-left: 10px;\">");b.append("<input type=\"hidden\" sptreemsg=\"1\" id=\"vl_superTreeMsg27\" treeid=\"27\" entid=\"2079\" Js_removeRight=\"fvv.plj(\" formtype=\"55\" ctrlprex=\"DefaultF_\" JsRightRemove=\"fvv.plj(\" treenode_jsonclick1=\"fvv.npj(\" treenode_jsonclick2=\"fvv.npj(\" usecache1=\"0\" usecache2=\"1\" righthidden=\"0\" topnode_parentvalue1=\"0\" topnode_parentvalue2=\"0\" tree_dynamic1=\"0\" tree_dynamic2=\"1\" isdoubledatasource=\"1\" textfieldname=\"\" fieldname=\"PrcsUsers\" fielddtype=\"2\" isbindtovalue=\"1\" bindmode=\"0\" moduletype=\"0\" parentfieldname1=\"ParentId\" textfieldname1=\"DeptName\" valuefieldname1=\"DeptId\" parentfieldname2=\"\" textfieldname2=\"RealName\" valuefieldname2=\"UserName\" leftdrag=\"0\" rightdrag=\"0\" docallback=\"0\" linkfieldname=\"DeptId\" treenodecount=\"24\">");b.append("<div id=\"sptree27\" class=\"sptree\" style=\"width: 426px; height: 366px;display: block;\" treeid=\"27\" istree=\"1\" lastentid=\"2079\"  lastfieldname=\"PrcsUsers\">");b.append("<div id=\"sptree-container27\">");b.append("<div id=\"selector27\" class=\"sptree-container left sptree_width\" style=\"width: 184px;height: 366px;\">");b.append("<div id=\"title27\" class=\"sptree_title\">");b.append("<div class=\"sptree_tab\">");b.append("<a id=\"sptree_tab27\" class=\"tab_now\" href=\"javascript:void(0);\">请选择</a></div>");b.append("<div class=\"tree-ok\"><a href=\"javascript:void(0);\" isAddAllTree=\"1\" style=\""+(!d?"display:none;":"")+"\" onclick=\"javascript:fvv.dne(this);\">全选</a></div>");b.append("</div>");b.append("<div id=\"sptree_leftcontainer27\" class=\"sptree_height\">");b.append("<div id=\"sptree_left27\" class=\"sptree-list dcx-scroll\" style=\"width: 180px; height: 331px;\">");b.append("<div contentType=\"1\"></div><div contentType=\"2\"></div><div contentType=\"3\"></div><div contentType=\"4\"></div><div contentType=\"5\"></div></div>");b.append("</div>");b.append("</div>");b.append("<div id=\"sptree_right27\" class=\"sptree-container sptree_width right\" style=\"width: 180px;height: 366px;\">");b.append("<div class=\"sptree_title\">");b.append("<div class=\"fs_tit\">");b.append("已选项</div>");b.append("<div class=\"right-count\" id=\"sptree-rightCount27\">");b.append("(<span>0</span>)</div>");b.append("<div class=\"fs_tit_op\">");b.append("<a class=\"fs_empty\" href=\"javascript:void(0);\" onclick=\"javascript:fvv.eru(this);\">");b.append("清空</a></div>");b.append("<div class=\"tree-ok\">");b.append("<a href=\"javascript:void(0);\" onclick=\"javascript:fvv.plg(this);\">确定</a></div>");b.append("</div>");b.append("<div class=\"sptree_height\">");b.append("<div id=\"sptree_rightcontainer27\" class=\"sptree-list sptree_selected dcx-scroll\" style=\"height: 344px;\">");b.append("<ul id=\"rightlist_ul27\" class=\"ul-node-list\" isrightlist=\"1\"></ul>");b.append("<p id=\"overflow\" class=\"sptree-awoke fs_hit none\"><span class=\"fs_ico_warn\"></span></p>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("</div>");b.append("                    </div>");b.append("                </li>");b.append("            </ul>");b.append("        </div>");b.append("    </div>");b.append("</div>");b.append("<div id=\"DefaultF_2079_Dropdown\" dropdown=\"1\" entid=\"2079\">");b.append("    <div id=\"VL_DefaultF_2079_Dropdown\" dropdown=\"1\" entid=\"2079\">");b.append("    </div>");b.append("</div>");b.append("</div>");return b.toString()}