From c25fddd95381336e02526659a06b887ebf60a38f Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 8 Nov 2024 16:54:29 +0100 Subject: [PATCH] feat(VnLogFilter): refactor and work --- src/components/common/VnLog.vue | 12 ++- src/components/common/VnLogFilter.vue | 144 +++++++++++++++----------- 2 files changed, 88 insertions(+), 68 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 9f60f96f7..a9ebd4171 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -14,6 +14,7 @@ import VnJsonValue from '../common/VnJsonValue.vue'; import VnUserLink from '../ui/VnUserLink.vue'; import VnLogFilter from './VnLogFilter.vue'; import VnTable from '../VnTable/VnTable.vue'; +import RightMenu from './RightMenu.vue'; const stateStore = useStateStore(); const validationsStore = useValidator(); @@ -43,7 +44,11 @@ const paginate = ref({}); const searchInput = ref(); const modelName = computed(() => params.value.model || props.model); const selectedFilters = ref({}); -const params = ref({ originFk: paginate.value?.params?.originFk ?? route.params.id }); +const params = ref({ + originFk: paginate.value?.params?.originFk ?? route.params.id, + model: props.model, + action: [], +}); let validations = models; let pointRecord = ref(null); let byRecord = ref(false); @@ -144,7 +149,6 @@ function parseProps(propNames, locale, vals, olds) { } function getLogTree(data) { - console.log('data: ', data); if (!data) return; const logs = []; @@ -238,14 +242,12 @@ function filterByRecord(modelLog) { :url="`${modelName}Logs`" :skeleton="false" :user-filter="filter" - :auto-load="!!modelName || route.query.table" @on-fetch="setLogTree" :columns="[]" :right-search="false" - search-url="table" + :search-url="false" >