This commit is contained in:
zlwu committed 2026-06-23 10:25:33 +08:00
1 parent 3e15776dba
commit 93c28759d0
54 files changed
+6504 -5865

No files matched your search

@@ -35,7 +35,7 @@
{{ userInfo.realName || userInfo.username || '管理员' }}
</span>
<span class="block mt-0.5 text-xs text-g-500 truncate">
{{ getRoleName(userInfo.role) }}
{{ roleDisplayText }}
</span>
</div>
</div>
@@ -97,6 +97,14 @@
() => userInfo.value.realName?.charAt(0) || userInfo.value.username?.charAt(0) || '管'
)
const roleDisplayText = computed(() => {
const names = userInfo.value.roleNames
if (Array.isArray(names) && names.length > 0) {
return names.join('、')
}
return '暂无角色'
})
const userMenuPopover = ref()
const profileDialogVisible = ref(false)
const passwordDialogVisible = ref(false)
@@ -115,19 +123,6 @@
}, 150)
}
/**
* 获取角色名称
*/
const getRoleName = (role: string) => {
const roleMap: Record<string, string> = {
admin: '运营管理员',
supplier: '供应商',
client: '客户',
deliver: '配送员'
}
return roleMap[role] || role || '未知角色'
}
/**
* 用户登出确认
*/