20260716215550
This commit is contained in:
1 parent
5cd4e1e1d2
commit
49dafe524c
21 files changed
+1218
-272
No files matched your search
@@ -43,6 +43,8 @@ const userMenu = {
|
||||
onClick: handleUserMenu,
|
||||
};
|
||||
|
||||
const displayName = computed(() => authStore.user?.name || authStore.user?.id || "当前用户");
|
||||
|
||||
watch(
|
||||
() => appStore.locale,
|
||||
(locale) => document.documentElement.setAttribute("lang", locale),
|
||||
@@ -57,7 +59,7 @@ function handleUserMenu({ key }) {
|
||||
function confirmLogout() {
|
||||
authStore.clearSession();
|
||||
logoutOpen.value = false;
|
||||
router.replace("/dashboard");
|
||||
router.replace("/login");
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -85,7 +87,7 @@ function confirmLogout() {
|
||||
<a-dropdown :menu="userMenu" :trigger="['click']" placement="bottomRight">
|
||||
<button type="button" class="toolbar-user" aria-label="用户菜单">
|
||||
<a-avatar :size="24"><UserRound /></a-avatar>
|
||||
<span>管理员</span>
|
||||
<span>{{ displayName }}</span>
|
||||
<ChevronDown class="toolbar-user__arrow" />
|
||||
</button>
|
||||
</a-dropdown>
|
||||
@@ -94,10 +96,9 @@ function confirmLogout() {
|
||||
|
||||
<a-modal v-model:open="profileOpen" title="个人资料" :footer="null" width="420px">
|
||||
<a-descriptions :column="1" bordered size="small">
|
||||
<a-descriptions-item label="用户名">admin</a-descriptions-item>
|
||||
<a-descriptions-item label="姓名">管理员</a-descriptions-item>
|
||||
<a-descriptions-item label="角色">系统管理员</a-descriptions-item>
|
||||
<a-descriptions-item label="机构码">{{ authStore.orgid || "--" }}</a-descriptions-item>
|
||||
<a-descriptions-item label="用户ID">{{ authStore.user?.id || "--" }}</a-descriptions-item>
|
||||
<a-descriptions-item label="姓名">{{ authStore.user?.name || "--" }}</a-descriptions-item>
|
||||
<a-descriptions-item label="机构码">{{ authStore.orgId || "--" }}</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</a-modal>
|
||||
|
||||
|
||||
Reference in new issue
Block a user