export function getTenant () { const parentId = 0 return window['$vueApp'].config.globalProperties.$http.get(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/departments/' + parentId) } // 获得公司节点的孩子节点 export function getTenantChildren (branchInfo, tenantNodeId ) { // 加载整个组织结构树时,展开公司节点 return loadChildNodes(branchInfo, tenantNodeId) } // 加载当前节点的子节点 export function loadChildNodes (branchInfo, parentId) { const param = { parentId: parentId, departmentInfo: branchInfo, } return new Promise((resolve,reject)=>{ window['$vueApp'].config.globalProperties.$http.post( window.$vueApp.config.globalProperties.baseAPI + '/component/organization-trees/workgroup-users', param ) .then(children => { resolve(children) }) }) } export function getUserInWorkgroups (workgroupIds) { return window['$vueApp'].config.globalProperties.$http.post(window['$vueApp'].config.globalProperties.baseAPI + '/component/organization-trees/user-in-workgroups', workgroupIds) }