diff --git a/pages/home/index.vue b/pages/home/index.vue index 25e3e36..f676f9d 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -350,8 +350,9 @@ import request,{host} from '@/common/request' } }, computed:{ + //是否可以切换基地 isAdmin(){ - return this.$store.getters.userInfo.roleCode=='company_admin' + return /^company_admin$|^base_admin$|^ware_admin$/.test(this.$store.getters.userInfo.roleCode) }, isEmpty(){ if(!this.baseIndex)return (this.baseInfo.farmWork||[]).length+(this.baseInfo.farmingInput||[]).length<=0