This commit is contained in:
@@ -582,7 +582,8 @@
|
||||
try {
|
||||
const params: any = {
|
||||
page: 1,
|
||||
page_size: 20
|
||||
page_size: 20,
|
||||
role_type: 1
|
||||
}
|
||||
if (keyword) {
|
||||
params.role_name = keyword
|
||||
@@ -607,23 +608,9 @@
|
||||
}, 300)
|
||||
}
|
||||
|
||||
// 计算属性:过滤后的可分配角色(根据账号类型过滤)
|
||||
// 计算属性:过滤后的可分配角色
|
||||
const filteredAvailableRoles = computed(() => {
|
||||
let roles = allRoles.value
|
||||
|
||||
// 根据账号类型过滤角色
|
||||
if (currentAccountType.value === 3) {
|
||||
// 代理账号:只显示客户角色
|
||||
roles = roles.filter((role) => role.role_type === 2)
|
||||
} else if (currentAccountType.value === 2) {
|
||||
// 平台用户:只显示平台角色
|
||||
roles = roles.filter((role) => role.role_type === 1)
|
||||
} else if (currentAccountType.value === 4) {
|
||||
// 企业账号:只显示客户角色
|
||||
roles = roles.filter((role) => role.role_type === 2)
|
||||
}
|
||||
|
||||
return roles
|
||||
return allRoles.value
|
||||
})
|
||||
|
||||
// 计算属性:过滤后的已分配角色
|
||||
|
||||
Reference in New Issue
Block a user