fix: 第21轮搜索审计修复 — OR模式NOT回退/子组虚条目/日期OR模式等10项
CI / backend (push) Canceled after 0s
CI / frontend (push) Canceled after 0s

Bug-R21-1 (CRITICAL): OR模式NOT分离过度 — A OR NOT B语义错误,恢复or_(*conditions)
Bug-R21-2 (CRITICAL): 双重嵌套括号sub_group_refs虚条目 — 仅当_ungrouped非空时写入
Bug-R21-3 (HIGH): negated_date_ranges被覆盖 — =改为|=
Bug-R21-4 (MEDIUM): 日期/PMID/DOI/PMC条件在OR模式始终AND — 合并为or_(*conditions)
Bug-R21-5 (MEDIUM): _parse_atom无条件消费任何词符 — 类型验证守卫
Bug-R21-6 (MEDIUM): 模态框双重goToPage(1) — 按钮只关弹窗,搜索由watcher触发
Bug-R21-7 (MEDIUM): page.value失败后不回退 — 捕获异常恢复前一页
Bug-R21-8 (LOW): 空引号""[TI]产生空Term — text为空时跳过
Bug-R21-9 (LOW): 冗余函数内import re — 使用模块级导入
This commit is contained in:
34047007@qq.com
2026-07-28 16:52:31 +08:00
parent 53cf1d6b70
commit c68aa060f0
5 changed files with 110 additions and 29 deletions
+6 -1
View File
@@ -21,8 +21,13 @@ export function usePagination(opts: UsePaginationOptions) {
const hasMore = computed(() => page.value < totalPages.value)
async function goToPage(n: number) {
const prev = page.value
page.value = n
await fetchFn(n)
try {
await fetchFn(n)
} catch {
page.value = prev
}
}
return { page, pageSize, total, totalPages, hasMore, goToPage }
+3 -3
View File
@@ -958,7 +958,7 @@ const specialTags = computed(() => filterOptions.value?.special_tags || {})
<template #footer>
<div style="display:flex;justify-content:space-between;align-items:center">
<span style="font-size:13px;color:var(--text-muted)">已选择 {{ pubTypes.length }} 项</span>
<NButton size="small" type="primary" @click="showPubTypeModal = false; goToPage(1)">确定</NButton>
<NButton size="small" type="primary" @click="showPubTypeModal = false">确定</NButton>
</div>
</template>
</NModal>
@@ -978,7 +978,7 @@ const specialTags = computed(() => filterOptions.value?.special_tags || {})
</div>
<template #footer>
<div style="display:flex;justify-content:flex-end">
<NButton size="small" type="primary" @click="showLangModal = false; goToPage(1)">确定</NButton>
<NButton size="small" type="primary" @click="showLangModal = false">确定</NButton>
</div>
</template>
</NModal>
@@ -994,7 +994,7 @@ const specialTags = computed(() => filterOptions.value?.special_tags || {})
</div>
<template #footer>
<div style="display:flex;justify-content:flex-end">
<NButton size="small" type="primary" @click="showAgeModal = false; goToPage(1)">确定</NButton>
<NButton size="small" type="primary" @click="showAgeModal = false">确定</NButton>
</div>
</template>
</NModal>