fix返回用户管理筛选
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<template #stats v-if="singleUserMode">
|
||||
<div class="flex items-center gap-2 text-sm text-gray-600">
|
||||
<User class="w-4 h-4" />
|
||||
<span>当前用户:{{ currentUser?.company_name || currentUser?.phone }}</span>
|
||||
<span>当前用户:{{ currentUser?.enterprise_info?.company_name || currentUser?.phone }}</span>
|
||||
<span class="text-gray-400">(仅显示当前用户)</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="flex items-center gap-2 text-sm text-gray-600">
|
||||
<User class="w-4 h-4" />
|
||||
<span>{{ currentUser?.company_name || currentUser?.phone }}</span>
|
||||
<span>{{ currentUser?.enterprise_info?.company_name || currentUser?.phone }}</span>
|
||||
</div>
|
||||
<el-button size="small" @click="exitSingleUserMode">
|
||||
<Close class="w-4 h-4 mr-1" />
|
||||
@@ -622,7 +622,22 @@ const exitSingleUserMode = () => {
|
||||
|
||||
// 返回用户管理
|
||||
const goBackToUsers = () => {
|
||||
router.push({ name: 'AdminUsers' })
|
||||
const query = { user_id: currentUser.value?.id }
|
||||
|
||||
// 如果当前用户有企业名称,添加到查询参数
|
||||
if (currentUser.value?.enterprise_info?.company_name) {
|
||||
query.company_name = currentUser.value.enterprise_info.company_name
|
||||
}
|
||||
|
||||
// 如果当前用户有手机号,添加到查询参数
|
||||
if (currentUser.value?.phone) {
|
||||
query.phone = currentUser.value.phone
|
||||
}
|
||||
console.log('query', query)
|
||||
router.push({
|
||||
name: 'AdminUsers',
|
||||
query
|
||||
})
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
|
||||
Reference in New Issue
Block a user