|
|
@@ -118,7 +118,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="list-body list-wrap">
|
|
|
- <ListTable
|
|
|
+ <div ref="sysUserTableWrapRef" class="table-scroll bx-list-table-wrap">
|
|
|
+ <ListTable
|
|
|
+ ref="sysUserTableRef"
|
|
|
+ :height="tableHeight"
|
|
|
table-key="system-user"
|
|
|
class="list-table"
|
|
|
:data="tableData"
|
|
|
@@ -228,23 +231,25 @@
|
|
|
header-align="center"
|
|
|
/>
|
|
|
</ListTable>
|
|
|
+ </div>
|
|
|
+ <div ref="sysUserBelowRef">
|
|
|
+ <div class="pagination list-pager-bar">
|
|
|
+ <div class="list-pager-selected">
|
|
|
+ 已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="pagination list-pager-bar">
|
|
|
- <div class="list-pager-selected">
|
|
|
- 已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
|
|
+ <el-pagination
|
|
|
+ :current-page="pagination.page"
|
|
|
+ :page-size="pagination.pageSize"
|
|
|
+ :total="pagination.total"
|
|
|
+ :page-sizes="[10, 20, 100, 500]"
|
|
|
+ layout="total, sizes, prev, pager, next"
|
|
|
+ @size-change="
|
|
|
+ (val: number) => ((pagination.page = 1), (pagination.pageSize = val), loadData())
|
|
|
+ "
|
|
|
+ @current-change="(val: number) => ((pagination.page = val), loadData())"
|
|
|
+ />
|
|
|
</div>
|
|
|
-
|
|
|
- <el-pagination
|
|
|
- :current-page="pagination.page"
|
|
|
- :page-size="pagination.pageSize"
|
|
|
- :total="pagination.total"
|
|
|
- :page-sizes="[10, 20, 100, 500]"
|
|
|
- layout="total, sizes, prev, pager, next"
|
|
|
- @size-change="
|
|
|
- (val: number) => ((pagination.page = 1), (pagination.pageSize = val), loadData())
|
|
|
- "
|
|
|
- @current-change="(val: number) => ((pagination.page = val), loadData())"
|
|
|
- />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -388,7 +393,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
- import { ref, reactive, computed, onMounted, watch } from 'vue'
|
|
|
+ import { ref, reactive, computed, onMounted, watch , onActivated } from 'vue'
|
|
|
import {
|
|
|
canDeleteByCreator,
|
|
|
filterDeletableByCreator,
|
|
|
@@ -414,6 +419,7 @@
|
|
|
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 { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
|
|
import {
|
|
|
fetchUserList,
|
|
|
fetchExportUsers,
|
|
|
@@ -497,6 +503,15 @@
|
|
|
const { visibleColumns, checkAll, isIndeterminate, isColumnVisible, resetToDefault } =
|
|
|
usePersistedListColumns('system-user-list-columns', listColumnDefs)
|
|
|
|
|
|
+ const sysUserTableWrapRef = ref<HTMLElement | null>(null)
|
|
|
+ const sysUserBelowRef = ref<HTMLElement | null>(null)
|
|
|
+ const sysUserTableRef = ref<any>(null)
|
|
|
+ const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
|
|
+ tableEl: sysUserTableWrapRef,
|
|
|
+ pagerEl: sysUserBelowRef,
|
|
|
+ tableRef: sysUserTableRef
|
|
|
+ })
|
|
|
+
|
|
|
function getUserExportFilterParams() {
|
|
|
const quickKeyword = quickSearchKeyword.value?.trim()
|
|
|
return {
|
|
|
@@ -867,7 +882,14 @@
|
|
|
loadDeptTree()
|
|
|
loadData()
|
|
|
loadRoleOptions()
|
|
|
- })
|
|
|
+
|
|
|
+ nextTick(() => recalcTableHeight())
|
|
|
+})
|
|
|
+
|
|
|
+onActivated(() => {
|
|
|
+ nextTick(() => recalcTableHeight())
|
|
|
+})
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|