getters.js 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. export default {
  2. // =========== 用户相关
  3. userId: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.id : '', // 用户ID
  4. name: state => state.ibps.user.info && state.ibps.user.info.employee ? state.ibps.user.info.employee.name : '', // 姓名
  5. status: state => state.ibps.user.info && state.ibps.user.info.employee ? state.ibps.user.info.employee.status : '', // 用户状态
  6. org: state => state.ibps.user.info ? state.ibps.user.info.org : {}, // 用户部门信息
  7. isSuper: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.isSuper === 'Y' : false, // 是否超级管理员
  8. account: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.account : '', // 用户名
  9. regOpen: state => state.ibps.user.regOpen, // 注册状态
  10. userInfo: state => state.ibps.user.info, // 用户信息
  11. // =========== 租户
  12. tenant: state => state.ibps.user.info && state.ibps.user.info.mainTenant ? state.ibps.user.info.mainTenant || {} : {}, // 当前租户
  13. tenants: state => state.ibps.user.info && state.ibps.user.info.tenants ? state.ibps.user.info.tenants || [] : [], // 当前拥有的租户
  14. tenantid: state => state.ibps.user.info && state.ibps.user.info.tenantId ? state.ibps.user.info.tenantId || '' : '', // 租户id
  15. isTenantAdmin: state => state.ibps.user.info && state.ibps.user.info.isTenantAdmin ? state.ibps.user.info.isTenantAdmin || false : false, // 是否租户管理员
  16. single: state => state.ibps.api.single, // 单体应用
  17. baseApi: state => state.ibps.api.base, // baseAPI地址
  18. websocket: state => state.ibps.api.websocket, // websocket地址
  19. isTenantOpen: state => state.ibps.sass ? state.ibps.sass.tenantOpen : false, // 是否租户模式
  20. designTenantid: state => state.ibps.user && state.ibps.user.designTenantid ? state.ibps.user.designTenantid || '' : '',
  21. // =========== 菜单
  22. menus: state => state.ibps.menu.menus, // 菜单
  23. routers: state => state.ibps.menu.routers, // 新增的路由表
  24. // =========== 子系统
  25. system: state => state.ibps.system.system, // 子系统
  26. systemid: state => state.ibps.system.system ? state.ibps.system.system.id : '', // 子系统id
  27. permissions: state => state.ibps.menu.permissions, // 拥有的权限
  28. jianCeDuiXiangId: state => state.ibps.jianCeDuiXiangId ? state.ibps.jianCeDuiXiangId : '',
  29. myform: state => state.ibps.myform ? state.ibps.myform : '',
  30. jianCeCanShuId: state => state.ibps.jianCeCanShuId ? state.ibps.jianCeCanShuId : '',
  31. // 所有检测项目名称及流程key数组
  32. testingList: state => state.ibps.param && state.ibps.param.testingList ? state.ibps.param.testingList : [],
  33. // 获取所有用户信息
  34. userList: state => state.ibps.param && state.ibps.param.userList ? state.ibps.param.userList : []
  35. }