diff --git a/frontend/src/views/Settings.vue b/frontend/src/views/Settings.vue index 6891d25..1c67323 100644 --- a/frontend/src/views/Settings.vue +++ b/frontend/src/views/Settings.vue @@ -420,9 +420,25 @@ style="margin-bottom: 16px;" /> +
+ + + + + 共 {{ filteredUsersList.length }} 位用户 + +
+ (null) const transferDeptId = ref(null) const allUsers = ref([]) +const userManagementSearchKeyword = ref('') const offboardingPreviewLoading = ref(false) const offboardingExecuting = ref(false) const offboardingPreview = ref(null) @@ -3796,6 +3813,28 @@ const allUsersList = computed(() => { }) }) +const filteredUsersList = computed(() => { + const keyword = userManagementSearchKeyword.value.trim().toLowerCase() + if (!keyword) { + return allUsersList.value + } + + return allUsersList.value.filter((user) => { + const searchFields = [ + user.id, + user.realName, + user.username, + user.phone, + user.email, + user.deptName + ] + + return searchFields.some((field) => + String(field || '').toLowerCase().includes(keyword) + ) + }) +}) + // 格式化时间 const formatUserTime = (time: string | undefined) => { if (!time) return '--' @@ -6883,6 +6922,20 @@ watch(activeTab, (value) => { max-width: 600px; } +.user-search-toolbar { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + margin-bottom: 16px; + flex-wrap: wrap; +} + +.user-search-count { + color: $text-tertiary; + font-size: $font-size-sm; +} + // 用户信息单元格 .user-info-cell { .user-info-main {