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