From dbb1837818d81534d898b396d0dad56455c01a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=87=AA=E8=BE=BE?= <980324341@qq.com> Date: Thu, 15 Oct 2026 01:12:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E8=A7=82=E4=B8=93=E5=88=A9:=20?= =?UTF-8?q?=E6=91=98=E6=8E=89=E3=80=8C=E5=88=86=E7=BB=84=E6=95=B0=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E3=80=8D=E7=A1=AE=E8=AE=A4=E6=A1=86=E3=80=81=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8F=90=E7=A4=BA=E6=94=B9=E6=88=90=E9=80=90=E8=A1=8C?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=8F=A3=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 10-15 把 worker 抓取改成逐行(maixiang_run_task f871f55)后,解析阶段的分组只剩 "回传攒片"一个作用,不再决定检测覆盖 —— 这个框的前提随之消失: - 它写"同组只会检测 1 次,结论复制到组内其它行",那是 10-10 撤折叠之前的语义,已过期 - 判据是 rows>=20 且 groups*3
上传文件
import { computed, onMounted, onUnmounted, ref } from 'vue' import { userNotice } from '@/shared/utils/user-notice' -import { ElMessage, ElMessageBox } from 'element-plus' +import { ElMessage } from 'element-plus' import AmazonToolPageShell from '@/pages/amazon/components/AmazonToolPageShell.vue'; import FileUploadZone from '@/shared/components/FileUploadZone.vue' import ModuleTemplateDownload from '@/shared/components/ModuleTemplateDownload.vue' @@ -374,28 +374,12 @@ function toTaskSummary(result: AppearancePatentParseVo): TaskSummary { } /** - * 本模块按 id 列分组,同组只检测 1 次并把结论复制给组内其它行。 - * 生产事故(任务 28805):源表 id 列 904 行全填 "1",整表塌成 1 组,105 秒就"完成"了。 - * 这里在解析后按组/行比例提醒用户确认,返回 true 表示用户选择回去改表。 + * 本模块自 2026-10-15 起逐行抓取、逐行送检:解析阶段仍按 id 前缀分组,但分组只是 + * 回传攒片的单位,不再决定检测覆盖,所以原先这里有一个「分组数异常」确认框 + * (组数 < 行数/3 就拦一道,源自任务 28805 的 id 塌陷事故)—— 它的前提已经不存在, + * 且会在用户正常填变体 id(12_1…12_98)时误报,故摘除。检测覆盖由 ap_worker 的 + * 逐行抓取用例钉住:maixiang_run_task/test/maixiang_ops/test_proxy_cost_leaks.py。 */ -async function abortOnCollapsedGroups(res: { acceptedRows?: number; groupCount?: number }): Promise { - const rows = res.acceptedRows || 0 - const groups = res.groupCount || 0 - if (rows < 20 || groups * 3 >= rows) { - return false - } - try { - await ElMessageBox.confirm( - `本次共 ${rows} 行,只识别出 ${groups} 个检测分组(平均每组 ${(rows / Math.max(groups, 1)).toFixed(1)} 行)。` - + '同组只会检测 1 次,结论复制到组内其它行。若 id 列是整表同一个值,请改为每个商品一个 id 后重新上传。', - '分组数异常', - { confirmButtonText: '按当前分组继续', cancelButtonText: '返回改表', type: 'warning', distinguishCancelAndClose: true }, - ) - return false - } catch { - return true - } -} async function parseFiles() { if (!uploadedFiles.value.length) { @@ -424,12 +408,6 @@ async function parseFiles() { queuedTaskSummary.value = null return } - if (await abortOnCollapsedGroups(res)) { - parseResult.value = null - queuedTaskSummary.value = null - ElMessage.info('已取消,修正 id 列后重新解析') - return - } parseResult.value = res queuedTaskSummary.value = null ElMessage.success(`解析完成,共 ${res.groupCount || 0} 组 / ${res.acceptedRows} 条`)