Skip to content

fix(audit): distinguish same-name users in the operator filter - #1530

Closed
dataeaseShu wants to merge 1 commit into
mainfrom
fix/audit-user-option-label
Closed

dataeaseShu wants to merge 1 commit into
mainfrom
fix/audit-user-option-label

Conversation

@dataeaseShu

Copy link
Copy Markdown
Contributor

Summary

  • The 操作日志 → 筛选 → 操作用户 dropdown keyed both the v-for key and the option label by display name. Two users sharing a name rendered as duplicate keys with identical labels, so they could not be told apart, and typing an account matched nothing because the label never contained it.
  • Options are now keyed by user id; DrawerFilter accepts an optional per-option label; the audit page builds 名称 (账号) when the two differ (and plain name when they are the same), making same-name users distinguishable and account search work.

Test plan

  • 存在两个同名用户时,操作日志筛选 → 操作用户 下拉可区分两人,分别选中后筛选结果正确
  • 输入账号(如 ui501_0487)能匹配到对应用户,输入姓名也能匹配
  • 其他使用同一筛选组件的页面(数据源、高级应用等)下拉显示与搜索不受影响
  • npx vue-tsc -b 与 npx eslint src/components/drawer-filter/src/DrawerFilter.vue src/views/system/audit/index.vue 通过

🤖 Generated with Claude Code

The operator filter keyed options and labels by display name only, so two
users with the same name rendered as duplicate v-for keys with identical
labels: they could not be told apart, and searching by account matched
nothing. Key options by id, let an option carry its own label, and show
"name (account)" when the two differ.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dataeaseShu

Copy link
Copy Markdown
Contributor Author

按讨论先关闭,等确认评论指向的页面后再决定是否重开。

@maninhill
maninhill deleted the fix/audit-user-option-label branch November 25, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant