fix: 过滤按大类用对应字段比对,修复左鑫节点无法筛选问题

This commit is contained in:
simonkoson
2026-05-27 14:53:11 +08:00
parent 347a06e48b
commit 70784fc70b
@@ -123,7 +123,15 @@ export default function KnowledgeBase() {
const { type, detail } = selectedTreeNode
result = result.filter(i => {
if (i.source_type !== type) return false
if (detail !== null && i.source_detail !== detail) return false
if (detail !== null) {
// 按大类决定用哪个字段比对(节目文稿=author,杂志文章=source_detail
if (type === 'manuscript') {
if (i.author !== detail) return false
} else {
// 杂志文章等用 source_detail
if (i.source_detail !== detail) return false
}
}
return true
})
} else if (sourceDetailFilter) {