- il catalogo si aggiorna in base alle impostazioni del template anche per la "Stampa"
This commit is contained in:
@@ -90,6 +90,8 @@ export default defineComponent({
|
||||
const heightpdf = ref('12.31');
|
||||
const compressionepdf = ref('prepress');
|
||||
|
||||
const ismounting = ref(false)
|
||||
|
||||
const optDisp = ref([
|
||||
{ label: 'Tutti', value: costanti.DISP.TUTTI },
|
||||
{ label: 'Disponibili', value: costanti.DISP.DISPONIBILI },
|
||||
@@ -578,7 +580,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function populateDataWithlinkIdTemplate() {
|
||||
// console.log('populateDataWithlinkIdTemplate')
|
||||
console.log('populateDataWithlinkIdTemplate')
|
||||
|
||||
if (optcatalogo.value) {
|
||||
// LINK PAGINA
|
||||
@@ -589,6 +591,25 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
if (optcatalogo.value.print_linkIdTemplate) {
|
||||
const reccat2 = globalStore.sovrascriviAreadistampaFromTemplate(optcatalogo.value.print_linkIdTemplate, optcatalogo.value);
|
||||
if (reccat2) {
|
||||
const optcatalogo2 = { ...optcatalogo.value };
|
||||
// optcatalogo2.areadistampa = { ...reccat2.areadistampa};
|
||||
optcatalogo2.areadistampa.margini = reccat2.areadistampa.margini;
|
||||
optcatalogo2.areadistampa.unit = reccat2.areadistampa.unit;
|
||||
optcatalogo2.areadistampa.scalecanvas = reccat2.areadistampa.scalecanvas;
|
||||
optcatalogo2.areadistampa.scale_printable = reccat2.areadistampa.scale_printable;
|
||||
optcatalogo2.areadistampa.format = reccat2.areadistampa.format;
|
||||
optcatalogo2.areadistampa.orientation = reccat2.areadistampa.orientation;
|
||||
optcatalogo2.areadistampa.compress = reccat2.areadistampa.compress;
|
||||
|
||||
// optcatalogo.value = optcatalogo2;
|
||||
// optcatalogo.value.areadistampa.margini = { left: '50'};
|
||||
}
|
||||
// console.log('areadistampa', optcatalogo.value.areadistampa)
|
||||
}
|
||||
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda.scheda?.linkIdTemplate) {
|
||||
// ricopia da Template:
|
||||
@@ -914,6 +935,8 @@ export default defineComponent({
|
||||
|
||||
console.log('***** FINE calcArrPROD');
|
||||
|
||||
console.log('areadistampa FINITO...', optcatalogo.value.areadistampa)
|
||||
|
||||
generatinglist.value = false;
|
||||
rigeneraLibri.value = false;
|
||||
}
|
||||
@@ -1304,6 +1327,7 @@ export default defineComponent({
|
||||
async function mounted() {
|
||||
// console.log('mounted Catalogo')
|
||||
|
||||
ismounting.value = true
|
||||
generatinglist.value = true;
|
||||
|
||||
if (optcatalogo.value.showListaArgomenti) cat.value = tools.getCookie(getKeyCatAtLoad(), '');
|
||||
@@ -1364,6 +1388,8 @@ export default defineComponent({
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
|
||||
calcArrProducts();
|
||||
|
||||
ismounting.value = false
|
||||
}
|
||||
|
||||
function loaddata() {
|
||||
@@ -1863,7 +1889,7 @@ export default defineComponent({
|
||||
await nextTick();
|
||||
|
||||
$q.loading.show({
|
||||
message: 'Caricamento immagini e generazione PDF in corso...',
|
||||
message: 'Generazione PDF in corso, attendere ...',
|
||||
});
|
||||
|
||||
try {
|
||||
@@ -2080,6 +2106,7 @@ export default defineComponent({
|
||||
getCollane,
|
||||
pubblicaPDF,
|
||||
pubblicaPDFStampa,
|
||||
ismounting,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -90,11 +90,6 @@
|
||||
id="spinner"
|
||||
:showing="generatinglist"
|
||||
>
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em"
|
||||
>
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
<q-tab-panel
|
||||
@@ -227,7 +222,7 @@
|
||||
</div>
|
||||
|
||||
<CProductTable
|
||||
v-if="loadpage && lista_prodotti?.length > 0"
|
||||
v-if="!ismounting && lista_prodotti?.length > 0"
|
||||
:lista_prodotti="lista_prodotti"
|
||||
@update:lista_prodotti="updateProducts"
|
||||
:optcatalogo="optcatalogo"
|
||||
@@ -244,23 +239,18 @@
|
||||
id="spinner"
|
||||
:showing="generatinglist"
|
||||
>
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em"
|
||||
>
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div class="text-center">
|
||||
<q-spinner
|
||||
v-if="!loadpage"
|
||||
v-if="ismounting"
|
||||
color="primary"
|
||||
size="3em"
|
||||
:thickness="2"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="loadpage"
|
||||
v-if="!ismounting"
|
||||
class="panel"
|
||||
>
|
||||
<div class="container">
|
||||
@@ -643,7 +633,7 @@
|
||||
<div :style="generateStyleCatalogo(optcatalogo)">
|
||||
<div class="flex-container-book">
|
||||
<q-infinite-scroll
|
||||
v-if="!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0"
|
||||
v-if="!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0 && !ismounting"
|
||||
ref="myinfscroll"
|
||||
:initial-index="0"
|
||||
@load="onLoadScroll"
|
||||
|
||||
Reference in New Issue
Block a user