liu
2026-10-26 727affad2cd5818f791dd7b5bc99a205b032e175
fix(search): 用户搜索支持名称或昵称合并检索

- 用户管理列表:搜索框改为「用户名称/昵称」,提示词统一为「搜索名称或昵称」
- 用户选择弹窗:合并名称与昵称两个输入框为单一 keyword 检索
- 用户穿梭框:本地过滤同时匹配 username 与 nickname,搜索提示同步调整
- 条码列表:移除重复的 content 列定义,消除 vxe-table 字段重复告警

Co-Authored-By: Claude <noreply@anthropic.com>
已修改4个文件
32 ■■■■■ 文件已修改
src/views/system/user/components/select-dialog.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/components/select-modal.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/data.ts 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wls/barcode/data.ts 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/user/components/select-dialog.vue
@@ -30,21 +30,12 @@
function useUserSelectGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'username',
      label: '用户名称',
      fieldName: 'keyword',
      label: '用户名称/昵称',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入用户名称',
      },
    },
    {
      fieldName: 'nickname',
      label: '用户昵称',
      component: 'Input',
      componentProps: {
        allowClear: true,
        placeholder: '请输入用户昵称',
        placeholder: '搜索名称或昵称',
      },
    },
    {
src/views/system/user/components/select-modal.vue
@@ -193,7 +193,7 @@
      pageNo,
      pageSize,
      deptId: selectedDeptId.value,
      username: leftListState.value.searchValue || undefined,
      keyword: leftListState.value.searchValue || undefined,
    });
    leftListState.value.dataSource = list;
@@ -309,9 +309,12 @@
  };
}
// TODO   后端接口目前仅支持  username 检索, 筛选条件需要跟后端请求参数保持一致。
function filterOption(inputValue: string, option: any) {
  return option.username.toLowerCase().includes(inputValue.toLowerCase());
  const keyword = inputValue.toLowerCase();
  return (
    option.username?.toLowerCase().includes(keyword) ||
    option.nickname?.toLowerCase().includes(keyword)
  );
}
/** 处理部门树展开/折叠 */
@@ -427,6 +430,7 @@
          v-model:target-keys="selectedUserIds"
          :titles="['未选', '已选']"
          :show-search="true"
          search-placeholder="搜索名称或昵称"
          :show-select-all="true"
          :filter-option="filterOption"
          @change="handleUserChange"
src/views/system/user/data.ts
@@ -269,11 +269,11 @@
export function useGridFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'username',
      label: '用户名称',
      fieldName: 'keyword',
      label: '用户名称/昵称',
      component: 'Input',
      componentProps: {
        placeholder: '请输入用户名称',
        placeholder: '搜索名称或昵称',
        allowClear: true,
      },
    },
src/views/wls/barcode/data.ts
@@ -664,7 +664,6 @@
      cellRender: {
        name: 'CellSwitch',
        attrs: { beforeChange: onAutoGenerateChange },
        props: { checkedValue: true, unCheckedValue: false },
      },
    },
    {