From af1c9e588f1de0240390648f9bb56aa486870aff Mon Sep 17 00:00:00 2001 From: chengxiangling <291105840@qq.com> Date: 星期五, 16 五月 2025 17:40:18 +0800 Subject: [PATCH] 提交高度修改; --- src/views/basicData/processRoute/index.vue | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/views/basicData/processRoute/index.vue b/src/views/basicData/processRoute/index.vue index ce3af19..a65b93f 100644 --- a/src/views/basicData/processRoute/index.vue +++ b/src/views/basicData/processRoute/index.vue @@ -70,6 +70,7 @@ <HxlhTable style="width: 100%" :columns="columns" + :showOverflow="true" :virtualYConfig="virtualYConfig" :data="processRouteList" :loading="loading" @@ -203,10 +204,11 @@ processRouteTempList, confirmProcessRoute, } from "@/api/basicData/processRoute"; +import { throttle } from "@/utils/throttle"; import HxlhTable from "@/components/HxlhTable"; import { getToken } from "@/utils/auth"; import { ref } from "vue"; -import { ElMessage } from "element-plus"; +// import { ElMessage } from "element-plus"; const { proxy } = getCurrentInstance(); const processRouteList = ref([]); @@ -220,7 +222,7 @@ const title = ref(""); const daterangeIntegrationDay = ref([]); //寮圭獥鐩稿叧 -const height = ref(document.documentElement.clientHeight - 260 + "px;"); +const height = ref(document.documentElement.clientHeight - 230 + "px;"); const isVisible = ref(false); const isError = ref(false); const planned = ref(true); @@ -406,7 +408,7 @@ const data = reactive({ form: {}, queryParams: { - pageNum: 0, + pageNum: 1, pageSize: 100, itemNo: null, integrationDay: null, @@ -427,18 +429,17 @@ daterangeIntegrationDay.value[1]; } - const response = await listProcessRoute(queryParams.value) - // processRouteList.value = response.rows; - if(processRouteList.value.length < queryParams.value.pageSize){ - hasMore.value = false; - processRouteList.value = response.rows - }else{ - processRouteList.value = [...processRouteList.value,...response.rows]; - } - - // total.value = response.total; - loading.value = false; - + const response = await listProcessRoute(queryParams.value); + // processRouteList.value = response.rows; + if (processRouteList.value.length < queryParams.value.pageSize) { + hasMore.value = false; + processRouteList.value = response.rows; + } else { + processRouteList.value = [...processRouteList.value, ...response.rows]; + } + + // total.value = response.total; + loading.value = false; } // async function loadData() { // try { @@ -453,9 +454,13 @@ // console.error('Error fetching data:', error); // } // } -function handleAutoLoadMore(){ - getList(); +const throttledScroll = throttle(() => { queryParams.value.pageNum++; + getList(); + console.log("1111") +}, 200); +function handleAutoLoadMore() { + throttledScroll() } // 鍙栨秷鎸夐挳 function cancel() { -- Gitblit v1.9.3