fix: 过滤按大类用对应字段比对,修复左鑫节点无法筛选问题
This commit is contained in:
@@ -123,7 +123,15 @@ export default function KnowledgeBase() {
|
|||||||
const { type, detail } = selectedTreeNode
|
const { type, detail } = selectedTreeNode
|
||||||
result = result.filter(i => {
|
result = result.filter(i => {
|
||||||
if (i.source_type !== type) return false
|
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
|
return true
|
||||||
})
|
})
|
||||||
} else if (sourceDetailFilter) {
|
} else if (sourceDetailFilter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user