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:
zlwuandCursor committed 2026-09-01 19:27:17 +08:00
1 parent 11185f066a
commit c577edc597
35 files changed
+11667 -8490

No files matched your search

+16 -3
View File
@@ -141,7 +141,9 @@
<div class="list-body list-wrap">
<div ref="archiveTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable
ref="archiveTableRef"
table-key="pl-plan-archive"
:height="tableHeight"
class="list-table pl-plan-merge-list-table"
:data="displayRows"
v-loading="loading"
@@ -539,6 +541,8 @@
</template>
</el-table-column>
</ListTable>
</div>
<div ref="archiveBelowRef">
<ListColumnStatsRow
ref="archiveStatsRowRef"
storage-key="pl-plan-archive-column-stats"
@@ -547,9 +551,8 @@
:table-wrap-el="archiveTableWrapRef"
:get-cell-value="getArchiveStatCellValue"
/>
</div>
<div class="pagination list-pager-bar">
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
</div>
@@ -564,6 +567,7 @@
@current-change="handlePageChange"
/>
</div>
</div>
</div>
</section>
@@ -603,6 +607,7 @@ import ListColumnStatsRow from '@/components/business/list-column-stats-row/inde
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useContractDetailDialog } from '@/composables/useContractDetailDialog'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
import { usePlPlanMergeListTable } from '@/composables/usePlPlanMergeListTable'
import {
ArrowDown,
@@ -820,7 +825,13 @@ function getArchiveStatCellValue(row: PlPlanListDisplayRow, prop: string): unkno
}
const archiveTableWrapRef = ref<HTMLElement | null>(null)
const archiveBelowRef = ref<HTMLElement | null>(null)
const archiveTableRef = ref<any>(null)
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
tableEl: archiveTableWrapRef,
pagerEl: archiveBelowRef,
tableRef: archiveTableRef
})
function getPlanArchiveExportFilterParams() {
const keyword = quickSearch.value.trim()
return {
@@ -1038,6 +1049,8 @@ useDbInstantSearch(
onMounted(() => {
fetchData()
nextTick(() => recalcTableHeight())
})
</script>