1.4.0 • Published 4 years ago

@hecom-rn/organization v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Organization

npm version Build Status

这是组织架构部分,管理一个全量包含离职的人员表,和一个全量不包含解散的部门表,然后传入权限项,根据权限项,动态生成一些带权限的操作。

接口

  • name: string:模块名称。
  • initGlobal(): void:全局初始化模块。
  • getObj(userListAuth, orgListAuth): object:获取带权限的操作对象,userListAuth是人员列表操作的权限,orgListAuth是部门列表操作的权限,返回的对象中包含如下方法:
    • loadUser(forceUpdate): Promise:全量或增量更新用户列表。
    • loadOrg(forceUpdate): Promise:全量或增量更新部门列表。
    • getUser(): Promise<array>:带权限的获取人员列表。
    • getOrg(): Promise<array>:带权限的获取部门列表(不包含停用部门)。
    • getAllOrg(): Promise<array>:带权限的获取部门列表(包含停用部门)。
    • findUserByImId(imId): object:根据人员imId获取人员信息。
    • findUserByCode(code): object:根据人员code获取人员信息。
    • getWholeTree(hasSelf, parentCode, excludedCodes): Promise<object>:获取整个人员部门树,hasSelf表示是否包含自己,parentCode表示上级部门codeexcludedCodes表示排除哪些code
    • getAddlDeptTree(hasSelf, parentCode, excludedCodes): Promise<object>:获取整个人员部门树,人员同时出现在所属部门和兼职部门中,参数同getWholeTree
    • getOrgTree(hasSelf, parentCode, excludedCodes): Promise<object>:获取部门树(不包含停用部门),参数同getWholeTree
    • getAllOrgTree(hasSelf, parentCode, excludedCodes): Promise<object>:获取部门树(包含停用部门),参数同getWholeTree
  • obj(): object:调用getObj生成的对象,无权限的全量数据。
1.4.0

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago