重构页面目录与 RBAC:扁平配置入口并对齐管理/运营页映射。
下线运营总览幽灵页,补 ExpandKeysForScope / PlatformToMonitor,同步导航与角色配置 UI。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,18 +9,26 @@
|
||||
<el-empty v-else class="pg-hidden">
|
||||
<template #description>
|
||||
<p class="pg-hidden-title">当前账号无权查看此功能</p>
|
||||
<p class="pg-hidden-hint">控件:{{ widgetId }}。若应为管理员可见,请尝试顶部切换「管理员/运营」或刷新页面。</p>
|
||||
<p class="pg-hidden-hint">控件:{{ widgetId }}。请在「权限与角色」中为该账号开放对应页面后重新登录。</p>
|
||||
</template>
|
||||
</el-empty>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
const props = defineProps<{ widgetId: string }>()
|
||||
const auth = useAuthStore()
|
||||
const visibility = computed(() => auth.widgetOf(props.widgetId))
|
||||
const route = useRoute()
|
||||
|
||||
/** 页面已授权则具备该页管理能力,不再被 ConfigCenter 等控件 hidden 整页挡住。 */
|
||||
const visibility = computed(() => {
|
||||
const name = typeof route.name === 'string' ? route.name : ''
|
||||
if (name && auth.hasPage(name)) return 'interactive' as const
|
||||
return auth.widgetOf(props.widgetId)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user