var user_tree; var module_tree; var user_module_tree; function $(id){ return document.getElementById(id); } function createUserTree(){ user_tree = new dhtmlXTreeObject("dvUserTree","100%","100%",0); user_tree.setSkin('dhx_skyblue'); user_tree.setImagePath("../images/csh_dhx_skyblue/"); var url = "../WorkFlow/WorkFlowGridSource.aspx?handle=usertree&uid="+newGuid(); user_tree.loadJSON(url,function(){ }); user_tree.enableCheckBoxes(true); user_tree.attachEvent("onClick", function(id){ initLoading(); user_tree.setCheck(id,true); createUserModuleTree(); }); } function createModuleTree(){ module_tree = new dhtmlXTreeObject("dvModuleTree","100%","100%",0); module_tree.setSkin('dhx_skyblue'); module_tree.setImagePath("../images/csh_dhx_skyblue/"); var url = "../Modules/ModuleGridSource.aspx?handle=modtree&uid="+newGuid(); module_tree.loadJSON(url,function(){ finishLoading(); }); module_tree.enableCheckBoxes(true); module_tree.attachEvent("onClick", function(id){ }); module_tree.attachEvent("onCheck", function(id,state){ var selectedVal = module_tree.getAllSubItems(id); var selectedArg = new Array(); if(selectedVal.indexOf(",") >= 0){ selectedArg = selectedVal.split(","); }else{ selectedArg.push(selectedVal); } if(module_tree.isItemChecked(id)){ for(var i=0;i= 0){ selectedArg = selectedVal.split(","); }else{ selectedArg.push(selectedVal); } if(user_module_tree.isItemChecked(id)){ for(var i=0;i= 0){ userArg = user_tree.getAllChecked().split(","); alert("每次只能操作一个用户,请重新选择"); return; }else{ userArg.push(user_tree.getAllChecked()); } if(module_tree.getAllChecked().indexOf(",") >= 0){ modArg = module_tree.getAllChecked().split(","); }else{ modArg.push(module_tree.getAllChecked()); } if(userArg.length > 0 && modArg.length > 0){ for(var i=0;i= 0){ userArg = user_tree.getAllChecked().split(","); alert("每次只能操作一个用户,请重新选择"); return; }else{ userArg.push(user_tree.getAllChecked()); } if(user_module_tree.getAllChecked().indexOf(",") >= 0){ modArg = user_module_tree.getAllChecked().split(","); }else{ modArg.push(getID(user_module_tree.getAllChecked())); } if(userArg.length > 0 && modArg.length > 0){ for(var i=0;i