getters.js 2.6 KB

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