From e820811d987dda22c814135169aecdda38f79b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Mon, 7 Sep 2026 00:04:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=9C=80=E6=B1=82):=20=E2=91=A0=E6=92=9E?= =?UTF-8?q?=E6=AC=BE=E9=A1=B5=E3=80=8C=E5=BA=97=E9=93=BA=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E5=88=86=E5=B8=83/=E6=92=9E=E6=AC=BE=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E7=9F=A9=E9=98=B5/=E6=92=9E=E6=AC=BE=E8=AF=A6=E6=83=85/?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=8A=BD=E5=B1=89=E3=80=8D=E5=9B=9B=E5=9D=97?= =?UTF-8?q?=E8=A1=A5=E5=88=86=E9=A1=B5(=E5=85=B1=E4=BA=AB=20OldPagination,?= =?UTF-8?q?10/20/50/100=20=E5=8F=AF=E9=80=89)=20=E2=91=A1=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E6=95=B0=E6=8D=AE=E8=AE=B0=E5=BD=95=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=BA=97=E9=93=BA=E7=BA=A7=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E3=80=81=E4=BF=9D=E7=95=99=E5=BA=95=E9=83=A8(=E5=BA=97?= =?UTF-8?q?=E9=93=BA=20pageSize=20=E6=8F=90=E5=88=B0=20200=20=E4=B8=80?= =?UTF-8?q?=E6=AC=A1=E5=85=A8=E8=BD=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/tasks/DuplicateCheckPage.vue | 43 ++++++++++++++++--- .../src/pages/tasks/ShopDataTasksPage.vue | 3 +- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/admin-frontend-vue/src/pages/tasks/DuplicateCheckPage.vue b/admin-frontend-vue/src/pages/tasks/DuplicateCheckPage.vue index 25516409..0c0c716a 100644 --- a/admin-frontend-vue/src/pages/tasks/DuplicateCheckPage.vue +++ b/admin-frontend-vue/src/pages/tasks/DuplicateCheckPage.vue @@ -4,7 +4,7 @@ * 数据源保持自家后端:/duplicate-check-console(指标/店铺/撞款全集/分组统计) + /duplicate-check-ledger(台账分页) + /duplicate-check-export(Excel)。 * 分组归属来自「店铺管理」真实店铺分组,本页只读展示,仅用于分组撞款范围切换。 */ -import { computed, onMounted, reactive, ref } from 'vue' +import { computed, onMounted, reactive, ref, watch } from 'vue' import { useAdminSessionStore } from '@/stores/admin-session' import type { DuplicateItem, DuplicateOccurrence, DuplicateMetrics, DuplicateShop } from './duplicate-model.ts' import { fetchDuplicateConsole, fetchDuplicateLedger, requestDuplicateExportBlob, type LedgerSortKey } from './duplicate-console-api.ts' @@ -39,6 +39,8 @@ const ledgerLoading = ref(false) const jumpInput = ref('') const sortState = reactive<{ key: LedgerSortKey | ''; dir: 'asc' | 'desc' }>({ key: 'earliest', dir: 'asc' }) +import OldPagination from '@/components/OldPagination.vue' + const drawerVisible = ref(false) const drawerTitle = ref('') const drawerBrand = ref('') @@ -127,6 +129,35 @@ function itemBrand(item: DuplicateItem): string { return '' } + +// ---- 撞款视图分页(分布/矩阵/撞款详情/抽屉明细;10/20/50/100 可选) ---- +const distCount = computed(() => storeDistribution.value.list.length) +const distPage = ref(1) +const distPageSize = ref(10) +const pagedDistBars = computed(() => + storeDistribution.value.list.slice((distPage.value - 1) * distPageSize.value, distPage.value * distPageSize.value), +) +const matrixPage = ref(1) +const matrixPageSize = ref(10) +const matrixRows = computed(() => + dupRows.value.slice((matrixPage.value - 1) * matrixPageSize.value, matrixPage.value * matrixPageSize.value), +) +const dupCardPage = ref(1) +const dupCardPageSize = ref(6) +const dupCardRows = computed(() => + dupRows.value.slice((dupCardPage.value - 1) * dupCardPageSize.value, dupCardPage.value * dupCardPageSize.value), +) +const drawerPage = ref(1) +const drawerPageSize = ref(10) +const drawerRows = computed(() => + drawerAggRows.value.slice((drawerPage.value - 1) * drawerPageSize.value, drawerPage.value * drawerPageSize.value), +) +watch([dupRows, drawerOccurrences], () => { + matrixPage.value = Math.min(matrixPage.value, Math.max(1, Math.ceil(dupRows.value.length / matrixPageSize.value))) + dupCardPage.value = Math.min(dupCardPage.value, Math.max(1, Math.ceil(dupRows.value.length / dupCardPageSize.value))) + drawerPage.value = 1 +}) + const matrixHint = computed(() => scope.value === 'global' ? '行 = 全店撞款ASIN,列 = 全部店铺;有数字表示该店在售此 ASIN,点击行可看上架时间明细' @@ -452,7 +483,7 @@ onMounted(() => { 各店铺在本批站点中的上架记录量(含重复扫描)
-
+
{{ bar.name }} · {{ bar.group }} {{ bar.records.toLocaleString() }} @@ -461,6 +492,7 @@ onMounted(() => {
{{ bar.asins.toLocaleString() }} 个 ASIN
+ @@ -521,7 +553,7 @@ onMounted(() => { - + {{ item.asin }} {{ itemBrand(item) || '—' }} @@ -538,10 +570,11 @@ onMounted(() => { 调整筛选条件或切换到其他分组查看
+
撞款详情 同一 ASIN 在多家店铺的上架时间明细
-
+
{{ item.asin }} {{ item.shopCount }}店在售 @@ -636,7 +669,7 @@ onMounted(() => { 店铺分组站点上架时间(按时间升序)次数 - + {{ row.shopName }} {{ row.groupName || '—' }} {{ asinCountryLabel(row.country || '') }} diff --git a/admin-frontend-vue/src/pages/tasks/ShopDataTasksPage.vue b/admin-frontend-vue/src/pages/tasks/ShopDataTasksPage.vue index d0802e8c..a31e88d2 100644 --- a/admin-frontend-vue/src/pages/tasks/ShopDataTasksPage.vue +++ b/admin-frontend-vue/src/pages/tasks/ShopDataTasksPage.vue @@ -32,7 +32,7 @@ const loading = ref(false) const groups = ref([]) const totalShops = ref(0) const page = ref(1) -const pageSize = ref(20) +const pageSize = ref(200) const pageJump = ref('') const totalPages = computed(() => Math.max(1, Math.ceil(totalShops.value / pageSize.value))) // 卡片宫格分页:一行 3 个、一页 9 张卡片(在店铺分页的结果文件内翻页)。 @@ -338,7 +338,6 @@ onMounted(load)
共 {{ totalShops }} 家店铺 · 本页 {{ resultFileCount() }} 个结果文件 -