首页 > 代码库 > iMatrix平台中页标签树(ztree:ztree-leaf)用法

iMatrix平台中页标签树(ztree:ztree-leaf)用法

1.1.1    页签标签树<ztree:ztree-leaf>

 

1.1.1.1    用法

<ztree:ztree-leaf leafs=‘[{

                                leaftitle:"部门人员树",

                                treeId:"treeId1",

                                treeType: "MAN_DEPARTMENT_TREE",

                                chkStyle:"checkbox"

                            },{

                                leaftitle:"工作组树",

                                treeId:"treeId2",

                                treeType: "GROUP_TREE",

                                chkStyle:"checkbox"

                            },{

                                leaftitle:"部门树",

                                treeId:"treeId3",

                                treeType: "DEPARTMENT_TREE",

                                chkStyle:"checkbox"

                            },{

                                leaftitle:"自定义树",                                  url:"${ctx}/loan-bill/loan-bill-getTreeNode.htm",

                                treeId:"treeId4",

                                treeType: "CUSTOM",

                                chkStyle:"checkbox"

                            }]

                            userWithoutDeptVisible="true"

                            showBranch="true"

                     ></ztree:ztree-leaf>

1.1.1.2    参数说明

showBranch:是否显示分支机构(存在多分支机构有效)

         .        noDeparmentUser:是否显示无部门人员

         leafs:多个页签的josn字符串(可参考pop页签树的leafs属性

       leafs里除了可以使用系统的组织结构树外,还能使用自定义页签树

       如:

{leaftitle:"自定义树",                                    url:"${ctx}/loan-bill/loan-bill-getTreeNode.htm",

           treeId:"treeId4",

           treeType: "CUSTOM",

           chkStyle:"checkbox"

}

以下为leafs中各对象参数介绍:

url:为自定义树请求

treeType :树类型,其值可以为平台提供的六种组织结构树类型和自定义类型(CUSTOM)。六种组织结构树类型为:

COMPANY(公司人员树)

MAN_DEPARTMENT_TREE(部门人员树)

MAN_GROUP_TREE(工作组人员树)

                   DEPARTMENT_TREE(部门树)

GROUP_TREE(工作组树)

DEPARTMENT_WORKGROUP_TREE(部门工作组树)

当点击自定义树页签时会根据url 和 treeId 自动去加载自定义树

用户可以根据treeId来自定义树的功能

1.1.1.3    API

  • ztree.selectTreeValue()

说明:使用标签树时要使用api获取节点的值必须先使用ztree.selectTreeValue()

并把以后处理都写进selectTreeValue的参数里

例:ztree.selectTreeValue(

    function(){

       *** ***

}

下面获取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

    或者加入QQ群307599527

iMatrix平台中页标签树(ztree:ztree-leaf)用法