|
|
@ -330,8 +330,8 @@ export default class Filter implements FilterType { |
|
|
|
this.id, |
|
|
|
this.id, |
|
|
|
]); |
|
|
|
]); |
|
|
|
let { list: childFilters } = cachedList; |
|
|
|
let { list: childFilters } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !childFilters.length) { |
|
|
|
if (!isNoneList && !childFilters.length) { |
|
|
|
childFilters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
childFilters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: { |
|
|
|
condition: { |
|
|
|
fk_parent_id: this.id, |
|
|
|
fk_parent_id: this.id, |
|
|
@ -375,8 +375,8 @@ export default class Filter implements FilterType { |
|
|
|
viewId || hookId, |
|
|
|
viewId || hookId, |
|
|
|
]); |
|
|
|
]); |
|
|
|
let { list: filters } = cachedList; |
|
|
|
let { list: filters } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !filters.length) { |
|
|
|
if (!isNoneList && !filters.length) { |
|
|
|
filters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
filters = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: viewId ? { fk_view_id: viewId } : { fk_hook_id: hookId }, |
|
|
|
condition: viewId ? { fk_view_id: viewId } : { fk_hook_id: hookId }, |
|
|
|
orderBy: { |
|
|
|
orderBy: { |
|
|
@ -486,8 +486,8 @@ export default class Filter implements FilterType { |
|
|
|
) { |
|
|
|
) { |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.FILTER_EXP, [viewId]); |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.FILTER_EXP, [viewId]); |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !filterObjs.length) { |
|
|
|
if (!isNoneList && !filterObjs.length) { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: { fk_view_id: viewId }, |
|
|
|
condition: { fk_view_id: viewId }, |
|
|
|
orderBy: { |
|
|
|
orderBy: { |
|
|
@ -507,8 +507,8 @@ export default class Filter implements FilterType { |
|
|
|
) { |
|
|
|
) { |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.FILTER_EXP, [hookId]); |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.FILTER_EXP, [hookId]); |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !filterObjs.length) { |
|
|
|
if (!isNoneList && !filterObjs.length) { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: { fk_hook_id: hookId }, |
|
|
|
condition: { fk_hook_id: hookId }, |
|
|
|
orderBy: { |
|
|
|
orderBy: { |
|
|
@ -532,8 +532,8 @@ export default class Filter implements FilterType { |
|
|
|
parentId, |
|
|
|
parentId, |
|
|
|
]); |
|
|
|
]); |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !filterObjs.length) { |
|
|
|
if (!isNoneList && !filterObjs.length) { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: { |
|
|
|
condition: { |
|
|
|
fk_parent_id: parentId, |
|
|
|
fk_parent_id: parentId, |
|
|
@ -563,8 +563,8 @@ export default class Filter implements FilterType { |
|
|
|
parentId, |
|
|
|
parentId, |
|
|
|
]); |
|
|
|
]); |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
let { list: filterObjs } = cachedList; |
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isEmptyList && !filterObjs.length) { |
|
|
|
if (!isNoneList && !filterObjs.length) { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
filterObjs = await ncMeta.metaList2(null, null, MetaTable.FILTER_EXP, { |
|
|
|
condition: { |
|
|
|
condition: { |
|
|
|
fk_parent_id: parentId, |
|
|
|
fk_parent_id: parentId, |
|
|
|