Commit 136cc55c by 李伟康

refactor(dailyNewspaper): 新增filterBrandId过滤逻辑

优化子表单列表的过滤条件,优先使用filterBrandId进行子集判断,兼容原有brandId的过滤逻辑
1 parent 15cd77b0
...@@ -228,7 +228,11 @@ export default { ...@@ -228,7 +228,11 @@ export default {
.filter(item => { .filter(item => {
if (item.type == 'subform' && item.children.length) { if (item.type == 'subform' && item.children.length) {
item.children[0] = item.children[0].filter(child => { item.children[0] = item.children[0].filter(child => {
if(child.filterBrandId && child.filterBrandId.length) {
return !isSubset(child.filterBrandId, CAR_BRAND_ID)
} else {
return child.brandId?.length ? hasCommonElement(child.brandId, CAR_BRAND_ID) : true return child.brandId?.length ? hasCommonElement(child.brandId, CAR_BRAND_ID) : true
}
}).filter(child => { }).filter(child => {
return child.baseSceneCode?.length ? hasCommonElement(child.baseSceneCode, baseCode) : true return child.baseSceneCode?.length ? hasCommonElement(child.baseSceneCode, baseCode) : true
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!