From 6b94811bedda58940878d9462c0f686859da1dce Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Wed, 14 Oct 2026 14:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E9=98=85=E9=98=9F=E5=88=97=E6=88=90?= =?UTF-8?q?=E6=89=B9=E5=AE=A1=E9=98=85=E4=B9=8B=E5=90=8E=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E7=9A=84=E3=80=8CN=20=E9=A1=B9=E5=BE=85=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E3=80=8D=E8=B7=9F=E7=9D=80=E5=8F=98=EF=BC=9A=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E5=87=8F=E6=8E=89=E5=88=97=E8=A1=A8=E9=87=8C=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E4=B8=8D=E6=98=AF=E6=8E=A8=E6=96=AD=E7=9A=84=E9=A1=B9?= =?UTF-8?q?=EF=BC=88=E6=88=90=E6=89=B9=E5=AE=A1=E9=98=85=E3=80=81=E8=A1=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=87=8C=E6=94=B9=E8=BF=87=E7=9A=84=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E6=92=A4=E9=94=80=E5=AE=A1=E9=98=85=E5=9B=9E=E5=88=B0?= =?UTF-8?q?=E6=8E=A8=E6=96=AD=E7=9A=84=E3=80=81=E5=86=B2=E7=AA=81=E7=9A=84?= =?UTF-8?q?=E7=85=A7=E7=AE=97=EF=BC=8C=E5=92=8C=E8=A7=86=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E3=80=81=E6=8C=89=E8=A1=A8=E7=AD=9B=E9=80=89=E7=9A=84?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=90=8C=E4=B8=80=E4=B8=AA=E5=8F=A3=E5=BE=84?= =?UTF-8?q?=EF=BC=9B=E8=BD=BD=E5=85=A5=E4=B8=8B=E4=B8=80=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E7=94=A8=E5=90=8C=E4=B8=80=E4=B8=AA=E7=AE=97?= =?UTF-8?q?=E6=B3=95=EF=BC=9Bcheck-catalog-loop=20=E8=A1=A5=E7=BA=AF?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=92=8C=E6=88=90=E6=89=B9=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E3=80=81=E6=92=A4=E9=94=80=E5=AE=A1=E9=98=85=E3=80=81=E5=8D=95?= =?UTF-8?q?=E9=A1=B9=E7=A1=AE=E8=AE=A4=E3=80=81=E5=88=B7=E6=96=B0=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E7=9A=84=E8=AE=A1=E6=95=B0=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/catalog/ReviewQueue.tsx | 13 ++++++++----- frontend/src/pages/catalog/review.ts | 15 +++++++++++++++ scripts/check-catalog-loop.mjs | 17 +++++++++++++++++ 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/catalog/ReviewQueue.tsx b/frontend/src/pages/catalog/ReviewQueue.tsx index ba3a1d6c..fd82abec 100644 --- a/frontend/src/pages/catalog/ReviewQueue.tsx +++ b/frontend/src/pages/catalog/ReviewQueue.tsx @@ -10,15 +10,16 @@ import { errorMessage } from '../../lib/errors' import { CATALOG_REVIEW_TEXT as RT } from '../../lib/terms' import { StatusChip } from './parts' import { - REVIEW_BATCH_MAX, REVIEW_KINDS, REVIEW_PAGE, applyResults, batchTargets, confirmProgress, itemKey, reviewWhere, statusOf, - syncFromDetail, + REVIEW_BATCH_MAX, REVIEW_KINDS, REVIEW_PAGE, applyResults, batchTargets, confirmProgress, itemKey, pendingTotal, reviewWhere, + reviewedCount, statusOf, syncFromDetail, } from './review' import type { ItemOutcome } from './review' // =========================================================================== // 审阅队列(数据目录页的「审阅队列」视图,左栏):跨表列出推断项,顺序由服务端排好(所在表的使用次数 × 这一项对数字的 // 影响 × 来源),每一项写为什么排在这里。可以按项(影响数字的项 / 名称和含义)和表筛选;多选后成批确认、驳回,审阅过的 -// 原地标出结果(冲突的标出来),选中可以撤销审阅;刷新队列后审阅过的才移除。顶上是审阅进度:常用表(使用次数最多、 +// 原地标出结果(冲突的标出来),选中可以撤销审阅;刷新队列后审阅过的才移除,列表头的「N 项待确认」审阅成功一项就少一项 +// (pendingTotal,和视图标签、按表筛选的计数同一个口径)。顶上是审阅进度:常用表(使用次数最多、 // 被运行用过的前 20 张)、全部表、影响数字的项各确认了多少,三行同一个口径。点开一项,右栏是所在表的详情(滚到那一项、 // 标出来)和用过这张表的运行。 // =========================================================================== @@ -96,7 +97,7 @@ export function ReviewQueue({ sourceId, rows, kind, table, activeKey, detailSync const loadMore = async () => { const list = itemsRef.current if (!list || loadingMore) return - const gone = list.filter((i) => statusOf(i, outcomes.get(itemKey(i))) !== 'proposed').length + const gone = reviewedCount(list, outcomes) setLoadingMore(true) try { const q = await api.dataCatalog.reviewQueue(sourceId, { limit: REVIEW_PAGE, offset: list.length - gone, kind, table: table || null }) @@ -193,7 +194,9 @@ export function ReviewQueue({ sourceId, rows, kind, table, activeKey, detailSync reset: batchTargets(loaded, selected, 'reset', outcomes).length, } const filtered = kind !== 'all' || !!table + // 还没载入的项(total 里含列表里审阅过、刷新前还留着的项);列表头写的是还待确认的(审阅过的减掉) const remaining = Math.max(0, total - loaded.length) + const pending = pendingTotal(total, loaded, outcomes) return (
@@ -228,7 +231,7 @@ export function ReviewQueue({ sourceId, rows, kind, table, activeKey, detailSync - {selected.size ? RT.selected(selected.size) : items ? RT.total(total) : RT.loading} + {selected.size ? RT.selected(selected.size) : items ? RT.total(pending) : RT.loading} {selected.size > 0 && (