|
|
@@ -96,6 +96,15 @@
|
|
|
删除
|
|
|
</el-button>
|
|
|
|
|
|
+ <ListExportDropdown
|
|
|
+ :export-fn="fetchExportUsers"
|
|
|
+ :get-filter-params="getUserExportFilterParams"
|
|
|
+ :has-selection="true"
|
|
|
+ :selected-ids="selectedRows.map((r) => r.id)"
|
|
|
+ :visible-columns="userExportColumns"
|
|
|
+ filename="用户列表.xlsx"
|
|
|
+ />
|
|
|
+
|
|
|
<ListToolbarEndActions
|
|
|
:loading="loading"
|
|
|
:column-defs="listColumnDefs"
|
|
|
@@ -403,9 +412,11 @@
|
|
|
import RoleManageDialogs from '@/components/business/role-manage-dialogs/index.vue'
|
|
|
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
|
|
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
|
|
|
+ import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
|
|
|
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
|
import {
|
|
|
fetchUserList,
|
|
|
+ fetchExportUsers,
|
|
|
fetchUserDetail,
|
|
|
fetchCreateUser,
|
|
|
fetchUpdateUser,
|
|
|
@@ -486,6 +497,22 @@
|
|
|
const { visibleColumns, checkAll, isIndeterminate, isColumnVisible, resetToDefault } =
|
|
|
usePersistedListColumns('system-user-list-columns', listColumnDefs)
|
|
|
|
|
|
+ function getUserExportFilterParams() {
|
|
|
+ const quickKeyword = quickSearchKeyword.value?.trim()
|
|
|
+ return {
|
|
|
+ keyword: quickKeyword || searchForm.keyword || undefined,
|
|
|
+ status: searchForm.status || undefined,
|
|
|
+ deptId: selectedDeptId.value || undefined
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /** nickName 列始终展示,需并入导出 columns */
|
|
|
+ const userExportColumns = computed(() => {
|
|
|
+ const cols = [...visibleColumns.value]
|
|
|
+ if (!cols.includes('nickName')) cols.unshift('nickName')
|
|
|
+ return cols
|
|
|
+ })
|
|
|
+
|
|
|
const dialogVisible = ref(false)
|
|
|
const dialogTitle = ref('新增用户')
|
|
|
const isEdit = ref(false)
|