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
@@ -191,7 +191,9 @@
|
||||
<div class="list-body list-wrap">
|
||||
<div ref="planTableWrapRef" class="table-scroll bx-list-table-wrap">
|
||||
<ListTable
|
||||
ref="planTableRef"
|
||||
table-key="pl-plan"
|
||||
:height="tableHeight"
|
||||
class="list-table pl-plan-merge-list-table"
|
||||
:data="displayRows"
|
||||
v-loading="loading"
|
||||
@@ -548,6 +550,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
</div>
|
||||
<div ref="planBelowRef">
|
||||
<ListColumnStatsRow
|
||||
ref="planStatsRowRef"
|
||||
storage-key="pl-plan-column-stats-v2"
|
||||
@@ -556,9 +560,8 @@
|
||||
:table-wrap-el="planTableWrapRef"
|
||||
:get-cell-value="getDisplayStatCellValue"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="pagination list-pager-bar pl-plan-list-pager-bar">
|
||||
<div class="pagination list-pager-bar pl-plan-list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
@@ -572,6 +575,7 @@
|
||||
@current-change="handlePageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -774,6 +778,7 @@
|
||||
import type { StatsRowColumn } from '@/utils/list-column-stats'
|
||||
import { useContractDetailDialog } from '@/composables/useContractDetailDialog'
|
||||
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
||||
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
||||
import { usePlPlanArrangeActions } from '@/composables/usePlPlanArrangeActions'
|
||||
import PlPlanListCertCell from '@/components/business/pl-plan-list-cert-cell/index.vue'
|
||||
import PlPlanListProductCell from '@/components/business/pl-plan-list-product-cell/index.vue'
|
||||
@@ -891,6 +896,15 @@
|
||||
)
|
||||
|
||||
const planTableWrapRef = ref<HTMLElement | null>(null)
|
||||
const planBelowRef = ref<HTMLElement | null>(null)
|
||||
const planTableRef = ref<any>(null)
|
||||
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
||||
tableEl: planTableWrapRef,
|
||||
pagerEl: planBelowRef,
|
||||
tableRef: planTableRef
|
||||
|
||||
|
||||
})
|
||||
const planStatsRowRef = ref<{ resync?: () => void } | null>(null)
|
||||
|
||||
const {
|
||||
@@ -1535,7 +1549,9 @@
|
||||
loadForceFollowPermission()
|
||||
fetchData()
|
||||
openArrangeFromQuery()
|
||||
})
|
||||
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
|
||||
async function openArrangeFromQuery() {
|
||||
const arrangeId = route.query.arrange as string | undefined
|
||||
|
||||
Reference in new issue
Block a user