feat(company): 租户详情支持菜单直达(无参数时回退当前角色租户),AdminCheck 类型补充租户字段
This commit is contained in:
1 parent
b9e72ccf0e
commit
54e0d5fd52
2 files changed
+7
-1
No files matched your search
@@ -13,6 +13,9 @@ export interface AdminCheckResult {
|
||||
is_tenant_admin?: boolean
|
||||
current_role_name?: string
|
||||
current_role_uuid?: string
|
||||
current_company_uuid?: string
|
||||
current_tenant_uuid?: string
|
||||
has_current_company?: boolean
|
||||
role_scope?: {
|
||||
Type?: string
|
||||
TypeLabel?: string
|
||||
|
||||
@@ -27,13 +27,16 @@ import EntityPicker from '@/components/EntityPicker.vue'
|
||||
import { formApi } from '@/api/form'
|
||||
import { setPageTitle } from '@/utils/serverScope'
|
||||
import { formatUtcTime as formatTime } from '@/utils/dateTime'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import type { ColumnSchema } from '@/types/api'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 路由参数:租户 UUID(computed 响应式:同一 tab 复用且 query 变化时自动更新)
|
||||
const tenantUUID = computed(() => (route.query.TenantUUID as string) || '')
|
||||
// 无 query 参数(从"租户管理 > 租户管理详情"菜单直达)时回退到当前角色的租户 UUID
|
||||
const tenantUUID = computed(() => (route.query.TenantUUID as string) || userStore.adminCheck?.current_tenant_uuid || '')
|
||||
|
||||
// === 状态 ===
|
||||
const loading = ref(false)
|
||||
|
||||
Reference in new issue
Block a user