From 80ffa4f79954acd454d27dc53794af7e3d63544d Mon Sep 17 00:00:00 2001 From: mediabot-pt <295750538+mediabot-pt@users.noreply.github.com> Date: Wed, 1 Jul 2026 13:42:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=A3=E6=9E=90=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E6=91=98=E8=A6=81(?= =?UTF-8?q?=E8=A1=8C=E6=95=B0/=E5=AD=97=E6=AE=B5=E6=95=B0/=E7=A9=BA?= =?UTF-8?q?=E5=80=BC)=EF=BC=8C=E7=82=B9=E5=87=BB=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E8=AF=A6=E7=BB=86=E8=A1=A8=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/AccessResultCheck.vue | 35 ++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/web/src/views/AccessResultCheck.vue b/web/src/views/AccessResultCheck.vue index 110599a..66d7d09 100644 --- a/web/src/views/AccessResultCheck.vue +++ b/web/src/views/AccessResultCheck.vue @@ -78,9 +78,17 @@ - +
- +
+ + {{ page.parsed.rowCount }}行 · {{ page.parsed.fieldCount }}字段 + {{ page.nullCount }} 个空值 + 全部有效 + {{ page.parsed.message || '' }} +
+ @@ -90,10 +98,10 @@
-
+
{{ page.parsed.message || '解析失败' }}
-
未解析
+
未解析
暂无访问结果
@@ -122,7 +130,7 @@ const loading = ref(false), parseLoading = ref(false) const selectedConfigId = ref(null), selectedConfig = ref(null) const scriptContent = ref(''), saving = ref(false), approving = ref(false), rejecting = ref(false) const allConfigVersions = ref([]), allResults = ref([]) -const pageParsed = ref({}), reparsingUrls = reactive(new Set()) +const pageParsed = ref({}), reparsingUrls = reactive(new Set()), expanded = reactive(new Set()) const rawVisible = ref(false), rawLoading = ref(false), rawContent = ref('') const totalResults = computed(() => allResults.value.length) @@ -141,7 +149,18 @@ const pages = computed(() => { p.historyIds.push({ id: r.id, time: (r.createdAt||'').substring(5,16) }) } for (const [url, parsed] of Object.entries(pageParsed.value)) { - if (map.has(url)) map.get(url).parsed = parsed + if (map.has(url)) { + const p = map.get(url) + p.parsed = parsed + // 计算空值数 + if (parsed?.extracted?.length) { + let nulls = 0 + for (const row of parsed.extracted) { + for (const v of Object.values(row)) { if (v == null) nulls++ } + } + p.nullCount = nulls + } + } } return Array.from(map.values()) }) @@ -219,6 +238,10 @@ const refresh = async () => { finally { loading.value = false } } +const toggleExpand = (page) => { + expanded.has(page.url) ? expanded.delete(page.url) : expanded.add(page.url) +} + const viewRaw = async (page) => { rawVisible.value = true; rawLoading.value = true; rawContent.value = '' try { rawContent.value = (await api.accessResults.get(page.activeId)).data?.content || '(空)' }