feat(web-admin): viewport-fill list height for system manage menus

Wire 系统信息 lists (tenant/dict/menu/dept/role/user/post/operlog) and
临时存放 CRM lists under 系统管理 to useListTableViewportHeight, with
onActivated recalc for keep-alive pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-09-01 19:42:20 +08:00
1 parent f457d5e106
commit 506cc7991a
19 files changed
+7871 -5820

No files matched your search

+28 -4
View File
@@ -97,7 +97,10 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="system-tenant"
<div ref="sysTenantTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable
ref="sysTenantTableRef"
:height="tableHeight" table-key="system-tenant"
class="list-table"
:data="tableData"
v-loading="loading"
@@ -177,7 +180,10 @@
header-align="center"
/>
</ListTable>
<div class="pagination list-pager-bar">
</div>
<div ref="sysTenantBelowRef">
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
</div>
@@ -192,6 +198,7 @@
@current-change="(val) => ((pagination.page = val), loadData())"
/>
</div>
</div>
</div>
<el-dialog
@@ -286,7 +293,8 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { ref, reactive, onMounted, computed } from 'vue'
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
import { ref, reactive, onMounted, computed , onActivated } from 'vue'
import { canDeleteByCreator, filterDeletableByCreator, allRowsDeletableByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -330,6 +338,15 @@ import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
resetToDefault
} = usePersistedListColumns('system-tenant-list-columns', listColumnDefs)
const sysTenantTableWrapRef = ref<HTMLElement | null>(null)
const sysTenantBelowRef = ref<HTMLElement | null>(null)
const sysTenantTableRef = ref<any>(null)
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
tableEl: sysTenantTableWrapRef,
pagerEl: sysTenantBelowRef,
tableRef: sysTenantTableRef
})
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
const quickSearchKeyword = ref('')
const tableData = ref<Api.Tenant.TenantItem[]>([])
@@ -595,7 +612,14 @@ import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
onMounted(() => {
loadData()
})
nextTick(() => recalcTableHeight())
})
onActivated(() => {
nextTick(() => recalcTableHeight())
})
</script>
<style scoped lang="scss">