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
@@ -84,7 +84,10 @@
|
||||
</div>
|
||||
|
||||
<div class="list-body list-wrap">
|
||||
<ListTable table-key="pl-transport"
|
||||
<div ref="transportTableWrapRef" class="table-scroll bx-list-table-wrap">
|
||||
<ListTable
|
||||
ref="transportTableRef"
|
||||
:height="tableHeight" table-key="pl-transport"
|
||||
class="list-table"
|
||||
:data="transportList"
|
||||
v-loading="loading"
|
||||
@@ -204,7 +207,10 @@
|
||||
</el-table-column>
|
||||
</ListTable>
|
||||
|
||||
<div class="pagination list-pager-bar">
|
||||
|
||||
</div>
|
||||
<div ref="transportBelowRef">
|
||||
<div class="pagination list-pager-bar">
|
||||
<div class="list-pager-selected">
|
||||
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
|
||||
</div>
|
||||
@@ -219,6 +225,7 @@
|
||||
@current-change="handlePageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -261,6 +268,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 { formatPlVehiclePlateDisplay } from '@/utils/pl-display'
|
||||
import { formatMoneyDisplay } from '@/utils/money-format'
|
||||
@@ -289,6 +297,15 @@ const {
|
||||
resetToDefault
|
||||
} = usePersistedListColumns('pl-transport-list-columns', listColumnDefs)
|
||||
|
||||
const transportTableWrapRef = ref<HTMLElement | null>(null)
|
||||
const transportBelowRef = ref<HTMLElement | null>(null)
|
||||
const transportTableRef = ref<any>(null)
|
||||
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
||||
tableEl: transportTableWrapRef,
|
||||
pagerEl: transportBelowRef,
|
||||
tableRef: transportTableRef
|
||||
})
|
||||
|
||||
const detailLoading = ref(false)
|
||||
const qrcodeLoading = ref(false)
|
||||
const transportList = ref<Transport[]>([])
|
||||
@@ -554,6 +571,8 @@ useDbInstantSearch(
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
|
||||
nextTick(() => recalcTableHeight())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user