refactor: refs #8316 used VnSection and VnCardBeta #1149
|
@ -80,7 +80,6 @@ onBeforeMount(() => {
|
||||||
/>
|
/>
|
||||||
<div :id="searchbarId"></div>
|
<div :id="searchbarId"></div>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel v-if="$slots['rightMenu'] || rightFilter">
|
<template #right-panel v-if="$slots['rightMenu'] || rightFilter">
|
||||||
<slot name="rightMenu">
|
<slot name="rightMenu">
|
||||||
|
|
|
@ -18,8 +18,7 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
default: 3,
|
||||||
default: null,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -391,7 +391,7 @@ onBeforeMount(async () => {
|
||||||
{{ row?.subName.toUpperCase() }}
|
{{ row?.subName.toUpperCase() }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<FetchedTags :item="row" :columns="3" />
|
<FetchedTags :item="row" />
|
||||||
</template>
|
</template>
|
||||||
<template #more-create-dialog="{ data }">
|
<template #more-create-dialog="{ data }">
|
||||||
<VnInput
|
<VnInput
|
||||||
|
|
|
@ -15,15 +15,18 @@ const router = useRouter();
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const dataKey = 'OrderCatalogList';
|
const dataKey = 'OrderCatalogList';
|
||||||
const arrayData = useArrayData(dataKey);
|
const catalogParams = {
|
||||||
const store = arrayData.store;
|
|
||||||
const tags = ref([]);
|
|
||||||
const itemRefs = ref({});
|
|
||||||
|
|
||||||
let catalogParams = {
|
|
||||||
orderFk: route.params.id,
|
orderFk: route.params.id,
|
||||||
orderBy: JSON.stringify({ field: 'relevancy DESC, name', way: 'ASC', isTag: false }),
|
orderBy: JSON.stringify({ field: 'relevancy DESC, name', way: 'ASC', isTag: false }),
|
||||||
};
|
};
|
||||||
|
const arrayData = useArrayData(dataKey, {
|
||||||
|
url: 'Orders/CatalogFilter',
|
||||||
|
limit: 50,
|
||||||
|
userParams: catalogParams,
|
||||||
|
});
|
||||||
|
const store = arrayData.store;
|
||||||
|
const tags = ref([]);
|
||||||
|
const itemRefs = ref({});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
stateStore.rightDrawer = true;
|
stateStore.rightDrawer = true;
|
||||||
|
@ -66,7 +69,6 @@ function extractValueTags(items) {
|
||||||
);
|
);
|
||||||
tagValue.value = resultValueTags;
|
tagValue.value = resultValueTags;
|
||||||
}
|
}
|
||||||
const autoLoad = computed(() => !!JSON.parse(route?.query.table ?? '{}')?.categoryFk);
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => store.data,
|
() => store.data,
|
||||||
|
@ -78,16 +80,15 @@ watch(
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<Teleport to="#section-searchbar" v-if="stateStore.isHeaderMounted()">
|
||||||
:data-key="dataKey"
|
<VnSearchbar
|
||||||
:user-params="catalogParams"
|
:data-key="dataKey"
|
||||||
:static-params="['orderFk', 'orderBy']"
|
:redirect="false"
|
||||||
:redirect="false"
|
:label="t('Search items')"
|
||||||
url="Orders/CatalogFilter"
|
:info="t('You can search items by name or id')"
|
||||||
:label="t('Search items')"
|
:search-remove-params="false"
|
||||||
:info="t('You can search items by name or id')"
|
/>
|
||||||
:search-remove-params="false"
|
</Teleport>
|
||||||
/>
|
|
||||||
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
|
<Teleport to="#right-panel" v-if="stateStore.isHeaderMounted()">
|
||||||
<OrderCatalogFilter
|
<OrderCatalogFilter
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
|
@ -98,13 +99,7 @@ watch(
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<QPage class="column items-center q-pa-md" data-cy="orderCatalogPage">
|
<QPage class="column items-center q-pa-md" data-cy="orderCatalogPage">
|
||||||
<div class="full-width">
|
<div class="full-width">
|
||||||
<VnPaginate
|
<VnPaginate :data-key="dataKey">
|
||||||
:data-key="dataKey"
|
|
||||||
url="Orders/CatalogFilter"
|
|
||||||
:limit="50"
|
|
||||||
:user-params="catalogParams"
|
|
||||||
:auto-load="autoLoad"
|
|
||||||
>
|
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<div class="catalog-list">
|
<div class="catalog-list">
|
||||||
<div v-if="rows && !rows?.length" class="no-result">
|
<div v-if="rows && !rows?.length" class="no-result">
|
||||||
|
|
Loading…
Reference in New Issue