后台管理页面权限管理优化

This commit is contained in:
xiaowang
2026-02-25 16:14:47 +08:00
parent 6d489f142f
commit f5b5b01a39
+1 -6
View File
@@ -60,7 +60,6 @@
:loading="userLoading"
item-layout="horizontal"
size="small"
@click="selectUser"
>
<template #renderItem="{ item }">
<a-list-item
@@ -73,7 +72,7 @@
<a-avatar :src="item.avatar || DEFAULT_AVATAR" />
</template>
<template #title>{{ item.nickname }}</template>
<template #description>{{ item.username }}</template>
<template #description>{{ item.account }}</template>
</a-list-item-meta>
</a-list-item>
</template>
@@ -272,9 +271,7 @@ const fetchUserList = async () => {
size: 100,
keyword: userSearchText.value
})
console.log('获取到的用户列表响应:', res)
userList.value = res.list || []
console.log('设置后的userList:', userList.value)
} catch (error) {
message.error('获取用户列表失败')
} finally {
@@ -293,12 +290,10 @@ const handleUserSearch = () => {
}
const selectUser = async (user: UserVO) => {
console.log('选中的用户对象:', user)
selectedUser.value = user
assignLoading.value = true
try {
const res = await permissionApi.getUserPermissions(user.id)
console.log('获取到的用户权限:', res)
selectedPermissions.value = res.map(p => p.id)
} catch (error) {
message.error('获取用户权限失败')