- prima bozza catalogo

This commit is contained in:
Surya Paolo
2024-12-02 19:38:01 +01:00
parent 6932590f3e
commit 1cb5e6f1ad
9 changed files with 207 additions and 149 deletions

View File

@@ -411,7 +411,7 @@ export default defineComponent({
}
function getProductsSorted(arrprod: IProduct[], sort: number) {
console.log('getProductsSorted', sort)
// console.log('getProductsSorted', sort)
if (sort === costanti.SORT_PUBDATE) {
arrprod = arrprod.sort((a: IProduct, b: IProduct) => {
@@ -546,7 +546,7 @@ export default defineComponent({
recscheda.arrProdToShow[pagina][riga] = [];
}
console.log('RANKING: ', result.myrec.indiceRanking!)
// console.log('RANKING: ', result.myrec.indiceRanking!)
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
@@ -726,12 +726,15 @@ export default defineComponent({
}
const generatePDF = async () => {
//props.optcatalogo.generazionePDFInCorso = true
await nextTick()
$q.loading.show({
message: 'Caricamento immagini e generazione PDF in corso...'
})
try {
let defaultMargin = 0.1
@@ -795,6 +798,8 @@ export default defineComponent({
await html2pdf().set(opt).from(element).save()
// props.optcatalogo.generazionePDFInCorso = false
$q.loading.hide()
$q.notify({
color: 'positive',
@@ -987,6 +992,10 @@ export default defineComponent({
};
}
function containsProducts(page: IProduct[][]) {
return page && page.length > 0 && page[0] && page[0].length > 0
}
onMounted(mounted)
@@ -1037,6 +1046,7 @@ export default defineComponent({
getHeightPagina,
getStyleRowSeparator,
generateStyleByPageDim,
containsProducts,
}
}
})