PayrollManagementSystem/frontend/src/views/no-access/index.vue
liuwenxin b3de35c2ec fix(核算): 对齐抵顶口径并完善界面细节
回款确认时间收敛到秒级;抵顶回款不再自动折算并保留标记。补齐公式模板角色标签与提示、指导成本登记入口及基础布局、分页、设置等响应式细节。同步忽略本地排查产物。
2026-11-06 16:27:45 +08:00

32 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import { useUserStore } from '@/store/user'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { firstAccessiblePath } from '@/router/access'
import { handledError } from '@/utils/error'
const user = useUserStore()
const router = useRouter()
const checking = ref(false)
async function checkAccess(): Promise<void> {
if (checking.value) return
checking.value = true
try {
await user.fetchUserInfo()
const target = firstAccessiblePath(router, user.roles)
if (target !== '/no-access') await router.replace(target)
} catch (error) { handledError(error) }
finally { checking.value = false }
}
</script>
<template>
<section class="card access-empty" aria-labelledby="access-title">
<h1 id="access-title" class="page-title">暂无可访问功能</h1>
<p>当前账号尚未分配功能权限。请联系管理员分配角色,授权后可在这里重新检查。</p>
<el-button type="primary" :loading="checking" @click="checkAccess">重新检查权限</el-button>
</section>
</template>
<style scoped>
.access-empty { max-width: 640px; margin: 48px auto; padding: 40px 24px; text-align: center; }
.access-empty p { max-width: 38em; margin: 16px auto 24px; color: var(--ys-ink-2); line-height: 1.8; }
</style>