|
|
@@ -97,7 +97,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="list-body list-wrap">
|
|
|
- <ListTable table-key="system-leave"
|
|
|
+ <div ref="leaveTableWrapRef" class="table-scroll bx-list-table-wrap">
|
|
|
+ <ListTable
|
|
|
+ ref="leaveTableRef"
|
|
|
+ :height="tableHeight" table-key="system-leave"
|
|
|
class="list-table"
|
|
|
:data="tableData"
|
|
|
stripe
|
|
|
@@ -181,7 +184,10 @@
|
|
|
/>
|
|
|
</ListTable>
|
|
|
|
|
|
- <div class="pagination list-pager-bar">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div ref="leaveBelowRef">
|
|
|
+ <div class="pagination list-pager-bar">
|
|
|
<div class="list-pager-selected">
|
|
|
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
|
|
</div>
|
|
|
@@ -196,6 +202,7 @@
|
|
|
@current-change="loadData"
|
|
|
/>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</section>
|
|
|
|
|
|
@@ -316,6 +323,7 @@ import ListQuickSearchInput from '@/components/business/list-quick-search-input/
|
|
|
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
|
|
import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
|
|
|
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
|
+import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
|
|
import { Close, Check, RefreshLeft, Search, Plus, Edit, Delete, Promotion, Document } from '@element-plus/icons-vue'
|
|
|
import { useDictStore } from '@/store/modules/dict'
|
|
|
import { canDeleteByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
|
|
|
@@ -352,6 +360,15 @@ import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
|
resetToDefault
|
|
|
} = usePersistedListColumns('workflow-leave-list-columns', listColumnDefs)
|
|
|
|
|
|
+const leaveTableWrapRef = ref<HTMLElement | null>(null)
|
|
|
+const leaveBelowRef = ref<HTMLElement | null>(null)
|
|
|
+const leaveTableRef = ref<any>(null)
|
|
|
+const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
|
|
+ tableEl: leaveTableWrapRef,
|
|
|
+ pagerEl: leaveBelowRef,
|
|
|
+ tableRef: leaveTableRef
|
|
|
+})
|
|
|
+
|
|
|
const dictStore = useDictStore()
|
|
|
|
|
|
const loading = ref(false)
|
|
|
@@ -614,5 +631,8 @@ import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
|
{ debounce: 300, deep: true }
|
|
|
)
|
|
|
|
|
|
- onMounted(() => loadData())
|
|
|
+ onMounted(() => {
|
|
|
+ loadData()
|
|
|
+ nextTick(() => recalcTableHeight())
|
|
|
+})
|
|
|
</script>
|