getters.js 3.1 KB

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