使用该方法实现页签显示组织结构功能,效果如图:
var zTreeSetting={
leafs: [{
leaftitle:"部门人员树",
treeId:"treeId1",
treeType: "MAN_DEPARTMENT_TREE",
chkStyle:"checkbox"
},{
leaftitle:"公司树",
treeId:"treeId2",
treeType: "COMPANY",
chkStyle:"checkbox"
},{
leaftitle:"部门树",
treeId:"treeId3",
treeType: "DEPARTMENT_TREE",
chkStyle:"checkbox"
},{
leaftitle:"工作组树",
treeId:"treeId4",
treeType: "GROUP_TREE",
chkStyle:"checkbox"
},{
leaftitle:"工作组人员树",
treeId:"treeId5",
treeType: "MAN_GROUP_TREE",
chkStyle:"checkbox"
},{
leaftitle:"部门工作组树",
treeId:"treeId6",
treeType: "DEPARTMENT_WORKGROUP_TREE",
chkStyle:"checkbox"
}],
view: {
title:"选择人员",
width:600,
height:450,
url:webRoot,
showBranch:true,
noDeparmentUser:true,
onlineVisible:false,
branchIds:""
},
callback: {
onClose:function(){
setValue();
}
}
};
popLeafZtree(zTreeSetting);
Ø leafs: 需要的页签数组,每一个页签为一个对象存放,以下为每颗树的属性介绍:
u leaftitle: 页签名称
u treeId:树id
u treeType:树类型(请参考popztree)
u chkStyle:控制页签树是单选或多选,为“checkbox”时表示多选
Ø view:页签树公用属性
u noDeparmentUser:是否显示无部门人员。 true:显示,false:不显示
u onlineVisible:是否显示在线人员。true:显示。false:不显示
u title: "标准树",//树弹出框头部的名称
u width: 300,//树弹出框的宽度
u height:400,//树弹出框的高度
u url:"http://192.168.1.99:8888/imatrix/"//弹框的根目录
u showBranch:是否显示分支机构(存在多分支机构有效)
说明:下面获取api获取的是所有页签所选值得集合,如:当有多颗选人树ztree.getIds();获取这多颗人员里人员的集合(已去除重复)
//获取用户Ids
Ø ztree.getIds()
//获取用户Names
Ø ztree.getNames()
//获取用户LoginNames
Ø ztree.getLoginNames()
//获取用户LoginNames
Ø ztree.getSubCompanyIds()
//获取部门DepartmentNames
Ø ztree.getDepartmentNames()
//部门id
Ø ztree.getDepartmentIds()
//获取部门names(不包含分支机构)
Ø ztree.getRealDepartmentNames()
//获取部门ids(不包含分支机构)
Ø ztree.getRealDepartmentIds()
//部门编码Codes
Ø ztree.getDepartmentCodes()
//部门简称ShortTitles
Ø ztree.getDepartmentShortTitles()
//工作组名称
Ø ztree.getWorkGroupNames()
//工作组id
Ø ztree.getWorkGroupIds()
iMatrix6.0.0.RC1Demo演示登陆地址:http://demo.imatrix.net.cn:8888/imatrix
如有使用iMatrix平台问题请登录iMatrix平台论坛咨询:
http://bbs.imatrix.net.cn/forum.php?mod=forumdisplay&fid=37
或者加入扣扣群307599527