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

+37 -21
View File
@@ -86,15 +86,18 @@
</div>
<div class="list-body list-wrap">
<el-table
class="list-table pl-plan-merge-list-table"
:data="displayRows"
v-loading="loading"
row-key="rowKey"
:span-method="planListSpanMethod"
:row-class-name="getPlPlanListRowClassName"
@row-dblclick="handleDisplayRowDblClick"
>
<div ref="planContractTableWrapRef" class="table-scroll bx-list-table-wrap">
<el-table
ref="planContractTableRef"
class="list-table pl-plan-merge-list-table"
:height="tableHeight"
:data="displayRows"
v-loading="loading"
row-key="rowKey"
:span-method="planListSpanMethod"
:row-class-name="getPlPlanListRowClassName"
@row-dblclick="handleDisplayRowDblClick"
>
<el-table-column
type="index"
label="序号"
@@ -318,18 +321,20 @@
</template>
</el-table-column>
</el-table>
<div class="pagination list-pager-bar">
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@current-change="handlePageChange"
@size-change="handleSizeChange"
/>
</div>
<div ref="planContractBelowRef">
<div class="pagination list-pager-bar">
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.pageSize"
:total="pagination.total"
:page-sizes="[10, 20, 100, 500]"
layout="total, sizes, prev, pager, next, jumper"
background
@current-change="handlePageChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</section>
@@ -444,6 +449,7 @@ import ListToolbarDateShortcuts from '@/components/core/list-toolbar-date-shortc
import { useContractDetailDialog } from '@/composables/useContractDetailDialog'
import { useListDateShortcut } from '@/composables/useListDateShortcut'
import { usePlPlanMergeListTable } from '@/composables/usePlPlanMergeListTable'
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
import {
getPlPlanFollowStatusLabel,
getPlPlanFollowStatusTagType
@@ -505,6 +511,15 @@ const pagination = reactive({
total: 0
})
const planContractTableWrapRef = ref<HTMLElement | null>(null)
const planContractBelowRef = ref<HTMLElement | null>(null)
const planContractTableRef = ref<any>(null)
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
tableEl: planContractTableWrapRef,
pagerEl: planContractBelowRef,
tableRef: planContractTableRef
})
const planListForDisplay = computed(() => tableData.value as unknown as import('@/api/pl').Plan[])
const visiblePlanMergeProps = computed(() => [...PLAN_MERGE_COLUMN_PROPS])
@@ -803,6 +818,7 @@ async function handleSaveStopContracts() {
onMounted(() => {
fetchData()
nextTick(() => recalcTableHeight())
})
</script>