Selaa lähdekoodia

1、会议通知参与人员添加树状列表测试

fuwb 3 kuukautta sitten
vanhempi
commit
55cb6e2a54

+ 77 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/resources/templates/MeetingNotice/js/index.js

@@ -3,6 +3,83 @@
     window.onload = function () {
         flowInstanceId = z.ui.comm.getUrlParam("flowInstanceId");
         bindEvents();
+
+        z.ui.selecttree("[name='createReqVO$attendees']").init(
+        {
+            view:{
+                defaultOpen:true,
+                iconCls:function(val){
+                    if(val.type==1){
+                        return "z-tree-icon-dep";
+                    }else if(val.type==2){
+                        return "z-tree-icon-person";
+                    }else if(val.type==3){
+                        return "z-tree-icon-worker";
+                    }
+                }
+            },
+            search:{
+                enable:true
+            },
+            check:{
+                enable:true //是否使用选择框
+            },
+            treedata:[
+                {
+                    id:1,//数据id
+                    pid:3,//数据父级id
+                    type:2,
+                    name:'一级别部门1'//显示的文字
+                },
+                {
+                    id:2,
+                    pid:4,
+                    type:2,
+                    name:'二级部门1'
+                },
+                {
+                    id:3,
+                    type:1,
+                    name:'二级部门2'
+                },{
+                    id:4,
+                    type:1,
+                    name:'一级别部门2'
+                },
+                {
+                    id:5,
+                    pid:4,
+                    type:1,
+                    name:'二级部门3'
+                },
+                {
+                    id:6,
+                    type:1,
+                    name:'二级部门4',
+                    children:[
+                        {
+                            id:8,
+                            pid:1,
+                            type:3,
+                            name:'二级部门14'
+                        },
+                        {
+                            id:9,
+                            pid:1,
+                            type:3,
+                            name:'二级部门24'
+                        }
+                    ]
+                },
+                {
+                    id:7,
+                    pid:1,
+                    type:3,
+                    name:'二级部门9'
+                }
+            ]
+        });
+
     };
 
     function bindEvents() {