From 19b53cc1970574f1d66d44331ef34cd54955728e Mon Sep 17 00:00:00 2001 From: zhongwenkai <3478244299@qq.com> Date: Mon, 6 Jul 2026 10:46:22 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=9F=BA=E7=A1=80=E8=AE=BE=E6=96=BD-?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B1=80=E9=83=A8=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/apiAccessLog/index.vue | 21 ++++++++++++++++++++- src/views/infra/apiErrorLog/index.vue | 21 ++++++++++++++++++++- src/views/infra/codegen/index.vue | 21 ++++++++++++++++++++- src/views/infra/config/index.vue | 21 ++++++++++++++++++++- src/views/infra/file/index.vue | 21 ++++++++++++++++++++- src/views/infra/fileConfig/index.vue | 21 ++++++++++++++++++++- src/views/infra/job/index.vue | 21 ++++++++++++++++++++- src/views/iot/feedback/index.vue | 21 ++++++++++++++++++++- src/views/mes/baogongrecord/index.vue | 21 ++++++++++++++++++++- src/views/mes/processparameter/index.vue | 22 ++++++++++++++++++++++ src/views/mes/processroute/index.vue | 22 ++++++++++++++++++++++ src/views/mes/workReportRecord/index.vue | 21 ++++++++++++++++++++- 12 files changed, 244 insertions(+), 10 deletions(-) diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue index c0935e2c..9c1e047d 100644 --- a/src/views/infra/apiAccessLog/index.vue +++ b/src/views/infra/apiAccessLog/index.vue @@ -89,7 +89,7 @@ - + @@ -159,6 +159,18 @@ const message = useMessage() // 消息弹窗 const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 +const tableRef = ref() +const planTableMaxHeight = ref(520) +const planPaginationRef = ref() + +const updatePlanTableMaxHeight = async () => { + await nextTick() + const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0 + const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72 + const pageBottomGap = 56 + const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap + planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight))) +} const queryParams = reactive({ pageNo: 1, pageSize: 10, @@ -182,6 +194,7 @@ const getList = async () => { total.value = data.total } finally { loading.value = false + updatePlanTableMaxHeight() } } @@ -221,5 +234,11 @@ const handleExport = async () => { /** 初始化 **/ onMounted(() => { getList() + updatePlanTableMaxHeight() + window.addEventListener("resize", updatePlanTableMaxHeight) +}) + +onBeforeUnmount(() => { + window.removeEventListener("resize", updatePlanTableMaxHeight) }) diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue index 37a9da38..9cb4269e 100644 --- a/src/views/infra/apiErrorLog/index.vue +++ b/src/views/infra/apiErrorLog/index.vue @@ -86,7 +86,7 @@ - + @@ -172,6 +172,18 @@ const message = useMessage() // 消息弹窗 const loading = ref(true) // 列表的加载中 const total = ref(0) // 列表的总页数 const list = ref([]) // 列表的数据 +const tableRef = ref() +const planTableMaxHeight = ref(520) +const planPaginationRef = ref() + +const updatePlanTableMaxHeight = async () => { + await nextTick() + const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0 + const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72 + const pageBottomGap = 56 + const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap + planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight))) +} const queryParams = reactive({ pageNo: 1, pageSize: 10, @@ -194,6 +206,7 @@ const getList = async () => { total.value = data.total } finally { loading.value = false + updatePlanTableMaxHeight() } } @@ -247,5 +260,11 @@ const handleExport = async () => { /** 初始化 **/ onMounted(() => { getList() + updatePlanTableMaxHeight() + window.addEventListener("resize", updatePlanTableMaxHeight) +}) + +onBeforeUnmount(() => { + window.removeEventListener("resize", updatePlanTableMaxHeight) }) diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue index 1e4d3d2a..176a370d 100644 --- a/src/views/infra/codegen/index.vue +++ b/src/views/infra/codegen/index.vue @@ -56,7 +56,7 @@ - +