From 73242646ff84c4fe9e204af88b5de52e5835172a Mon Sep 17 00:00:00 2001 From: wangmingyong Date: Mon, 1 Jun 2026 10:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/EnforcementRecordList.vue | 109 ++++++------------ .../components/HistoryActivityList.vue | 8 ++ 2 files changed, 46 insertions(+), 71 deletions(-) diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/EnforcementRecordList.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/EnforcementRecordList.vue index 9003c222..02bbbfde 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/EnforcementRecordList.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/EnforcementRecordList.vue @@ -11,41 +11,32 @@ - - -
-
-
{{ item.createTime }}
-
{{ enterpriseName }}
-
{{ item.caseType || '执法检查' }}
-
-
-
-
-
-
{{ item.createTime }}
-
执法单位:{{ - item.enforcementUnit || - item.unitName }}
+
+ 加载中... + +
@@ -68,38 +59,22 @@ defineEmits(['toggle-expand']); // ========== 数据 ========== const recordTab = ref(0); - -// 历史执法案件数据 const cityRecords = ref([]); - -// 分页相关 -const pageNum = ref(1); -const pageSize = ref(10); -const hasMore = ref(true); const loading = ref(false); // ========== 获取执法记录数据 ========== -const fetchEnfRegistrationList = (isLoadMore = false) => { +const fetchEnfRegistrationList = () => { + loading.value = true; const params = { - pageSize: pageSize.value, - pageNum: isLoadMore ? pageNum.value : 1, - warnType: recordTab.value === 0 ? 1 : 0 // 0=本单位,1=全市 + warnType: recordTab.value === 0 ? 1 : 0, + // pageSize: 20, + // pageNum: 1, }; queryEnfRegistrationList(params, (res) => { loading.value = false; if (res.code === 200) { - const data = res.data.list || []; - if (isLoadMore) { - cityRecords.value = [...cityRecords.value, ...data]; - } else { - cityRecords.value = data; - pageNum.value = 1; - } - // 判断是否还有更多数据 - hasMore.value = data.length >= pageSize.value; - if (hasMore.value) { - pageNum.value++; - } + const data = res.data || []; + cityRecords.value = data.filter(item => item !== null && item !== undefined); } else { console.error('获取执法记录失败:', res.msg); } @@ -109,25 +84,10 @@ const fetchEnfRegistrationList = (isLoadMore = false) => { }); }; -// ========== 列表加载处理 ========== -const onLoad = () => { - if (loading.value || !hasMore.value) return; - fetchEnfRegistrationList(true); -}; - -// ========== 重置分页 ========== -const resetPagination = () => { - pageNum.value = 1; - hasMore.value = true; - loading.value = false; - cityRecords.value = []; -}; - // ========== 切换执法记录 Tab ========== const handleRecordTabChange = (tabIndex) => { recordTab.value = tabIndex; - resetPagination(); - loading.value = true; + cityRecords.value = []; fetchEnfRegistrationList(); }; @@ -272,6 +232,13 @@ fetchEnfRegistrationList(); font-size: 0.4rem; } + .loading-state { + display: flex; + justify-content: center; + align-items: center; + padding: 2rem 0; + } + .record-list { height: calc(100vh - 150px); } diff --git a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/HistoryActivityList.vue b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/HistoryActivityList.vue index 1b3f53a2..c7e08c07 100644 --- a/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/HistoryActivityList.vue +++ b/zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/components/HistoryActivityList.vue @@ -107,6 +107,14 @@ const fetchActivityList = (isLoadMore = false) => { if (dateSearch.value) { params.dateSearch = dateSearch.value; } + // 日期类型:month=1, quarter=2, year=3 + if (dateSearch.value === 'month') { + params.dateType = 1; + } else if (dateSearch.value === 'quarter') { + params.dateType = 2; + } else if (dateSearch.value === 'year') { + params.dateType = 3; + } queryNonRegistrationList(params, (res) => { loading.value = false;