
var ppk={TreeId:19,TreeName:"可选项",_Value:"",_Text:"",TargetId:null,tqn:null,fgy:null,rmk:new Array(),grv:new Array(),sxv:null,IsDoulde:true,IsDynamic:false,ecg:true,qir:false,fzc:null,ctrl:null,Title:"选择可视范围...",reo:200,dkz:200,Height:369,sxx:function(a,b,c){}};if(ymr(DcxTree["T2079_27"]))DcxTree["T2079_27"]={};ppk.eni=function(a,b,c,d,e,f,g,h,i){ppk.rmk.push(parseInt(a,10));ppk.grv.push(b);ppk._Value=a;ppk._Text=b;if(f==undefined)f=true;ppk.IsDoulde=f;if(h==undefined)h=true;ppk.ecg=h;if(g==undefined)g=true;ppk.IsDynamic=g;if(!ymr(d))ppk.TreeId=d;if(!ymr(e))ppk.TreeName=e;if(!ymr(i))ppk.sxx=i;if(!ymr(c)){ppk.TargetId=c;ppk.$target=$("#"+c);ppk.$target2=ppk.$target.find("div.S_bg5");ppk.$target3=ppk.$target.find("div.dcx-msgtoolbar2");if(ppk.$target2.length<1)ppk.$target2=null;ppk.cri()}}
ppk.qtt=function(c,d,e,f){if(!ymr(ppk.TargetId)&&!ymr(c)){ppk.TargetId=$(c).attr("id");ppk.$target=$(c);ppk.$target2=ppk.$target.find("div.S_bg5");ppk.$target3=ppk.$target.find("div.dcx-msgtoolbar2");if(ppk.$target2.length<1)ppk.$target2=null;if(ppk.sxv!=null){clearInterval(ppk.sxv);ppk.sxv=null}
var g=function(){if(ppk.$target2!=null){if(ppk.rmk.length>0&&ppk.$target3.height()!=ppk.$target2.height()){var h=ppk.$target2.height();ppk.$target.height(h)}}}
ppk.sxv=setInterval(g,500)}
var j=ppk.fzc;var k=null;var l=ppk.ctrl;var m=-1;if(ymr(j)){glg("LTreeRList.js","/js/Control/LTreeRList/LTreeRList.js");var n=ppk.neb();if(typeof(n)!="string")n=n.toString();j=$(n);$(document.body).append(j);ppk.fzc=j;l={};l.$queryType=j.find("#d2079_queryType");l.zcb=j.find("#sptree27");l.$lTree=l.zcb.find("#sptree_left27");l.$rTree=l.zcb.find("#rightlist_ul27");var o=j.find("#vl_superTreeMsg27");if(ppk.IsDoulde)o.attr("isdoubledatasource",1);else o.attr("isdoubledatasource",0);if(ppk.IsDynamic)o.attr("tree_dynamic1",1);else o.attr("tree_dynamic1",0);ppk.ctrl=l;if(l.$queryType.length>0){var p=l.$queryType.children("li");p.unbind("click").click(function(){p.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);ppk.fze(a,a)})}
var q=$.browser.msie?"mouseenter":"mouseover";var r=$.browser.msie?"mouseleave":"mouseout";j.unbind(q).bind(q,function(){$(this).attr("isInDlg",1)});j.unbind(r).bind(r,function(){$(this).attr("isInDlg",0)});if(ppk.ecg){$(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"})}}}})}}
var s=l.zcb.attr("treeId");m=parseInt(j.attr("targetType"),10);if(isNaN(m))j.attr("targetType",f);if(j.attr("targetType")=="1"){l.$rTree.parent().parent().parent().hide();j.css("padding-left","40px")}else{l.$rTree.parent().parent().parent().show();j.css("padding-left","10px")}
k=ppk.ctrl.$lTree.children("div[contentType="+f+"]:first");ppk.fze(f,f);var u=xfx(c,"Left")-1;var w=xfx(c,"Top")+$(c).height()+5;j.css({"left":u+"px","top":w+"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"})}
var x=kvw(s);var n=new nzy();var y=0;var z=ppk.rmk;var A=ppk.grv;for(var i=0;i<z.length;i++){if(!isNaN(z[i])&&parseInt(z[i],10)>0){y++;var v=z[i];var t=A[i];n.append("<li tvalue=\""+v+"\" treeid=\""+s+"\">");n.append("<a class=\"nd-remove\" title=\"移除\" href=\"javascript:void(0);\" onclick=\"javascript:ppk.plj(this,'"+s+"',1,'1');\">删除</a>");n.append("<a class=\"nd-right\" href=\"javascript:void(0);\">"+t+"</a>");n.append("</li>");var B=k.find("dl[tvalue='"+v+"']");if(B.length>0){var C=B.children("dt").find(".nd-checked");if(C.length>0)C.show()}}}
l.$rTree.html(n.toString());l.zcb.find("div.right-count").html("(<span>"+y+"</span>)");try{l.$rTree.unbind("sortable").sortable({update:function(a,b){}}).disableSelection()}catch(err){}
if(parseInt(m,10)!=f){var D=l.$rTree.children();if(D.length<1)l.$lTree.find(".nd-checked").hide();else{l.$lTree.find("dl[dsl=2]").each(function(){var v=$(this).attr("tvalue");if(D.filter("[tvalue='"+v+"']").length>0)$(this).children("dt").find(".nd-checked").show();else $(this).children("dt").find(".nd-checked").hide()})}}}
ppk.fze=function(f,g){var h=ppk.fzc;var j=ppk.ctrl;if(j.$queryType.length>0&&(isNaN(f)||f<1))f=parseInt(j.$queryType.find("li.current").attr("value"),10);var k=j.zcb;var l=j.$lTree;var m=j.$rTree;var n=l.children("div[contentType="+f+"]:first");if(!ymr(n.attr("isLoadFirst"))){n.parent().children().hide();n.show();return false}
var o=m.attr("treeId");var p=new nzy();var q=function(a,b){var c=$(a);var t="#sptree_left"+b;c=c.find(t);var d=c.find("dl");d.find("a.nd-add-all").remove();d.find("a.nd-text").attr("isuser","1");var e=Dcx.Utility.wxo(c.html(),"sptree_Add","ppk.sptree_Add",0);n.html(e);n.parent().children().hide();n.show();n.attr("isLoadFirst","1");c.remove()};if(f==2){Dcx.SpTree.tkk("ppk.npj(","ppk.npj(",ppk.TargetId,1771,1,true,q)}else if(f==5){Dcx.SpTree.fpv("ppk.npj(","ppk.npj(",ppk.TargetId,1771,1,true,q)}else if(f==6){ppk.dkp(19,-1)}else if(f==7){var r=ppk.fgy;var s=ppk.tqn;for(var i=0;i<s.length;i++){if(!isNaN(s[i])&&parseInt(s[i],10)>0){var v=s[i];var t=r[i];p.append("<dl tvalue=\""+v+"\" isdata=\"1\" geted=\"0\" geted2=\"0\" index=\""+(i+1)+"\" dsl=\"1\" class=\"nd-unfold\" isfold=\"1\">");p.append("<dt class=\"\">");p.append("<span class=\"spicon-no\" onclick=\"javascript:bjy(this);\">d</span>");p.append("<span class=\"spicon-fold\"></span>");p.append("<a class=\"nd-text\" href=\"javascript:void(0);\" onclick=\"javascript:ppk.npj(this);\">"+t+"</a>");p.append("<span class=\"nd-checked hide\">已选中</span>");p.append("</dt>");p.append("<dd></dd>");p.append("</dl>")}}
n.html(p.toString())}}
ppk.dkp=function(e,f,g,h){var i=27;f=ymr(f)?0:f;var j=true;var k=null;var l=wbi(i,g);if(!ymr(g))j=false;if(ymr(l)||l.length<1){art.VLdialog.alert("获取父级节点时失败",function(){},10,"提示");return false}
var m=ppk.fzc;var n=ppk.ctrl;if(!j&&l.parent().attr("geted")=="1")return true;var o=jrb(i);var p=wtm(i);p.TreeId=e;var q="/WebServices/Menu/Menu_Run.asmx/spqTreeNodeHtml";var r={ParentId:f,TreeId:e,TreeObj:p,CurMaxIndex:o,FormType:vim(i)};var m=ppk.fzc;var n=ppk.ctrl;if(ymr(h))h=7;if(isNaN(h)||h<1){h=parseInt(ppk.ctrl.$queryType.find("li.current").attr("value"),10)}
var s=n.zcb;var t=n.$lTree;var u=n.$rTree;if(f<1)l=t.children("div[contentType="+h+"]:first");ppk.qir=true;$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:q,data:JSON2.stringify(r),dataType:'json',beforeSend:function(a){},complete:function(a,b){ppk.qir=false},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("读取树节点时失败。",function(){},14,"提示");return false}
strhtml="<div>"+a.Text+"</div>";var b=$(strhtml);var c=b.find("dl");c.find("a.nd-add-all").remove();c.find("a.nd-text").attr("isuser","1");o=b.length;strhtml=Dcx.Utility.wxo(b.html(),"sptree_Add","ppk.sptree_Add",0);b.remove();if(j)l.html(strhtml);else l.append(strhtml);var d=l.prev();if(d.next().children().length<1&&!j&&(o>0&&a.Id<1)){d.children(":first").removeClass("spicon-close spicon-open").addClass("spicon-no");d.find(".nd-add-all").hide()}
l.parent().attr("geted","1");umq(e,a.Id);if(a.Id<1)ppk.pab(g)}});return}
ppk.bcpList=new Array();ppk.pab=function(a){var b=$(a);var c=b.parent();var d=c.parent();var e=kvw(a);if(d.children("dd").children().length<1){var a={"Id":d.attr("tvalue"),"Txt":c.find(".nd-text").text(),"V1":$(a).attr("turl")};ppk.bcpList.push(a);dgy(d.attr("tvalue"),c.find(".nd-text").text(),-1,27,1,true,d,e)}}
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)){ppk.dkp(i,f,j)}}}
ppk.ccwNode=DcxTree["T2079_27"];ppk.plg=function(a){ppk.qlx(true)}
ppk.qlx=function(a){var b=ppk.fzc;var c=ppk.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())});var g=true;ppk.rmk=e;ppk.grv=f;ppk.sxx(e,f,d);if(b.attr("targetType")!="1"){g=false}else{if(e.length>0){ppk._Value=e[0];ppk._Text=f[0]}}
if(!ymr(ppk.TargetId)){if(ppk.$target2==null){var h=new nzy();h.append("<div class=\"tag_edit S_line2\" id=\"d2078_Receiver\" style=\"border-width: 0px;\">\n");h.append("<div class=\"fake_input S_bg5 S_line2\" style=\"border-width: 0px; padding-top: 0px;margin-top: 0px;\">\n");h.append("</div>\n");h.append("</div>\n");ppk.$target.find(".dcxmsgtoolbar2").html(h.toString());ppk.$target2=ppk.$target.find("div.S_bg5")}
var i=ppk.$target2;var j=ppk.Title;if(e.length>0){ppk.$target3.css("padding","5px 6px");i.html(ppk.byq(e,f))}else{ppk.$target2=null;ppk.$target3.css("padding","10px 6px");ppk.$target3.html("<span style=\"font-weight:bold;\">+</span> "+j)}}
if(a)ppk.fzc.hide()};ppk.cri=function(){if(ymr(ppk.TargetId))return;var a=ppk.fzc;var b=ppk.ctrl;if(ppk.$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");ppk.$target.find(".dcxmsgtoolbar2").html(c.toString());ppk.$target2=ppk.$target.find("div.S_bg5")}
var d=ppk.$target2;var e=ppk.Title;var f=true;var g=ppk.rmk;var h=ppk.grv;if(g.length>0){ppk.$target3.css("padding","5px 6px");d.html(ppk.byq(g,h))}else{ppk.$target2=null;ppk.$target3.css("padding","10px 6px");ppk.$target3.html("<span style=\"font-weight:bold;\">+</span> "+e)}};ppk.otr=function(a){var b=ppk.fzc;if(b.attr("targetType")!="1"){otr(a);ppk.qlx(false)}}
ppk.oxt=function(){ppk.rmk=new Array();ppk.grv=new Array();ppk._Value=0;ppk._Text=null;if(!ymr(ppk.ctrl)&&!ymr(ppk.ctrl.$rTree)&&!ymr(ppk.ctrl.zcb)){ppk.eru(ppk.ctrl.$rTree.find("div.sptree_title").get(0),ppk.ctrl.zcb);ppk.$target2=null;ppk.$target3.css("padding","10px 6px");ppk.$target3.html("<span style=\"font-weight:bold;\">+</span> "+ppk.Title)}};ppk.eru=function(a,b){var c=ppk.fzc;var d=ppk.ctrl;eru(a,b);ppk.qlx(false)}
ppk.npj=function(a){if($(a).attr("isuser")=="1"){var b=ppk.fzc;var c=ppk.ctrl;var d=parseInt(c.$queryType.find("li.current").attr("value"),10);if(b.attr("targetType")=="1"){}else{npj(a,false,null,true);if(!ppk.qir)ppk.pab(a)}}else npj(a)}
ppk.otr=function(a){var b=ppk.fzc;if(b.attr("targetType")!="1"){otr(a);ppk.qlx(false)}}
ppk.dne=function(a){var b=ppk.fzc;if(b.attr("targetType")!="1"){otr(a);ppk.qlx(false)}}
ppk.plj=function(a,b,c,d){plj(a,b,c,d);var e=ppk.fzc;var f=ppk.ctrl;if(e.attr("targetType")=="1")ppk.qlx(true);else ppk.qlx(false)}
DcxTree["T2079_27"].ptq=function(a,b,c,d,e,f,g,h,i,j,k){if(a==2079&&i==27){}}
ppk.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]+"\"><span class=\"S_func1\">"+e[i]+"<a href=\"javascript:void(0)\" class=\"W_ico12 icon_close\"></a></span></div>")}}}
return c.toString()}
ppk.neb=function(a){var d=(ppk.reo+ppk.dkz+50);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: "+(ppk.reo+ppk.dkz+70)+"px; height: "+(ppk.Height+80)+"px;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: "+(ppk.reo+ppk.dkz+50)+"px;margin-top: 10px;\">");b.append("                <li class=\"li-area  \" >");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\"  onclick=\"javascript:ppk.plg(this);\">确&nbsp;&nbsp;定</button>");b.append("                            <button type=\"button\" indexid=\"6\"  onclick=\"javascript:ppk.fzc.hide();\" style=\"margin-left:20px;\" title=\"\">取&nbsp;消</button>");b.append("                        </div>");b.append("                    </div>");b.append("                </li>");var c=false;var e=false;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=\"ppk.plj(\" formtype=\"55\" ctrlprex=\"DefaultF_\" JsRightRemove=\"ppk.plj(\" treenode_jsonclick1=\"ppk.npj(\" treenode_jsonclick2=\"ppk.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: "+(ppk.reo+ppk.dkz+30)+"px; height: "+(ppk.Height)+"px;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: "+(ppk.reo)+"px;height:"+(ppk.Height)+"px;\">");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=\""+(!e?"display:none;":"")+"\" onclick=\"javascript:ppk.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:"+(ppk.reo-5)+"px; height: "+(ppk.Height-30)+"px;\">");b.append("<div contentType=\"1\"></div><div contentType=\"2\"></div><div contentType=\"3\"></div><div contentType=\"4\"></div><div contentType=\"5\"></div><div contentType=\"6\"></div><div contentType=\"7\"></div></div>");b.append("</div>");b.append("</div>");b.append("<div id=\"sptree_right27\" class=\"sptree-container sptree_width right\" style=\"width: "+(ppk.dkz)+"px;height:"+(ppk.Height)+"px;\">");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:ppk.eru(this);\">");b.append("清空</a></div>");b.append("<div class=\"tree-ok\">");b.append("<a href=\"javascript:void(0);\" onclick=\"javascript:ppk.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:"+(ppk.Height-30)+"px;\">");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()}