feat(web-admin): viewport-fill list height for pl transport menus
Wire 运输管理 list pages (plans, IO orders, freight panels, vehicles, personnel, and related lists) to useListTableViewportHeight so table body scrolls with sticky header and pager stays near the content bottom. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
11185f066a
commit
c577edc597
35 files changed
+11667
-8490
No files matched your search
@@ -80,7 +80,10 @@
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<div class="list-body list-wrap">
|
||||
<ListTable table-key="pl-driver"
|
||||
<div ref="driverTableWrapRef" class="table-scroll bx-list-table-wrap">
|
||||
<ListTable
|
||||
ref="driverTableRef"
|
||||
:height="tableHeight" table-key="pl-driver"
|
||||
class="list-table"
|
||||
:data="driverList"
|
||||
v-loading="loading"
|
||||
@@ -163,7 +166,10 @@
|
||||
/>
|
||||
</ListTable>
|
||||
|
||||
<div class="pagination list-pager-bar">
|
||||
|
||||
</div>
|
||||
<div ref="driverBelowRef">
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
@@ -178,6 +184,7 @@
|
||||
@current-change="handlePageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -296,6 +303,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 { useDbInstantSearch } from '@/composables/useDbInstantSearch'
|
||||
import { pickBxPageResult } from '@/utils/http/bx'
|
||||
import { DEFAULT_LIST_PAGE_SIZE } from '@/utils/table/tableConfig'
|
||||
@@ -330,6 +338,15 @@ const {
|
||||
]
|
||||
})
|
||||
|
||||
const driverTableWrapRef = ref<HTMLElement | null>(null)
|
||||
const driverBelowRef = ref<HTMLElement | null>(null)
|
||||
const driverTableRef = ref<any>(null)
|
||||
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
||||
tableEl: driverTableWrapRef,
|
||||
pagerEl: driverBelowRef,
|
||||
tableRef: driverTableRef
|
||||
})
|
||||
|
||||
const selectedRows = ref<Driver[]>([])
|
||||
|
||||
function getDriverExportFilterParams() {
|
||||
@@ -614,6 +631,8 @@ useDbInstantSearch(() => ({ q: searchForm.q }), handleSearch)
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user