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
@@ -95,7 +95,10 @@
</div>
<div class="list-body list-wrap">
<ListTable table-key="system-post"
<div ref="sysPostTableWrapRef" class="table-scroll bx-list-table-wrap">
<ListTable
ref="sysPostTableRef"
:height="tableHeight" table-key="system-post"
class="list-table"
:data="tableData"
v-loading="loading"
@@ -155,7 +158,10 @@
header-align="center"
/>
</ListTable>
<div class="pagination list-pager-bar">
</div>
<div ref="sysPostBelowRef">
<div class="pagination list-pager-bar">
<div class="list-pager-selected">
已选 <span class="sel-num">{{ selectedRows.length }}</span> 项
</div>
@@ -170,6 +176,7 @@
@current-change="(val) => ((pagination.page = val), loadData())"
/>
</div>
</div>
</div>
<el-dialog
@@ -365,7 +372,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, computed, onMounted, nextTick } from 'vue'
import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
import { ref, reactive, computed, onMounted, nextTick , 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'
@@ -414,6 +422,15 @@ import { useDictStore } from '@/store/modules/dict'
resetToDefault
} = usePersistedListColumns('system-post-list-columns', listColumnDefs)
const sysPostTableWrapRef = ref<HTMLElement | null>(null)
const sysPostBelowRef = ref<HTMLElement | null>(null)
const sysPostTableRef = ref<any>(null)
const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
tableEl: sysPostTableWrapRef,
pagerEl: sysPostBelowRef,
tableRef: sysPostTableRef
})
const dictStore = useDictStore()
const searchForm = reactive<{ keyword: string }>({ keyword: '' })
@@ -869,7 +886,14 @@ import { useDictStore } from '@/store/modules/dict'
onMounted(() => {
loadData()
loadDictOptions()
})
nextTick(() => recalcTableHeight())
})
onActivated(() => {
nextTick(() => recalcTableHeight())
})
</script>
<style scoped lang="scss">