ecp_global 2.0.12 copy "ecp_global: ^2.0.12" to clipboard
ecp_global: ^2.0.12 copied to clipboard

翼协云全局信息管理

信息管理库

此库专为内部项目需求设计,若不符合您的使用场景,敬请谅解。

扩展 #

文件扩展(extension on String)

  • toMultipartFile:本地文件路径转换成MultipartFile类型
  • toFormData:本地文件路径转换成FormData类型
  • downloadUrl:文件ID转换成流

加密扩展(extension on String)

  • rsaEncode:对字符串进行RSA加密

状态控制器(extension on StatusController)

  • showGlobalLoading:显示全局加载中缺省页
  • showGlobalError:显示全局错误缺省页
  • showGlobalEmpty:显示全局无数据缺省页

全局信息 #

RuntimeUtils

用来保存和读取用户全局信息(内存中),读取/保存的实例类时User和Department(选中部门,或主属部门)

接口说明 #

返回值 接口(接口说明) 参数 类型 说明
UploadEntity? uploadFile(单文件上传) path String 本地文件路径
List(UploadEntity)? uploadFiles(批量上传文件) paths List 本地文件路径集合
List(Department)? getDeptTree(获取部门层级树) tenantId String 租户ID
deptParentId String? 部门ID
List(Department)? getDeptTreeByType(获取部门层级树) searchType int 类型
deptIds List(String)? 部门ID集合
List(Department)? getDeptList(获取所有部门列表) firstDeptFlag bool 是否显示顶级部门
deptParentId String? 父部门ID
deptName String? 部门名称
deptId String? 部门ID
pageIndex int 当前页数 (默认为1)
pageSize int 一页展示个数(默认为20)
UserPage? getUsersPageInDept(获取部门成员) deptId String 部门ID
realName String 真实姓名
pageIndex int 当前页数 (默认为1)
pageSize int 一页展示个数(默认为20)
UserPage? searchUsersPage(模糊查询用户) key String 输入内容
deptIds List(String)? 部门ID集合
deptId String? 部门ID
pageIndex int 当前页数 (默认为1)
pageSize int 一页展示个数(默认为20)
User? loginSimple(用户密码登录) username String 用户名
password String 密码
ip String? 方便调试时单独设置服务器地址用
User? getUserAllInfo(获取已登录用户所有信息)
List(RoleEntity)? getRoleList(获取角色列表)
List(RoleEntity)? getRolesBindUsersAndAllPermissions(通过角色id列表查询用户列表及相关信息) roleIds List(String)? 角色ID集合
List(User)? getUserByRoleType(通过角色类型查询用户列表) roleId String? 角色Id
roleType num 角色类型
List(CandidateEntity)? getCandidate(获取候选人) data Map? [orgType]-组织类型; [expressionType]-表达式类型; [leaderFlag]-是否领导; [deptId]-部门id; [headshipId]-职务id;[roleKey]-角色key
List(BusinessGroupEntity)? getSysBusinessGroup(业务组列表) pageIndex int 当前页数 (默认为1)
pageSize int 一页展示个数(默认为20)
List(BusinessGroupEntity)? getSysBusinessGroupItem(业务组可选项列表) pageIndex int 当前页数 (默认为1)
pageSize int 一页展示个数(默认为20)
groupId String? 业务组ID

实体 #

  • BusinessGroupEntity: 业务组分类
  • BusinessGroupItemEntity: 业务组选项
  • CandidateEntity: 选人表达式候选人
  • Department: 部门
  • DepartmentPage: 部门分页实体
  • ExpandedField: User内扩展字段
  • PageEntity: 分页实体
  • RoleAllInfoEntity: 所有角色信息
  • RoleEntity: 角色信息
  • UploadEntity: 上传文件实体
  • User: 用户
  • UserPage: user分页实体