| | |
| | | pageNo, |
| | | pageSize, |
| | | deptId: selectedDeptId.value, |
| | | username: leftListState.value.searchValue || undefined, |
| | | keyword: leftListState.value.searchValue || undefined, |
| | | }); |
| | | |
| | | leftListState.value.dataSource = list; |
| | |
| | | }; |
| | | } |
| | | |
| | | // 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) |
| | | ); |
| | | } |
| | | |
| | | /** 处理部门树展开/折叠 */ |
| | |
| | | v-model:target-keys="selectedUserIds" |
| | | :titles="['未选', '已选']" |
| | | :show-search="true" |
| | | search-placeholder="搜索名称或昵称" |
| | | :show-select-all="true" |
| | | :filter-option="filterOption" |
| | | @change="handleUserChange" |