diff --git a/admin-frontend-vue/src/pages/patent/AppearancePatentCleanItemsPage.vue b/admin-frontend-vue/src/pages/patent/AppearancePatentCleanItemsPage.vue index 1aaf76f8b..c4f5967df 100644 --- a/admin-frontend-vue/src/pages/patent/AppearancePatentCleanItemsPage.vue +++ b/admin-frontend-vue/src/pages/patent/AppearancePatentCleanItemsPage.vue @@ -9,7 +9,13 @@ import { formatDateTime, orderedPair } from '@/utils/datetime' * (task_id/asin)与前端过滤模块逐字对撞护栏原样保留,只是 UI 不再暴露。数据由出表成功点 * 自动同步(后端 SyncService),本页零写操作:无编辑/导入;单条明细没有可下载文件,下载/导出 * 统一走既有 /export 全量出 xlsx(带当前过滤面 + 公司 tab,含所属主管列)。分组下拉选项与去重页 - * 共用 GET /shop-manages/groups,选中后以 group_id 走同一过滤面(列表与导出同源)。 */ + * 共用 GET /shop-manages/groups,选中后以 group_id 走同一过滤面(列表与导出同源)。 + * 同日三改(客户「要按主管分组显示」「价格 asin 无侵权 这些都不需要展示的」「到时候能下载 + * 表格看就行」):卡片按所属主管连续分组——组头=主管名+本页条数(grid 全宽一行),组内行序 + * 保持服务端 synced_at DESC 原样,不跨页聚合、不按名重排(跨主管交错时按行序出多个同名组头, + * 忠实反映同步顺序;要只看一个主管用分组下拉过滤)。卡片字段同批精简:只留 标题(卡头,替下 + * 原 ASIN 卡头)/任务/国家/品牌/SKU/同步;价格、ASIN、结论徽章(无侵权)、所属主管行不再 + * 上卡——全量明细(含价格/ASIN/结论/主管列)仍走 /export xlsx。 */ import { computed, onMounted, reactive, ref, watch } from 'vue' import { exportAppearancePatentCleanList, @@ -18,7 +24,6 @@ import { type DedupeGroupOption, } from './appearance-patent-clean-api.ts' import type { AppearancePatentCleanItem } from './appearance-patent-clean-model.ts' -import { cleanItemReasonTooltip } from './appearance-patent-clean-model.ts' import { createAppearancePatentCleanFilterState } from './appearance-patent-clean-filter.ts' import { ASIN_COUNTRY_CODES, asinCountryLabel } from '../asin/asin-country.ts' import OldPagination from '@/components/OldPagination.vue' @@ -50,15 +55,19 @@ function clampDatePair(): void { const totalPages = computed(() => Math.max(1, Math.ceil(total.value / pageSize.value))) -/** 结论徽章档位:先判「无侵权」再判「侵权」(『无侵权』串里也含『侵权』二字),其余中性灰。 - * 本页同步面只进「结论=无侵权」的行,绿色是常态;兜住服务端将来放宽同步口径的展示。 */ -function conclusionBand(conclusion: string): 'success' | 'failed' | 'cancelled' { - const text = (conclusion || '').trim() - if (!text) return 'cancelled' - if (text.includes('无侵权')) return 'success' - if (text.includes('侵权') || text.includes('风险') || text.includes('存疑')) return 'failed' - return 'cancelled' -} +/** 主管分组视图(2026-11-11 三改「要按主管分组显示」):按服务端下发顺序(synced_at DESC)把 + * 连续同主管的行切段,组头带本页条数;只在当前页窗口内分组——不跨页聚合、不按名重排, + * 同名主管被别的主管隔开时按行序出多个同名组头。读不到主管名不猜,展示 -。 */ +const groupedRows = computed<{ name: string; items: AppearancePatentCleanItem[] }[]>(() => { + const groups: { name: string; items: AppearancePatentCleanItem[] }[] = [] + for (const row of rows.value) { + const name = row.supervisorName || '-' + const last = groups[groups.length - 1] + if (last && last.name === name) last.items.push(row) + else groups.push({ name, items: [row] }) + } + return groups +}) /** 分组选项与去重页/店铺管理同源(GET /shop-manages/groups);失败静默回空——分组只是筛选项, * 不该让它把首屏行集一起拖死(列表失败有自己的 LoadFailureBar)。 */ @@ -208,48 +217,40 @@ onMounted(() => {