| | |
| | | }); |
| | | vc.component._getOrgsByOrgLevel(DEFAULT_PAGE, DEFAULT_ROWS,1,''); |
| | | |
| | | |
| | | }, |
| | | _initEvent:function(){ |
| | | |
| | | vc.on('orgManage','listOrg',function(_param){ |
| | | //vc.copyObject(_param, vc.component.orgManageInfo.conditions); |
| | | vc.component._listOrgs(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | vc.on('pagination','page_event',function(_currentPage){ |
| | |
| | | $('#orgTree').treeview({ |
| | | data: vc.component.orgManageInfo.orgTree |
| | | }); |
| | | $('#orgTree').on('nodeSelected', function(event, data) { |
| | | $('#orgTree').on('nodeSelected', function(event, data) { |
| | | console.log(event,data); |
| | | vc.component.orgManageInfo.conditions.orgLevel = (parseInt(data.orgLevel) + 1); |
| | | vc.component.orgManageInfo.conditions.parentOrgId = data.orgId; |
| | | vc.component._listOrgs(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }); |
| | | $('#orgTree').treeview("selectNode",[0]); |
| | | |
| | | }, |
| | | _loadBranchOrgTrees:function(){ |
| | | //默认查询分公司组织信息 |
| | | vc.component._listOrgTrees(vc.component.orgManageInfo.orgTree[0].nodes, |
| | | '2', |
| | | vc.component.orgManageInfo.orgTree[0].orgId, |
| | | function(){ |
| | | function(_tmpOrgs){ |
| | | vc.component._refreshOrgTree(); |
| | | }); |
| | | }, |
| | |
| | | _tmpOrgs.forEach(function (_item) { |
| | | _nodes.push({ |
| | | orgId:_item.orgId, |
| | | orgLevel:_orgLevel, |
| | | text:_item.orgName, |
| | | href:function(_item){}, |
| | | tags:[0], |