fix: 第22轮搜索审计修复 — De Morgan语义/部分日期/has_not/custom URL等8项
CI / backend (push) Canceled after 0s
CI / frontend (push) Canceled after 0s

Bug-R22-1 (MEDIUM): OR模式特殊字段NOT产生错误De Morgan语义 — 17处修正
Bug-R22-2 (MEDIUM): has_not不反映日期范围NOT — 添加_date_range_markers检查
Bug-R22-3 (MEDIUM): YYYY-MM[DP]未引号部分日期无法解析 — 预处理器标准化
Bug-R22-4 (MEDIUM): date_preset=custom URL恢复丢失年份范围 — 读取URL参数
Bug-R22-5 (MEDIUM): 错误状态下分页总数残留 — 搜索开始时重置total
Bug-R22-6 (LOW): 搜索错误状态未在开始时清除 — 搜索开始时重置searchError
Bug-R22-7 (LOW): DATE token不在未消耗标记恢复处理器中 — 添加DATE类型
Bug-R22-8 (LOW): 外部NOT组内is_not被忽略 — 保留t.is_not
This commit is contained in:
34047007@qq.com
2026-07-28 17:05:27 +08:00
parent c68aa060f0
commit 2444a4be2c
4 changed files with 105 additions and 23 deletions
+9 -2
View File
@@ -274,6 +274,8 @@ const { page, total, goToPage } = usePagination({
const gen = ++searchGeneration.value
loading.value = true
searched.value = true
searchError.value = ''
total.value = 0
try {
if (p === 1 && query.value.trim()) {
trackAction('search', 'search', query.value.trim(), { sort: sort.value })
@@ -392,8 +394,13 @@ function restoreFromQuery() {
if (route.query.sort && VALID_SORTS.has(String(route.query.sort))) sort.value = String(route.query.sort)
if (route.query.date_preset && ['1y','5y','10y','custom'].includes(String(route.query.date_preset))) {
datePreset.value = String(route.query.date_preset)
yearFromStr.value = ''
yearToStr.value = ''
if (datePreset.value === 'custom') {
if (route.query.year_from) yearFromStr.value = String(route.query.year_from)
if (route.query.year_to) yearToStr.value = String(route.query.year_to)
} else {
yearFromStr.value = ''
yearToStr.value = ''
}
} else if (route.query.date_from || route.query.date_to) {
datePreset.value = null
if (route.query.date_from) {