- prima bozza catalogo
This commit is contained in:
@@ -75,19 +75,25 @@ body {
|
||||
text-transform: uppercase;
|
||||
margin-top: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-author {
|
||||
font-family: 'DIN-Pro-Condensed-Regular', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-descr {
|
||||
font-family: 'DINPro-BoldItalic', sans-serif;
|
||||
font-size: calc(12 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-details {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(12 * var(--scalecatalog) * 1px);
|
||||
text-align: left !important;
|
||||
margin-left: calc(8 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +102,11 @@ body {
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-link{
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-novita {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -282,114 +282,120 @@
|
||||
<div
|
||||
v-for="(page, pageIndex) in groupedPages(recscheda)"
|
||||
:key="pageIndex"
|
||||
:class="{
|
||||
'fixed-width': getWidthPagina(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'fixed-height': getHeightPagina(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'card-page': true,
|
||||
}"
|
||||
:style="
|
||||
generateStylePageScheda(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
)
|
||||
"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.contenuto
|
||||
"
|
||||
:style="{
|
||||
'--scalecatalog':
|
||||
optcatalogo.areadistampa.scale,
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.font.line_height,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
v-if="containsProducts(page)"
|
||||
:class="{
|
||||
'fixed-width': getWidthPagina(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'fixed-height': getHeightPagina(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'card-page': true,
|
||||
}"
|
||||
:style="
|
||||
generateStylePageScheda(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
)
|
||||
"
|
||||
>
|
||||
<div
|
||||
v-html="
|
||||
v-if="
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.contenuto
|
||||
"
|
||||
style="display: flex; flex-direction: row"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- Itera sulle righe di ogni pagina -->
|
||||
<div
|
||||
v-for="(row, rowIndex) in page"
|
||||
:key="`${pageIndex}-${rowIndex}`"
|
||||
class="column"
|
||||
>
|
||||
<div
|
||||
class="card-row"
|
||||
:style="getStyleRow(recscheda)"
|
||||
:style="{
|
||||
'--scalecatalog':
|
||||
optcatalogo.areadistampa.scale,
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.font.line_height,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}"
|
||||
>
|
||||
<!-- Itera sui prodotti di ogni riga -->
|
||||
|
||||
<div class="row justify-center">
|
||||
<div
|
||||
v-for="(prod, colIndex) in row"
|
||||
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
|
||||
class="flex-item-book"
|
||||
:style="getStyleSchedaProdotto(recscheda)"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
v-if="prod && prod.active"
|
||||
:id="prod._id"
|
||||
:product="prod"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:scheda="recscheda.scheda"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="
|
||||
prod && (prod.active || show_hide)
|
||||
"
|
||||
:id="prod._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
</div>
|
||||
<!-- Prodotti singoli -->
|
||||
</div>
|
||||
|
||||
<!-- Separatore -->
|
||||
<div
|
||||
v-if="
|
||||
recscheda.scheda?.show_separatore &&
|
||||
rowIndex !== page.length - 1
|
||||
v-html="
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up
|
||||
?.contenuto
|
||||
"
|
||||
class="text-center"
|
||||
style="display: flex; flex-direction: row"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<!-- Itera sulle righe di ogni pagina -->
|
||||
<div
|
||||
v-for="(row, rowIndex) in page"
|
||||
:key="`${pageIndex}-${rowIndex}`"
|
||||
class="column"
|
||||
>
|
||||
<div
|
||||
class="card-row"
|
||||
:style="getStyleRow(recscheda)"
|
||||
>
|
||||
<q-separator
|
||||
inset
|
||||
:size="tools.adjustSize(optcatalogo, '1px')"
|
||||
></q-separator>
|
||||
<!-- Itera sui prodotti di ogni riga -->
|
||||
|
||||
<div class="row justify-center">
|
||||
<div
|
||||
v-for="(prod, colIndex) in row"
|
||||
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
|
||||
class="flex-item-book"
|
||||
:style="getStyleSchedaProdotto(recscheda)"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
v-if="prod && prod.active"
|
||||
:id="prod._id"
|
||||
:product="prod"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:scheda="recscheda.scheda"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="
|
||||
prod && (prod.active || show_hide)
|
||||
"
|
||||
:id="prod._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
</div>
|
||||
<!-- Prodotti singoli -->
|
||||
</div>
|
||||
|
||||
<!-- Separatore -->
|
||||
<div
|
||||
v-if="
|
||||
recscheda.scheda?.show_separatore &&
|
||||
rowIndex !== page.length - 1
|
||||
"
|
||||
class="text-center"
|
||||
:style="getStyleRow(recscheda)"
|
||||
>
|
||||
<q-separator
|
||||
inset
|
||||
:size="
|
||||
tools.adjustSize(optcatalogo, '1px')
|
||||
"
|
||||
></q-separator>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Card Row -->
|
||||
</div>
|
||||
<!-- Card Row -->
|
||||
<!-- Righe (row) -->
|
||||
</div>
|
||||
<!-- Righe (row) -->
|
||||
</div>
|
||||
<!-- Pagine -->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user