- generazione del PDF riscritto totalmente

- ora è possibile generarlo anche da backend
- FIX: corretto la qualità del PDF e la dimensione non esatta in pixel...
This commit is contained in:
Surya Paolo
2025-05-29 18:23:02 +02:00
parent 884afe4eb5
commit 67aaf719f4
32 changed files with 2881 additions and 1748 deletions

View File

@@ -1,6 +1,6 @@
{ {
"singleAttributePerLine": true, "singleAttributePerLine": true,
"printWidth": 100, "printWidth": 90,
"tabWidth": 2, "tabWidth": 2,
"useTabs": false, "useTabs": false,
"singleQuote": true, "singleQuote": true,

View File

@@ -29,7 +29,7 @@
<MyFooter></MyFooter> <MyFooter></MyFooter>
</q-layout> </q-layout>
</div> </div>
<BannerCookies urlInfo="/policy"></BannerCookies> <!--<BannerCookies urlInfo="/policy"></BannerCookies>-->
</template> </template>
<script lang="ts" src="./App.ts"> <script lang="ts" src="./App.ts">
</script> </script>

View File

@@ -1,9 +1,7 @@
<template> <template>
<div> <Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()" :idPage="idPage">
<Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()" :idPage="idPage">
</Catalogo> </Catalogo>
</div>
</template> </template>
<script lang="ts" src="./CCatalogo.ts"> <script lang="ts" src="./CCatalogo.ts">

View File

@@ -393,7 +393,7 @@ $grigioscuro: rgb(120, 120, 120);
.flex-details_and_barcode { .flex-details_and_barcode {
display: flex; /* Rende il div un container flex per allineare i contenuti */ display: flex; /* Rende il div un container flex per allineare i contenuti */
align-items: center; /* Allineamento verticale al centro */ align-items: center; /* Allineamento verticale al centro */
padding-top: calc(5 * var(--scalecatalog) * 1px); padding-top: calc(5 * var(--scalecatalogy) * 1px);
justify-content: space-between !important; justify-content: space-between !important;
flex-grow: 0; /* Opzionale: permette agli elementi di crescere uniformemente */ flex-grow: 0; /* Opzionale: permette agli elementi di crescere uniformemente */
} }

View File

@@ -137,9 +137,20 @@ export default defineComponent({
const field_updated_fromGM = ref(''); const field_updated_fromGM = ref('');
const dataextractedWeb = ref(''); const dataextractedWeb = ref('');
const widthoggetto = ref(40)
const heightoggetto = ref(40)
// Crea una copia locale reattiva di modelValue // Crea una copia locale reattiva di modelValue
const optcatalogo = ref<IOptCatalogo>({ ...props.modelValue }); const optcatalogo = ref<IOptCatalogo>({ ...props.modelValue });
const mywidthogg = computed(() => {
return widthoggetto.value * tools.getScaleX(optcatalogo.value, props.scheda)
})
const myheightogg = computed(() => {
return heightoggetto.value * tools.getScaleY(optcatalogo.value, props.scheda)
})
const editOn = computed({ const editOn = computed({
get(): boolean { get(): boolean {
return globalStore.editOn ? globalStore.editOn : false; return globalStore.editOn ? globalStore.editOn : false;
@@ -694,12 +705,6 @@ export default defineComponent({
return false; return false;
} }
function getScale() {
if (optcatalogo.value.printable)
return optcatalogo.value.areadistampa!.scale_printable;
else return optcatalogo.value.areadistampa!.scale;
}
/*async function refreshDataFromGM() { /*async function refreshDataFromGM() {
if (myproduct.value) { if (myproduct.value) {
loading.value = true loading.value = true
@@ -894,7 +899,6 @@ export default defineComponent({
getTesto_Right_attaccato, getTesto_Right_attaccato,
getTesto_Bottom, getTesto_Bottom,
getTesto_Debug, getTesto_Debug,
getScale,
updateCatalogo, updateCatalogo,
optcatalogo, optcatalogo,
visufromgm, visufromgm,
@@ -911,6 +915,10 @@ export default defineComponent({
loading, loading,
modifTrafiletto, modifTrafiletto,
getDataExtracted, getDataExtracted,
widthoggetto,
heightoggetto,
mywidthogg,
myheightogg
}; };
}, },
}); });

View File

@@ -2,14 +2,16 @@
<div <div
v-if="optcatalogo" v-if="optcatalogo"
:class="{ :class="{
' items-start q-gutter-sm': true, ' items-start': true,
}" }"
:style=" :style="
scheda.dimensioni?.pagina?.dimensioni?.size?.height scheda.dimensioni?.pagina?.dimensioni?.size?.height
? ' height: ' + ? ' height: ' +
tools.adjustSize( tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.pagina?.dimensioni?.size?.height scheda.dimensioni?.pagina?.dimensioni?.size?.height,
scheda,
false
) + ) +
'px !important; ' 'px !important; '
: '' : ''
@@ -54,8 +56,7 @@
'flex', // Classi comuni 'flex', // Classi comuni
'image-container', 'image-container',
{ 'shadow-2': options.in_3d && !optcatalogo.pdf }, // Classe condizionale { 'shadow-2': options.in_3d && !optcatalogo.pdf }, // Classe condizionale
scheda.testo_right_attaccato.font?.posiz_text === scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
costanti.POSIZ_TESTO.IN_BASSO
? '' ? ''
: 'flex flex-row', // Layout flessibile : 'flex flex-row', // Layout flessibile
]" ]"
@@ -63,16 +64,22 @@
gap: gap:
tools.adjustSize( tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size?.gap scheda.dimensioni?.scheda_prodotto?.size?.gap,
scheda,
true
) ?? '0.1rem', ) ?? '0.1rem',
width: width:
tools.adjustSize( tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size?.width scheda.dimensioni?.scheda_prodotto?.size?.width,
scheda,
true
) ?? '100%', ) ?? '100%',
height: tools.adjustSize( height: tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size?.height scheda.dimensioni?.scheda_prodotto?.size?.height,
scheda,
false
), ),
}" }"
> >
@@ -92,9 +99,7 @@
: myproduct.productInfo.image_link : myproduct.productInfo.image_link
" "
:alt="myproduct.productInfo.name" :alt="myproduct.productInfo.name"
:fit=" :fit="scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'"
scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'
"
:class="{ :class="{
'book-image-fixed': complete, 'book-image-fixed': complete,
'cursor-pointer': !complete, 'cursor-pointer': !complete,
@@ -104,24 +109,29 @@
:style="{ :style="{
zIndex: 2, zIndex: 2,
width: width:
scheda.testo_right.font?.posiz_text === scheda.testo_right.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
costanti.POSIZ_TESTO.IN_BASSO
? (scheda.testo_right.font?.perc_text ?? '50%') ? (scheda.testo_right.font?.perc_text ?? '50%')
: '45%', : '45%',
...(tools.adjustSize( ...(tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.immagine_prodotto?.size?.width scheda.dimensioni?.immagine_prodotto?.size?.width,
scheda,
true
) && { ) && {
width: width:
tools.adjustSize( tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.immagine_prodotto.size?.width scheda.dimensioni?.immagine_prodotto.size?.width,
scheda,
true
) + ' !important', ) + ' !important',
}), }),
height: scheda.dimensioni?.immagine_prodotto?.size?.height height: scheda.dimensioni?.immagine_prodotto?.size?.height
? tools.adjustSize( ? tools.adjustSize(
optcatalogo, optcatalogo,
scheda.dimensioni?.immagine_prodotto?.size?.height scheda.dimensioni?.immagine_prodotto?.size?.height,
scheda,
false
) )
: undefined, : undefined,
display: 'block', display: 'block',
@@ -129,7 +139,14 @@
@click="click_opendetail()" @click="click_opendetail()"
/> />
</a> </a>
<div class="q-ma-sm no-print"> <div
v-if="
(tools.isManager() || tools.isEditor()) &&
!optcatalogo.generazionePDFInCorso &&
(editOn || options.show_edit_book)
"
class="no-print"
>
<div <div
class="row absolute-top-left semi-transparent" class="row absolute-top-left semi-transparent"
style="z-index: 10" style="z-index: 10"
@@ -212,8 +229,7 @@
</q-item>--> </q-item>-->
<q-item <q-item
v-if=" v-if="
!optcatalogo.generazionePDFInCorso && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
(editOn || options.show_edit_book)
" "
clickable clickable
v-close-popup v-close-popup
@@ -316,8 +332,7 @@
</q-item> </q-item>
<q-item <q-item
v-if=" v-if="
!optcatalogo.generazionePDFInCorso && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
(editOn || options.show_edit_book)
" "
clickable clickable
v-close-popup v-close-popup
@@ -331,10 +346,7 @@
/> />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label <q-item-label>Visualizza dati Estrapolati (dal WEB Esterno)</q-item-label>
>Visualizza dati Estrapolati (dal WEB
Esterno)</q-item-label
>
</q-item-section> </q-item-section>
</q-item> </q-item>
@@ -380,10 +392,7 @@
/> />
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-item-label <q-item-label>Visualizza su GM (con le Quantità in Magazzino)</q-item-label>
>Visualizza su GM (con le Quantità in
Magazzino)</q-item-label
>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
@@ -401,19 +410,14 @@
:idPage="idPage" :idPage="idPage"
> >
<div <div
v-if=" v-if="scheda.testo_right_attaccato.font?.posiz_text !== costanti.POSIZ_TESTO.IN_BASSO"
scheda.testo_right_attaccato.font?.posiz_text !==
costanti.POSIZ_TESTO.IN_BASSO
"
:style="{ :style="{
alignSelf: alignSelf:
scheda.testo_right_attaccato.font?.posiz_text === scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
costanti.POSIZ_TESTO.IN_BASSO
? '' ? ''
: 'center', : 'center',
marginTop: marginTop:
scheda.testo_right_attaccato.font?.posiz_text === scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
costanti.POSIZ_TESTO.IN_BASSO
? 'auto' ? 'auto'
: '0', : '0',
}" }"
@@ -432,54 +436,37 @@
:value="myproduct.productInfo.code" :value="myproduct.productInfo.code"
:format="scheda.barcode.format" :format="scheda.barcode.format"
:fontsizeprop="scheda.barcode.font?.size" :fontsizeprop="scheda.barcode.font?.size"
:gap=" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap, scheda, true)"
tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
"
:width=" :width="
parseInt( parseInt(
tools.adjustSize( tools.adjustSize(optcatalogo, scheda.barcode.size?.width, scheda, true)
optcatalogo,
scheda.barcode.size?.width
)
) )
" "
:widthlines=" :widthlines="
tools.adjustSize(optcatalogo, scheda.barcode.widthlines) tools.adjustSize(optcatalogo, scheda.barcode.widthlines, scheda, true)
" "
:height=" :height="
tools.adjustSize( tools.adjustSize(optcatalogo, scheda.barcode.size?.height, scheda, false)
optcatalogo,
scheda.barcode.size?.height
)
" "
:show_at_right="scheda.barcode?.show_at_right" :show_at_right="scheda.barcode?.show_at_right"
> >
</CBarCode> </CBarCode>
</div> </div>
<div <div v-if="scheda.etichette?.bestseller?.show && isProductBestseller()">
v-if="
scheda.etichette?.bestseller?.show &&
isProductBestseller()
"
>
<q-img <q-img
src="/images/bestseller.png" src="/images/bestseller.png"
alt="Bestseller" alt="Bestseller"
:width="40 * tools.getScale(optcatalogo) + 'px'" :width="mywidthogg + 'px'"
:height="40 * tools.getScale(optcatalogo) + 'px'" :height="myheightogg + 'px'"
fit="contain" fit="contain"
></q-img> ></q-img>
</div> </div>
<div <div v-else-if="scheda.etichette?.novita?.show && isProductNovita()">
v-else-if="
scheda.etichette?.novita?.show && isProductNovita()
"
>
<q-img <q-img
src="/images/novita.png" src="/images/novita.png"
alt="Novita" alt="Novita"
:width="40 * tools.getScale(optcatalogo) + 'px'" :width="mywidthogg + 'px'"
:height="40 * tools.getScale(optcatalogo) + 'px'" :height="myheightogg + 'px'"
fit="contain" fit="contain"
></q-img> ></q-img>
</div> </div>
@@ -488,10 +475,7 @@
</div> </div>
</CText> </CText>
<div <div
v-if=" v-if="scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO"
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
"
class="flexible-width" class="flexible-width"
:style="{ :style="{
marginTop: 'auto', marginTop: 'auto',
@@ -511,50 +495,37 @@
:value="myproduct.productInfo.code" :value="myproduct.productInfo.code"
:format="scheda.barcode.format" :format="scheda.barcode.format"
:fontsizeprop="scheda.barcode.font?.size" :fontsizeprop="scheda.barcode.font?.size"
:gap=" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap, scheda, true)"
tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
"
:width=" :width="
parseInt( parseInt(
tools.adjustSize( tools.adjustSize(optcatalogo, scheda.barcode.size?.width, scheda, true)
optcatalogo,
scheda.barcode.size?.width
)
) )
" "
:widthlines=" :widthlines="
tools.adjustSize(optcatalogo, scheda.barcode.widthlines) tools.adjustSize(optcatalogo, scheda.barcode.widthlines, scheda, true)
" "
:height=" :height="
tools.adjustSize(optcatalogo, scheda.barcode.size?.height) tools.adjustSize(optcatalogo, scheda.barcode.size?.height, scheda, false)
" "
:show_at_right="scheda.barcode.show_at_right" :show_at_right="scheda.barcode.show_at_right"
> >
</CBarCode> </CBarCode>
</div> </div>
<div <div v-if="scheda.etichette?.bestseller?.show && isProductBestseller()">
v-if="
scheda.etichette?.bestseller?.show && isProductBestseller()
"
>
<q-img <q-img
src="/images/bestseller.png" src="/images/bestseller.png"
alt="Bestseller" alt="Bestseller"
:width="40 * tools.getScale(optcatalogo) + 'px'" :width="mywidthogg + 'px'"
:height="40 * tools.getScale(optcatalogo) + 'px'" :height="myheightogg + 'px'"
fit="contain" fit="contain"
></q-img> ></q-img>
</div> </div>
<div <div v-else-if="scheda.etichette?.novita?.show && isProductNovita()">
v-else-if="
scheda.etichette?.novita?.show && isProductNovita()
"
>
<q-img <q-img
src="/images/novita.png" src="/images/novita.png"
alt="Novita" alt="Novita"
:width="40 * tools.getScale(optcatalogo) + 'px'" :width="mywidthogg + 'px'"
:height="40 * tools.getScale(optcatalogo) + 'px'" :height="myheightogg + 'px'"
fit="contain" fit="contain"
></q-img> ></q-img>
</div> </div>
@@ -570,7 +541,8 @@
> >
<div <div
:style="{ :style="{
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
'line-height': scheda.testo_bottom.font?.line_height, 'line-height': scheda.testo_bottom.font?.line_height,
}" }"
v-html="getTesto_Debug" v-html="getTesto_Debug"
@@ -651,14 +623,10 @@
</div> </div>
</td> </td>
<td class="text-center"> <td class="text-center">
<strong>{{ <strong>{{ tools.getNomeUtenteEUsernameByRecUser(ordcart.user) }}</strong>
tools.getNomeUtenteEUsernameByRecUser(ordcart.user)
}}</strong>
</td> </td>
<td class="text-center"> <td class="text-center">
<strong>{{ <strong>{{ shared_consts.getStatusStr(ordcart.status) }}</strong>
shared_consts.getStatusStr(ordcart.status)
}}</strong>
</td> </td>
<td class="text-center"> <td class="text-center">
<div <div
@@ -667,8 +635,7 @@
> >
<span <span
v-if=" v-if="
singleord.order.idProduct === myproduct._id && singleord.order.idProduct === myproduct._id && singleord.order.quantity > 0
singleord.order.quantity > 0
" "
> >
{{ singleord.order.quantity }}</span {{ singleord.order.quantity }}</span
@@ -703,12 +670,7 @@
</q-dialog> </q-dialog>
<q-dialog <q-dialog
v-if=" v-if="true && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda"
true &&
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
"
v-model="apriSchedaPDF" v-model="apriSchedaPDF"
maximized maximized
> >
@@ -745,12 +707,7 @@
</q-dialog> </q-dialog>
<q-dialog <q-dialog
v-if=" v-if="false && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda"
false &&
myproduct &&
myproduct.productInfo &&
myproduct.productInfo.link_scheda
"
v-model="apriSchedaPDF" v-model="apriSchedaPDF"
fullscreen fullscreen
> >

View File

@@ -1,5 +1,5 @@
<template> <template>
<div :class="class"> <div v-if="internalModel" :class="class">
<q-dialog <q-dialog
v-model="internalModel" v-model="internalModel"
maximized maximized

View File

@@ -14,6 +14,7 @@ import type {
} from '@src/model'; } from '@src/model';
import { IImgGallery, ILabelValue, IMyPage, IOperators } from '@src/model'; import { IImgGallery, ILabelValue, IMyPage, IOperators } from '@src/model';
import { useGlobalStore } from '@store/globalStore'; import { useGlobalStore } from '@store/globalStore';
import { useCatalogStore } from '@store/catalogStore';
import { CImgTitle } from '@src/components/CImgTitle'; import { CImgTitle } from '@src/components/CImgTitle';
import { CImgPoster } from '@src/components/CImgPoster'; import { CImgPoster } from '@src/components/CImgPoster';
@@ -28,6 +29,7 @@ import { CMyPageIntro } from '@src/components/CMyPageIntro';
import { CEventsCalendar } from '@src/components/CEventsCalendar'; import { CEventsCalendar } from '@src/components/CEventsCalendar';
import { CMyEditor } from '@src/components/CMyEditor'; import { CMyEditor } from '@src/components/CMyEditor';
import { CMySlider } from '@src/components/CMySlider'; import { CMySlider } from '@src/components/CMySlider';
import { CMySlideNumber } from '@src/components/CMySlideNumber';
import { CMyFieldRec } from '@src/components/CMyFieldRec'; import { CMyFieldRec } from '@src/components/CMyFieldRec';
import { CSelectImage } from '@src/components/CSelectImage'; import { CSelectImage } from '@src/components/CSelectImage';
import { CSelectAnimation } from '@src/components/CSelectAnimation'; import { CSelectAnimation } from '@src/components/CSelectAnimation';
@@ -69,7 +71,7 @@ export default defineComponent({
CMySize, CMySize,
CBorders, CBorders,
CMyDimensioni, CMyDimensioni,
CMyText, CMyText, CMySlideNumber,
}, },
emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem', 'dupPage', 'expPage', 'impPage'], emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem', 'dupPage', 'expPage', 'impPage'],
props: { props: {
@@ -100,6 +102,7 @@ export default defineComponent({
}, },
setup(props, { emit }) { setup(props, { emit }) {
const globalStore = useGlobalStore(); const globalStore = useGlobalStore();
const catalogStore = useCatalogStore();
const { setmeta, getsrcbyimg } = MixinMetaTags(); const { setmeta, getsrcbyimg } = MixinMetaTags();
const { setValDb, getValDb } = MixinBase(); const { setValDb, getValDb } = MixinBase();
@@ -347,7 +350,6 @@ export default defineComponent({
myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28' }; myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28' };
myel.value.catalogo.print_isTemplate = false; myel.value.catalogo.print_isTemplate = false;
myel.value.catalogo.print_linkIdTemplate = ''; myel.value.catalogo.print_linkIdTemplate = '';
myel.value.catalogo.print_linkIdTemplatePerStampa = '';
} }
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa); myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa);
@@ -357,7 +359,8 @@ export default defineComponent({
myel.value.catalogo.dimensioni_def = { myel.value.catalogo.dimensioni_def = {
isTemplate: false, isTemplate: false,
linkIdTemplate: '', linkIdTemplate: '',
linkIdTemplatePerStampa: '', scalexscheda: 1,
scaleyscheda: 1,
name: '', name: '',
pagina: {}, pagina: {},
}; };
@@ -810,6 +813,7 @@ export default defineComponent({
exportPage, exportPage,
importPage, importPage,
globalStore, globalStore,
catalogStore,
}; };
}, },
}); });

View File

@@ -1606,6 +1606,28 @@
@update:model-value="modifElem" @update:model-value="modifElem"
> >
</q-toggle> </q-toggle>
<q-toggle
v-model="myel.catalogo.showOnlyCatalogoPDF"
color="positive"
icon="fas fa-file-pdf"
label="Pagina solo Catalogo (PDF)"
@update:model-value="modifElem"
>
</q-toggle>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
rounded
outlined
v-model="myel.catalogo.idCatalogSel"
:options="catalogStore.getCatalogsList()"
@update:model-value="modifElem"
label="Scegli il Catalogo"
style="width: 300px"
emit-value
map-options
>
</q-select>
<q-toggle <q-toggle
v-model="myel.catalogo.showListaCollane" v-model="myel.catalogo.showListaCollane"
color="positive" color="positive"
@@ -1818,20 +1840,6 @@
map-options map-options
> >
</q-select> </q-select>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
v-if="enableEdit"
rounded
outlined
v-model="myel.catalogo.dimensioni_def.linkIdTemplatePerStampa"
:options="Products.getOptCatalogoTemplate()"
@update:model-value="modifElem"
label="Catalogo collegato per STAMPA:"
style="width: 250px"
emit-value
map-options
>
</q-select>
<div <div
v-if="myel.catalogo.dimensioni_def.pagina" v-if="myel.catalogo.dimensioni_def.pagina"
@@ -1979,20 +1987,21 @@
map-options map-options
> >
</q-select> </q-select>
<q-select <CMySlideNumber
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" v-model="recscheda.scheda.scalex"
v-if="enableEdit" label="Scale X:"
rounded :min="0.5"
outlined :max="1.5"
v-model="recscheda.scheda.linkIdTemplatePerStampa"
:options="globalStore.getSchedeOpt()"
@update:model-value="modifElem" @update:model-value="modifElem"
label="Scheda collegata STAMPA:" />
style="width: 350px" <CMySlideNumber
emit-value v-model="recscheda.scheda.scaley"
map-options label="Scale Y:"
> :min="0.5"
</q-select> :max="1.5"
@update:model-value="modifElem"
/>
<br /> <br />
<div class="row"> <div class="row">
<q-select <q-select
@@ -2477,20 +2486,6 @@
map-options map-options
> >
</q-select> </q-select>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
v-if="enableEdit"
rounded
outlined
v-model="myel.catalogo.print_linkIdTemplatePerStampa"
:options="Products.getOptCatalogoPrintTemplate()"
@update:model-value="modifElem"
label="Catalogo Stampa collegato per STAMPA:"
style="width: 350px"
emit-value
map-options
>
</q-select>
<div <div
:class="{ :class="{
@@ -2536,30 +2531,53 @@
</div> </div>
<q-select <q-select
rounded rounded
style="width: 200px" style="width: 350px"
outlined outlined
v-model="myel.catalogo.areadistampa.scale" v-model="myel.catalogo.areadistampa.format_printable"
:options="tools.SelectListScalePDF" :options="tools.SelectListFormatPDF"
@update:model-value="modifElem" @update:model-value="modifElem"
dense dense
label="Scale:" label="Formato per Stampa:"
emit-value emit-value
map-options map-options
> >
</q-select> </q-select>
<q-select <div v-if="myel.catalogo.areadistampa.format_printable?.length > 1">
rounded Ratio:
style="width: 200px" {{
outlined myel.catalogo.areadistampa.format_printable[0] /
v-model="myel.catalogo.areadistampa.scale_printable" myel.catalogo.areadistampa.format_printable[1]
:options="tools.SelectListScalePDF" }}
</div>
<CMySlideNumber
v-model="myel.catalogo.areadistampa.scalex"
label="Scale X:"
:min="0.5"
:max="1.5"
@update:model-value="modifElem" @update:model-value="modifElem"
dense />
label="Scale per Stampa:" <CMySlideNumber
emit-value v-model="myel.catalogo.areadistampa.scaley"
map-options label="Scale Y:"
> :min="0.5"
</q-select> :max="1.5"
@update:model-value="modifElem"
/>
<CMySlideNumber
v-model="myel.catalogo.areadistampa.scale_printablex"
label="Scale X Stampa:"
:min="0.5"
:max="1.5"
@update:model-value="modifElem"
/>
<CMySlideNumber
v-model="myel.catalogo.areadistampa.scale_printabley"
label="Scale Y Stampa:"
:min="0.5"
:max="1.5"
@update:model-value="modifElem"
/>
<q-select <q-select
rounded rounded
style="width: 200px" style="width: 200px"

View File

@@ -1,31 +1,34 @@
import { import { computed, defineComponent, onMounted, ref, toRef, watch } from 'vue';
computed,
defineComponent, onMounted, ref, toRef, watch,
} from 'vue'
import type { IMyElem, IMyPage } from '@src/model' import type { IMyElem, IMyPage } from '@src/model';
import { useGlobalStore } from '@store/globalStore' import { useGlobalStore } from '@store/globalStore';
import { LandingFooter } from '@src/components/LandingFooter' import { LandingFooter } from '@src/components/LandingFooter';
import { CMyElem } from '@src/components/CMyElem' import { CMyElem } from '@src/components/CMyElem';
import { CTitleBanner } from '@src/components/CTitleBanner' import { CTitleBanner } from '@src/components/CTitleBanner';
import { CMyEditElem } from '@src/components/CMyEditElem' import { CMyEditElem } from '@src/components/CMyEditElem';
import { CMyPageElem2 } from '@src/components/CMyPageElem2' import { CMyPageElem2 } from '@src/components/CMyPageElem2';
import { CExportImportPage } from '@src/components/CExportImportPage' import { CExportImportPage } from '@src/components/CExportImportPage';
import { CImgTitle } from '../CImgTitle/index' import { CImgTitle } from '../CImgTitle/index';
import { CTitle } from '../CTitle/index' import { CTitle } from '../CTitle/index';
import { tools } from '@tools' import { tools } from '@tools';
import { useQuasar } from 'quasar' import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n';
import { shared_consts } from '@src/common/shared_vuejs' import { shared_consts } from '@src/common/shared_vuejs';
import objectId from '@src/js/objectId' import objectId from '@src/js/objectId';
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router';
export default defineComponent({ export default defineComponent({
name: 'CMyPageElem', name: 'CMyPageElem',
components: { components: {
LandingFooter, CImgTitle, CTitle, CMyElem, LandingFooter,
CMyEditElem, CMyPageElem2, CTitleBanner, CExportImportPage, CImgTitle,
CTitle,
CMyElem,
CMyEditElem,
CMyPageElem2,
CTitleBanner,
CExportImportPage,
}, },
props: { props: {
title: String, title: String,
@@ -36,7 +39,7 @@ export default defineComponent({
idPage: { idPage: {
type: String, type: String,
required: false, required: false,
default: '' default: '',
}, },
img: { img: {
type: String, type: String,
@@ -66,64 +69,73 @@ export default defineComponent({
}, },
setup(props) { setup(props) {
const rec = ref<IMyPage | null>(null) const rec = ref<IMyPage | null>(null);
const mypathin = toRef(props, 'mypath') const mypathin = toRef(props, 'mypath');
const myidPage = toRef(props, 'idPage') const myidPage = toRef(props, 'idPage');
const $q = useQuasar() const $q = useQuasar();
const { t } = useI18n() const { t } = useI18n();
const globalStore = useGlobalStore() const globalStore = useGlobalStore();
const $router = useRouter() const $router = useRouter();
const mywidthEditor = ref(400) const mywidthEditor = ref(400);
const showexportPage = ref(false) const showexportPage = ref(false);
const showimportPage = ref(false) const showimportPage = ref(false);
const editOn = computed({ const editOn = computed({
get(): boolean { get(): boolean {
return !!globalStore.editOn ? globalStore.editOn : false return !!globalStore.editOn ? globalStore.editOn : false;
}, },
set(value: boolean) { set(value: boolean) {
return tools.updateEditOn(value) return tools.updateEditOn(value);
} },
}) });
const visuEditor = ref(false) const visuEditor = ref(false);
const addOn = ref(false) const addOn = ref(false);
const myelemVoid = ref({ _id: objectId(), active: true, type: shared_consts.ELEMTYPE.TEXT, container: '...', path: mypathin.value } as IMyElem) const myelemVoid = ref({
_id: objectId(),
active: true,
type: shared_consts.ELEMTYPE.TEXT,
container: '...',
path: mypathin.value,
} as IMyElem);
const selElem = ref(<IMyElem | null>globalStore.selElem);
const site = ref(globalStore.site);
const selElem = ref(<IMyElem | null>globalStore.selElem) const onloading = ref(false);
const site = ref(globalStore.site)
const onloading = ref(false)
const myelems = computed(() => { const myelems = computed(() => {
if (myidPage.value) if (myidPage.value) return globalStore.getMyElemsByIdPage(myidPage.value);
return globalStore.getMyElemsByIdPage(myidPage.value) else if (mypathin.value) return globalStore.getMyElems(mypathin.value);
else if (mypathin.value) else return null;
return globalStore.getMyElems(mypathin.value) });
else
return null
})
async function load() { async function load() {
console.log('load', mypathin.value, 'idapp', tools.getEnv('VITE_APP_ID')) console.log('load', mypathin.value, 'idapp', tools.getEnv('VITE_APP_ID'));
if (mypathin.value !== '') { if (mypathin.value !== '') {
onloading.value = true onloading.value = true;
await globalStore.loadPage('/' + mypathin.value, 'cmypageelem') await globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then((ris) => {
.then(ris => { rec.value = ris;
rec.value = ris if (ris && ris.hideHeader) {
// console.log('LoadPage', ris) globalStore.setshowHeader(false);
}) }
onloading.value = false
// console.log('LoadPage', ris)
});
onloading.value = false;
} }
if (mypathin.value === 'home_logout' && globalStore.site.name === 'local' && !rec.value) { if (
$router.replace('/install_site') mypathin.value === 'home_logout' &&
globalStore.site.name === 'local' &&
!rec.value
) {
$router.replace('/install_site');
} }
if (tools.isManager()) { if (tools.isManager()) {
@@ -131,22 +143,26 @@ export default defineComponent({
} }
} }
watch(() => props.mypath, (to: string, from: string) => { watch(
// console.log('... load', mypathin.value, props.mypath) () => props.mypath,
selElem.value = {} (to: string, from: string) => {
load() // console.log('... load', mypathin.value, props.mypath)
}) selElem.value = {};
load();
}
);
watch( watch(
() => editOn.value, () => editOn.value,
() => { () => {
if (!editOn.value) { if (!editOn.value) {
selElem.value = {} selElem.value = {};
} }
}) }
);
async function mounted() { async function mounted() {
await load() await load();
} }
function saveElem(myelem: IMyElem) { function saveElem(myelem: IMyElem) {
@@ -154,39 +170,38 @@ export default defineComponent({
} }
function changeVisuDrawer(path: string, edit: boolean) { function changeVisuDrawer(path: string, edit: boolean) {
globalStore.changeVisuDrawer(path, edit) globalStore.changeVisuDrawer(path, edit);
} }
function toggleSize() { function toggleSize() {
mywidthEditor.value = mywidthEditor.value === 400 ? 1050 : 400 mywidthEditor.value = mywidthEditor.value === 400 ? 1050 : 400;
} }
function deleteElem() { function deleteElem() {
selElem.value = {} selElem.value = {};
visuEditor.value = false visuEditor.value = false;
} }
function selElemClick(myelem: IMyElem) { function selElemClick(myelem: IMyElem) {
console.log('mypageelem selElemClick', myelem) console.log('mypageelem selElemClick', myelem);
try { try {
selElem.value = {} selElem.value = {};
selElem.value = myelem selElem.value = myelem;
visuEditor.value = !!myelem visuEditor.value = !!myelem;
} catch (error) { } catch (error) {
console.log(error) console.log(error);
} }
} }
async function duplicatePage() { async function duplicatePage() {
await globalStore.duplicatePage(mypathin.value, $q, t) await globalStore.duplicatePage(mypathin.value, $q, t);
} }
onMounted(mounted);
onMounted(mounted)
return { return {
rec, myelems, rec,
myelems,
mypathin, mypathin,
editOn, editOn,
visuEditor, visuEditor,
@@ -205,7 +220,6 @@ export default defineComponent({
duplicatePage, duplicatePage,
showexportPage, showexportPage,
showimportPage, showimportPage,
} };
}, },
});
})

View File

@@ -1,8 +1,15 @@
<template> <template>
<div> <div>
<div v-if="mypathin && !!rec"> <div v-if="mypathin && !!rec">
<q-inner-loading id="spinner" :showing="onloading"> <q-inner-loading
<q-spinner-tail color="primary" size="4em"> </q-spinner-tail> id="spinner"
:showing="onloading"
>
<q-spinner-tail
color="primary"
size="4em"
>
</q-spinner-tail>
</q-inner-loading> </q-inner-loading>
<div v-if="!onloading"> <div v-if="!onloading">
@@ -27,7 +34,10 @@
elevated elevated
style="transition: 'width 0.3s ease'" style="transition: 'width 0.3s ease'"
> >
<q-bar dense class="q-ma-xs bg-primary text-white"> <q-bar
dense
class="q-ma-xs bg-primary text-white"
>
<q-toolbar-title> Editor </q-toolbar-title> <q-toolbar-title> Editor </q-toolbar-title>
<q-btn <q-btn
flat flat
@@ -57,54 +67,91 @@
</CMyEditElem> </CMyEditElem>
</q-drawer> </q-drawer>
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px"> <div
<div v-if="!!rec.img1" class="text-center"> :class="{ 'q-gutter-xs': !rec.hideHeader }"
<q-img :src="`` + rec.img1" class="img"></q-img> :style="[{'margin-left': rec.hideHeader ? 0 : 1 + 'px', 'margin-right': rec.hideHeader ? 0 : 1 + 'px' }]"
>
<div
v-if="!!rec.img1"
class="text-center"
>
<q-img
:src="`` + rec.img1"
class="img"
></q-img>
</div> </div>
<div v-if="!!rec.content" v-html="rec.content"></div> <div
<q-video v-if="!!rec.video1" :src="rec.video1" :ratio="rec.ratio1"> v-if="!!rec.content"
v-html="rec.content"
></div>
<q-video
v-if="!!rec.video1"
:src="rec.video1"
:ratio="rec.ratio1"
>
</q-video> </q-video>
<div v-if="!!rec.img2" class="text-center"> <div
<q-img :src="`` + rec.img2" class="img"></q-img> v-if="!!rec.img2"
class="text-center"
>
<q-img
:src="`` + rec.img2"
class="img"
></q-img>
</div> </div>
<div v-if="!!rec.content2" v-html="rec.content2"></div> <div
v-if="!!rec.content2"
v-html="rec.content2"
></div>
<q-video <q-video
v-if="!!rec.video2" v-if="!!rec.video2"
:src="rec.video2" :src="rec.video2"
:ratio="rec.ratio2" :ratio="rec.ratio2"
></q-video> ></q-video>
<div v-if="!!rec.img3" class="text-center"> <div
<q-img :src="`` + rec.img2" class="img"></q-img> v-if="!!rec.img3"
class="text-center"
>
<q-img
:src="`` + rec.img2"
class="img"
></q-img>
</div> </div>
<div v-if="!!rec.content3" v-html="rec.content3"></div> <div
v-if="!!rec.content3"
v-html="rec.content3"
></div>
<q-video <q-video
v-if="!!rec.video3" v-if="!!rec.video3"
:src="rec.video3" :src="rec.video3"
:ratio="rec.ratio3" :ratio="rec.ratio3"
></q-video> ></q-video>
<div v-if="!!rec.content4" v-html="rec.content4"></div> <div
v-if="!!rec.content4"
v-html="rec.content4"
></div>
<div v-for="myelem in myelems" :key="myelem._id"> <div
v-for="myelem in myelems"
:key="myelem._id"
>
<div> <div>
<transition :duration="1000" appear> <transition
:duration="1000"
appear
>
<CTitleBanner <CTitleBanner
v-if=" v-if="(myelem.active || editOn) && !!rec.path && myelem.titleBanner"
(myelem.active || editOn) &&
!!rec.path &&
myelem.titleBanner
"
:class="`q-pa-xs `" :class="`q-pa-xs `"
:title="myelem.titleBanner" :title="myelem.titleBanner"
bgcolor="bg-primary" bgcolor="bg-primary"
:clcolor="myelem.color ? `` : `text-white`" :clcolor="myelem.color ? `` : `text-white`"
:mystyle=" :mystyle="myelem.color ? `color: ${myelem.color} !important;` : ``"
myelem.color ? `color: ${myelem.color} !important;` : ``
"
:myclass="myelem.classBanner" :myclass="myelem.classBanner"
:canopen="true" :canopen="true"
> >
@@ -164,7 +211,12 @@
:styleadd="styleadd" :styleadd="styleadd"
></CTitle> ></CTitle>
<div v-if="!imgbackground"> <div v-if="!imgbackground">
<CImgTitle v-if="img" :src="img" :title="title"> </CImgTitle> <CImgTitle
v-if="img"
:src="img"
:title="title"
>
</CImgTitle>
</div> </div>
<slot></slot> <slot></slot>
<div v-if="!nofooter"></div> <div v-if="!nofooter"></div>
@@ -175,7 +227,13 @@
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-toolbar class="bg-primary text-white"> <q-toolbar class="bg-primary text-white">
<q-toolbar-title> Esporta Pagina </q-toolbar-title> <q-toolbar-title> Esporta Pagina </q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn> <q-btn
flat
round
color="white"
icon="close"
v-close-popup
></q-btn>
</q-toolbar> </q-toolbar>
<q-card-section class="q-pa-xs inset-shadow"> <q-card-section class="q-pa-xs inset-shadow">
<br /> <br />
@@ -193,7 +251,13 @@
<q-card class="dialog_card"> <q-card class="dialog_card">
<q-toolbar class="bg-primary text-white"> <q-toolbar class="bg-primary text-white">
<q-toolbar-title> Esporta Pagina </q-toolbar-title> <q-toolbar-title> Esporta Pagina </q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn> <q-btn
flat
round
color="white"
icon="close"
v-close-popup
></q-btn>
</q-toolbar> </q-toolbar>
<q-card-section class="q-pa-xs inset-shadow"> <q-card-section class="q-pa-xs inset-shadow">
<br /> <br />
@@ -209,8 +273,7 @@
</div> </div>
</template> </template>
<script lang="ts" src="./CMyPageElem.ts"> <script lang="ts" src="./CMyPageElem.ts"></script>
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./CMyPageElem.scss"; @import './CMyPageElem.scss';
</style> </style>

View File

@@ -0,0 +1,76 @@
import type { PropType } from 'vue';
import { defineComponent, ref, computed, toRef, reactive, watch, onMounted } from 'vue';
import type { ISize } from 'model';
import { IOperators } from 'model';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { tools } from '@tools';
import { CMySlider } from '@src/components/CMySlider';
import { shared_consts } from '@src/common/shared_vuejs';
export default defineComponent({
name: 'CMySlideNumber',
emits: ['update:modelValue'],
components: { CMySlider },
props: {
modelValue: {
type: Number,
required: true,
default: 0,
},
label: {
type: String,
required: true,
},
min: {
type: Number,
required: false,
default: 0,
},
max: {
type: Number,
required: false,
default: 100,
},
disable: {
type: Boolean,
required: false,
default: false,
},
addstr: {
type: Boolean,
required: false,
default: true,
},
},
setup(props, { emit }) {
const $q = useQuasar();
const { t } = useI18n();
const internalModel = reactive({ value: props.modelValue ?? 0 });
function modifValue(value: number) {
emit('update:modelValue', value);
}
// Sincronizzare i cambiamenti esterni con internalModel quando props cambiano
watch(
() => props.modelValue,
(newModel: number) => {
internalModel.value = newModel;
},
{ immediate: true }
);
return {
t,
shared_consts,
modifValue,
internalModel,
tools,
};
},
});

View File

@@ -0,0 +1,32 @@
<template>
<div style="width: 380px">
<q-banner
rounded
dense
class="bg-blue-1 text-red"
color="primary q-title"
style="text-align: center"
>
{{ label }}
</q-banner>
<div class="column">
<CMySlider
v-model="internalModel.value"
:label="label"
:min="min"
:max="max"
color="green"
@update:model-value="modifValue"
></CMySlider>
</div>
</div>
</template>
<script lang="ts" src="./CMySlideNumber.ts">
</script>
<style lang="scss" scoped>
@import './CMySlideNumber.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CMySlideNumber} from './CMySlideNumber.vue'

View File

@@ -9,7 +9,8 @@
width: rectext.font?.perc_text ?? '50%', width: rectext.font?.perc_text ?? '50%',
...( rectext.size && rectext.size.height ? { height: tools.adjustSize(optcatalogo, rectext.size.height) } : {}), ...( rectext.size && rectext.size.height ? { height: tools.adjustSize(optcatalogo, rectext.size.height) } : {}),
marginTop: '0', marginTop: '0',
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
'line-height': rectext.font?.line_height, 'line-height': rectext.font?.line_height,
}" }"
> >
@@ -25,11 +26,12 @@
:class="{ 'flex-details_and_barcode' : show_at_right }" :class="{ 'flex-details_and_barcode' : show_at_right }"
:style="{ :style="{
width: rectext.font?.perc_text ?? '50%', width: rectext.font?.perc_text ?? '50%',
...( rectext.size && rectext.size.height ? { height: tools.adjustSize(optcatalogo, rectext.size.height) } : {}), ...( rectext.size && rectext.size.height ? { height: tools.adjustSize(optcatalogo, rectext.size.height, scheda, false) } : {}),
marginTop: '0rem', marginTop: '0rem',
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
'line-height': rectext.font?.line_height, 'line-height': rectext.font?.line_height,
'gap': show_at_right && scheda.barcode.size?.gap ? tools.adjustSize(optcatalogo, scheda.barcode.size?.gap) : '' 'gap': show_at_right && scheda.barcode.size?.gap ? tools.adjustSize(optcatalogo, scheda.barcode.size?.gap, scheda, false) : ''
}" }"
> >
<div v-html="getTesto"></div> <div v-html="getTesto"></div>

View File

@@ -581,6 +581,7 @@ export default defineComponent({
tools.setCookie('menu3oriz', globalStore.leftDrawerOpen ? '1' : '0'); tools.setCookie('menu3oriz', globalStore.leftDrawerOpen ? '1' : '0');
} }
onBeforeMount(BeforeMount); onBeforeMount(BeforeMount);
onMounted(mounted); onMounted(mounted);

View File

@@ -1,5 +1,5 @@
<template> <template>
<div> <div v-if="globalStore.showHeader">
<q-header v-if="site" reveal elevated :class="getClassColorHeader" :style="`color: ` + getColorText + `;`"> <q-header v-if="site" reveal elevated :class="getClassColorHeader" :style="`color: ` + getColorText + `;`">
<q-toolbar color="primary" :glossy="!$q.platform.is.ios && !$q.platform.is.android" :inverted="$q.platform.is.ios" <q-toolbar color="primary" :glossy="!$q.platform.is.ios && !$q.platform.is.android" :inverted="$q.platform.is.ios"
class="toolbar"> class="toolbar">
@@ -228,7 +228,7 @@
</div> </div>
<div style="margin-top: 120px"></div> <div style="margin-top: 120px"></div>
<div v-show="!tools.isLogged()"> <div v-show="!tools.isLogged()">
<div class="q-ma-md" style=""> <div v-if="site.confpages && site.confpages.showRegButton" class="q-ma-md" style="">
<CSigninNoreg :showregbutt="site.confpages && site.confpages.showRegButton"> <CSigninNoreg :showregbutt="site.confpages && site.confpages.showRegButton">
</CSigninNoreg> </CSigninNoreg>
</div> </div>

View File

@@ -246,6 +246,7 @@ export interface IMyPage {
showFooter?: boolean showFooter?: boolean
mainMenu?: boolean mainMenu?: boolean
sottoMenu?: string[] sottoMenu?: string[]
hideHeader?: boolean
//Memory //Memory
loaded?: boolean loaded?: boolean
@@ -476,6 +477,7 @@ export interface ISelector {
} }
export interface IGlobalState { export interface IGlobalState {
finishLoading: boolean finishLoading: boolean
showHeader?: boolean
conta: number conta: number
wasAlreadySubOnDb: boolean wasAlreadySubOnDb: boolean
wasAlreadySubscribed: boolean wasAlreadySubscribed: boolean
@@ -786,15 +788,18 @@ export interface IAreaDiStampa {
format?: number[] format?: number[]
orientation?: string orientation?: string
compress?: boolean compress?: boolean
scale?: number scalex?: number
scale_printable?: number scaley?: number
scale_printablex?: number
scale_printabley?: number
scalecanvas?: number scalecanvas?: number
} }
export interface IElementiPagina { export interface IElementiPagina {
isTemplate?: boolean, isTemplate?: boolean,
linkIdTemplate?: string, linkIdTemplate?: string,
linkIdTemplatePerStampa?: string, scalexscheda?: number
scaleyscheda?: number
name?: string, name?: string,
pagina: IDimensioni pagina: IDimensioni
} }
@@ -819,7 +824,6 @@ export interface IMyScheda {
isTemplate?: boolean, isTemplate?: boolean,
isPagIntro?: boolean, isPagIntro?: boolean,
linkIdTemplate?: string, linkIdTemplate?: string,
linkIdTemplatePerStampa?: string,
name?: string, name?: string,
numschede_perRiga?: number numschede_perRiga?: number
numschede_perCol?: number numschede_perCol?: number
@@ -881,6 +885,7 @@ export interface IOptRigenera {
export interface IOptCatalogo { export interface IOptCatalogo {
//++AddCATALOGO_FIELDS //++AddCATALOGO_FIELDS
idCatalogSel?: string
productTypes?: number[] productTypes?: number[]
excludeproductTypes?: number[] excludeproductTypes?: number[]
formato?: string[] formato?: string[]
@@ -899,6 +904,7 @@ export interface IOptCatalogo {
maxnumlibri?: number maxnumlibri?: number
showListaArgomenti?: boolean showListaArgomenti?: boolean
showListaCollane?: boolean showListaCollane?: boolean
showOnlyCatalogoPDF?: boolean
generazionePDFInCorso?: boolean generazionePDFInCorso?: boolean
first_page?: IDimensioni first_page?: IDimensioni
@@ -907,7 +913,6 @@ export interface IOptCatalogo {
print_isTemplate?: boolean print_isTemplate?: boolean
print_linkIdTemplate?: string print_linkIdTemplate?: string
print_linkIdTemplatePerStampa?: string
dimensioni_def?: IElementiPagina dimensioni_def?: IElementiPagina

View File

@@ -48,7 +48,7 @@ export default defineComponent({
const pdfFile = ref(<any>null); const pdfFile = ref(<any>null);
const compressione = ref('prepress') const compressione = ref('printer')
const ListaCmd = ref( const ListaCmd = ref(
[ [
@@ -76,10 +76,6 @@ export default defineComponent({
label: '[Printer - Ottimizza il PDF per la stampa di qualità; migliora la risoluzione rispetto a /ebook.]', label: '[Printer - Ottimizza il PDF per la stampa di qualità; migliora la risoluzione rispetto a /ebook.]',
value: 'printer', value: 'printer',
}, },
{
label: '[Prepress - Ottimizza per la stampa di alta qualità; ideale per progetti di stampa professionali.]',
value: 'prepress',
},
{ {
label: '[Default - Usa impostazioni predefinite; generalmente fornisce un buon equilibrio tra qualità e dimensione]', label: '[Default - Usa impostazioni predefinite; generalmente fornisce un buon equilibrio tra qualità e dimensione]',
value: 'default', value: 'default',

View File

@@ -29,6 +29,12 @@ export const useCatalogStore = defineStore('CatalogStore', {
getCatalogById: (state) => (id: string): ICatalog => { getCatalogById: (state) => (id: string): ICatalog => {
return state.catalogs.find((cat: ICatalog) => cat._id === id) || null; return state.catalogs.find((cat: ICatalog) => cat._id === id) || null;
}, },
getCatalogsList: (state) => (): {label: string, value: string}[] => {
return state.catalogs.map((cat: ICatalog) => {
return {label: cat.title, value: cat._id};
});
},
getCatalogByIdPageAssigned: (state) => (idPage: string): ICatalog => { getCatalogByIdPageAssigned: (state) => (idPage: string): ICatalog => {
return state.catalogs.find((cat: ICatalog) => cat.idPageAssigned === idPage) || null; return state.catalogs.find((cat: ICatalog) => cat.idPageAssigned === idPage) || null;
}, },

View File

@@ -366,7 +366,6 @@ export const colmyScheda = [
AddCol({ name: 'isTemplate', label_trans: 'scheda.isTemplate', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'isTemplate', label_trans: 'scheda.isTemplate', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'isPagIntro', label_trans: 'scheda.isPagIntro', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'isPagIntro', label_trans: 'scheda.isPagIntro', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'linkIdTemplate', label_trans: 'scheda.linkIdTemplate', fieldtype: costanti.FieldType.string }), AddCol({ name: 'linkIdTemplate', label_trans: 'scheda.linkIdTemplate', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'linkIdTemplatePerStampa', label_trans: 'scheda.linkIdTemplatePerStampa', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'widthscheda', label_trans: 'scheda.widthscheda', fieldtype: costanti.FieldType.number }), AddCol({ name: 'widthscheda', label_trans: 'scheda.widthscheda', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'widthpag', label_trans: 'scheda.widthpag', fieldtype: costanti.FieldType.number }), AddCol({ name: 'widthpag', label_trans: 'scheda.widthpag', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'widthimg', label_trans: 'scheda.widthimg', fieldtype: costanti.FieldType.number }), AddCol({ name: 'widthimg', label_trans: 'scheda.widthimg', fieldtype: costanti.FieldType.number }),
@@ -581,6 +580,7 @@ export const colmypage = [
AddCol({ name: 'internalpage', label_trans: 'pages.internalpage', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'internalpage', label_trans: 'pages.internalpage', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'loadFirst', label_trans: 'pages.loadFirst', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'loadFirst', label_trans: 'pages.loadFirst', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'showFooter', label_trans: 'pages.showFooter', fieldtype: costanti.FieldType.boolean }), AddCol({ name: 'showFooter', label_trans: 'pages.showFooter', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'hideHeader', label_trans: 'pages.hideHeader', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'iconsize', label_trans: 'pages.iconsize', fieldtype: costanti.FieldType.string }), AddCol({ name: 'iconsize', label_trans: 'pages.iconsize', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'extraclass', label_trans: 'pages.extraclass', fieldtype: costanti.FieldType.string }), AddCol({ name: 'extraclass', label_trans: 'pages.extraclass', fieldtype: costanti.FieldType.string }),
AddCol(DeleteRec), AddCol(DeleteRec),

View File

@@ -410,7 +410,8 @@ export const tools = {
SelectListFormatPDF: [ SelectListFormatPDF: [
{ label: 'a4 (210x297) (mm) 793x1121 px', value: [210, 297] }, { label: 'a4 (210x297) (mm) 793x1121 px', value: [210, 297] },
{ label: 'STAMPA con Bordi: 22.53 x 31.25 96 DPI (in mm) 852x1181 px', value: [225.3, 312.5] }, { label: 'STAMPA con Bordi: 22.53 x 31.26 96 DPI (in mm) 852x1181 px', value: [225.3, 312.6] },
{ label: 'STAMPA MODIF: 22.533 x 31.23 96 DPI (in mm) 852x1181 px', value: [225.33, 312.23] },
], ],
SelectListScalePDF: [ SelectListScalePDF: [
@@ -10112,7 +10113,8 @@ export const tools = {
compress: false, compress: false,
orientation: 'portrait', orientation: 'portrait',
format: [210, 297], format: [210, 297],
scale: 1, scalex: 1,
scaley: 1,
scalecanvas: 2, scalecanvas: 2,
}; };
} else { } else {
@@ -10124,7 +10126,64 @@ export const tools = {
return myrec; return myrec;
}, },
adjustSize(optcatalogo: IOptCatalogo, mysize: any, add: number = 0) { getScaleX(optcatalogo: IOptCatalogo, scheda?: ISchedaSingola, options?: any): number | undefined {
let scalex = 1;
if (
optcatalogo.printable &&
optcatalogo.generazionePDFInCorso &&
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
) {
scalex = optcatalogo.areadistampa?.scale_printablex || 1;
let scaledifftrawebeStampax =
optcatalogo.areadistampa.format[0] / optcatalogo.areadistampa.format_printable[0];
if (!options?.parteesternafissa) scalex *= 1;
else scalex *= 1 / scaledifftrawebeStampax;
} else {
scalex = optcatalogo.areadistampa!.scalex || 1;
}
if (scheda) {
scalex *= scheda.scalex || 1;
}
return scalex;
},
getScaleY(optcatalogo: IOptCatalogo, scheda?: ISchedaSingola, options?: any): number | undefined {
let scaley = 1;
if (
optcatalogo.printable &&
optcatalogo.generazionePDFInCorso &&
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
) {
scaley = optcatalogo.areadistampa?.scale_printabley || 1;
let scaledifftrawebeStampay =
optcatalogo.areadistampa.format[1] / optcatalogo.areadistampa.format_printable[1];
if (!options?.parteesternafissa) scaley *= 1;
else scaley *= 1 / scaledifftrawebeStampay;
} else {
scaley = optcatalogo.areadistampa!.scaley || 1;
}
if (scheda) {
scaley *= scheda?.scaley || 1;
}
return scaley;
},
adjustSize(
optcatalogo: IOptCatalogo,
mysize: any,
scheda: ISchedaSingola,
isX: boolean,
options: any,
add: number = 0
) {
if (!mysize) { if (!mysize) {
return ''; return '';
} }
@@ -10140,12 +10199,43 @@ export const tools = {
size += add; size += add;
} }
let myscale = 1;
if (isX) myscale = this.getScaleX(optcatalogo, scheda, options);
else myscale = this.getScaleY(optcatalogo, scheda, options);
// Applica lo scale della Scheda
size = size * myscale;
if ( if (
optcatalogo.printable && optcatalogo.printable &&
optcatalogo.areadistampa?.scale && optcatalogo.generazionePDFInCorso &&
optcatalogo.areadistampa?.scale > 0 optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
) { ) {
size = size * optcatalogo.areadistampa?.scale; // Applicare la scala se necessaria let scaledifftrawebeStampax =
optcatalogo.areadistampa.format[0] / optcatalogo.areadistampa.format_printable[0];
let scaledifftrawebeStampay =
optcatalogo.areadistampa.format[1] / optcatalogo.areadistampa.format_printable[1];
const myPaddingPag = optcatalogo.dimensioni_def.pagina.size;
const numwidth = parseFloat(myPaddingPag.width) || 0;
const numheight = parseFloat(myPaddingPag.height) || 0;
const margineX = (((numwidth) * (1/scaledifftrawebeStampax)) - numwidth) / 2;
const marginey = (((numheight) * (1/scaledifftrawebeStampay)) - numheight) / 2;
if (options?.paddingLeft) {
size += marginex;
}
if (options?.paddingRight) {
size -= marginex;
}
if (options?.paddingTop) {
size += marginey;
}
if (options?.paddingBottom) {
size -= marginey;
}
} }
const strfinale = `${size}${unit}`; const strfinale = `${size}${unit}`;
@@ -10222,12 +10312,6 @@ export const tools = {
return jsonResult; return jsonResult;
}, },
getScale(optcatalogo: IOptCatalogo, instampa: boolean = false): number | undefined {
if ((optcatalogo.printable && optcatalogo.generazionePDFInCorso) || instampa)
return optcatalogo.areadistampa?.scale_printable;
else return optcatalogo.areadistampa!.scale;
},
getMainLink(url: string): string { getMainLink(url: string): string {
try { try {
// Se l'URL non ha un protocollo, aggiunge "https://" // Se l'URL non ha un protocollo, aggiunge "https://"
@@ -10591,7 +10675,7 @@ export const tools = {
getFileCompresso(filename: string) { getFileCompresso(filename: string) {
return this.removeFileExtension(filename) + `_compressed.pdf`; return this.removeFileExtension(filename) + `_compressed.pdf`;
} },
// FINE ! // FINE !

View File

@@ -1890,7 +1890,8 @@ export const useProducts = defineStore('Products', {
'{formato}', '{formato}',
'{tipologia}', '{tipologia}',
'{stato}', '{stato}',
'{scale}', '{scalex}',
'{scaley}',
'{descr_trafiletto_catalogo}', '{descr_trafiletto_catalogo}',
'{link_macro}', '{link_macro}',
'{qta}', '{qta}',
@@ -1973,8 +1974,11 @@ export const useProducts = defineStore('Products', {
myproduct.productInfo?.idStatoProdotto || '' myproduct.productInfo?.idStatoProdotto || ''
) )
break break
case '{scale}': case '{scalex}':
replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scale : '1' replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scalex : '1'
break
case '{scaley}':
replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scaley : '1'
break break
case '{link_macro}': case '{link_macro}':
replacements[key] = myproduct.productInfo.link_macro || '' replacements[key] = myproduct.productInfo.link_macro || ''
@@ -2362,10 +2366,7 @@ export const useProducts = defineStore('Products', {
if (optcatalogo) { if (optcatalogo) {
try { try {
// LINK PAGINA // LINK PAGINA
let idLinkTempl = let idLinkTempl =optcatalogo.dimensioni_def.linkIdTemplate
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
? optcatalogo.dimensioni_def.linkIdTemplatePerStampa
: optcatalogo.dimensioni_def.linkIdTemplate
if (idLinkTempl) { if (idLinkTempl) {
const reccatalog = globalStore.sovrascriviPaginaDefaultFromTemplate( const reccatalog = globalStore.sovrascriviPaginaDefaultFromTemplate(
idLinkTempl, idLinkTempl,
@@ -2378,10 +2379,7 @@ export const useProducts = defineStore('Products', {
} }
} }
let idLinkPr = let idLinkPr = optcatalogo.print_linkIdTemplate
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
? optcatalogo.print_linkIdTemplatePerStampa
: optcatalogo.print_linkIdTemplate
if (idLinkPr) { if (idLinkPr) {
const reccat2 = globalStore.sovrascriviAreadistampaFromTemplate(idLinkPr, optcatalogo) const reccat2 = globalStore.sovrascriviAreadistampaFromTemplate(idLinkPr, optcatalogo)
@@ -2390,10 +2388,13 @@ export const useProducts = defineStore('Products', {
// optcatalogo2.areadistampa = { ...reccat2.areadistampa}; // optcatalogo2.areadistampa = { ...reccat2.areadistampa};
optcatalogo2.areadistampa.margini = reccat2.areadistampa.margini optcatalogo2.areadistampa.margini = reccat2.areadistampa.margini
optcatalogo2.areadistampa.unit = reccat2.areadistampa.unit optcatalogo2.areadistampa.unit = reccat2.areadistampa.unit
optcatalogo2.areadistampa.scale = reccat2.areadistampa.scale optcatalogo2.areadistampa.scalex = reccat2.areadistampa.scalex
optcatalogo2.areadistampa.scaley = reccat2.areadistampa.scaley
optcatalogo2.areadistampa.scalecanvas = reccat2.areadistampa.scalecanvas optcatalogo2.areadistampa.scalecanvas = reccat2.areadistampa.scalecanvas
optcatalogo2.areadistampa.scale_printable = reccat2.areadistampa.scale_printable optcatalogo2.areadistampa.scale_printablex = reccat2.areadistampa.scale_printablex
optcatalogo2.areadistampa.scale_printabley = reccat2.areadistampa.scale_printabley
optcatalogo2.areadistampa.format = reccat2.areadistampa.format optcatalogo2.areadistampa.format = reccat2.areadistampa.format
optcatalogo2.areadistampa.format_printable = reccat2.areadistampa.format_printable
optcatalogo2.areadistampa.orientation = reccat2.areadistampa.orientation optcatalogo2.areadistampa.orientation = reccat2.areadistampa.orientation
optcatalogo2.areadistampa.compress = reccat2.areadistampa.compress optcatalogo2.areadistampa.compress = reccat2.areadistampa.compress
@@ -2404,11 +2405,7 @@ export const useProducts = defineStore('Products', {
} }
for (const recscheda of optcatalogo.arrSchede!) { for (const recscheda of optcatalogo.arrSchede!) {
let idtempl = let idtempl =recscheda.scheda?.linkIdTemplate
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA &&
recscheda.scheda?.linkIdTemplatePerStampa
? recscheda.scheda?.linkIdTemplatePerStampa
: recscheda.scheda?.linkIdTemplate
if (idtempl) { if (idtempl) {
// ricopia da Template: // ricopia da Template:
let myscheda = globalStore.sovrascriviSchedaFromTemplate( let myscheda = globalStore.sovrascriviSchedaFromTemplate(

File diff suppressed because it is too large Load Diff

View File

@@ -60,6 +60,7 @@ async function getConfig(id: any) {
export const useGlobalStore = defineStore('GlobalStore', { export const useGlobalStore = defineStore('GlobalStore', {
state: (): IGlobalState => ({ state: (): IGlobalState => ({
showHeader: true,
finishLoading: false, finishLoading: false,
conta: 0, conta: 0,
wasAlreadySubscribed: false, wasAlreadySubscribed: false,
@@ -230,9 +231,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
myschedatocopy.scheda._id = origScheda.scheda?._id; myschedatocopy.scheda._id = origScheda.scheda?._id;
myschedatocopy.scheda.isTemplate = false; myschedatocopy.scheda.isTemplate = false;
myschedatocopy.scheda.name = precname; myschedatocopy.scheda.name = precname;
myschedatocopy.scheda.linkIdTemplatePerStampa =
origScheda.scheda?.linkIdTemplatePerStampa;
myschedatocopy.scheda.linkIdTemplate = origScheda.scheda?.linkIdTemplate; myschedatocopy.scheda.linkIdTemplate = origScheda.scheda?.linkIdTemplate;
myschedatocopy.scheda.scalexscheda = origScheda.scheda?.scalexscheda;
myschedatocopy.scheda.scaleyscheda = origScheda.scheda?.scaleyscheda;
return myschedatocopy.scheda; return myschedatocopy.scheda;
} }
@@ -254,8 +255,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
// myelemtocopy.scheda._id = origScheda.scheda?._id; // myelemtocopy.scheda._id = origScheda.scheda?._id;
myelemtocopy.catalogo.dimensioni_def.isTemplate = false; myelemtocopy.catalogo.dimensioni_def.isTemplate = false;
myelemtocopy.catalogo.dimensioni_def.name = precname; myelemtocopy.catalogo.dimensioni_def.name = precname;
myelemtocopy.catalogo.dimensioni_def.linkIdTemplatePerStampa =
origDimensioni.linkIdTemplatePerStampa;
myelemtocopy.catalogo.dimensioni_def.linkIdTemplate = origDimensioni.linkIdTemplate; myelemtocopy.catalogo.dimensioni_def.linkIdTemplate = origDimensioni.linkIdTemplate;
return myelemtocopy.catalogo; return myelemtocopy.catalogo;
@@ -273,19 +272,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
const myelemtocopy = tools.jsonCopy(myfindelem); const myelemtocopy = tools.jsonCopy(myfindelem);
if (myelemtocopy) { if (myelemtocopy) {
const linkIdTemplate = const linkIdTemplate = myelemtocopy.catalogo.print_linkIdTemplate
myelemtocopy.catalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
? myelemtocopy.catalogo.print_linkIdTemplate
: myelemtocopy.catalogo.print_linkIdTemplatePerStampa;
// myelemtocopy.scheda._id = origScheda.scheda?._id;
myelemtocopy.catalogo.print_isTemplate = false; myelemtocopy.catalogo.print_isTemplate = false;
if ( myelemtocopy.catalogo.print_linkIdTemplate = linkIdTemplate;
myelemtocopy.catalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
)
myelemtocopy.catalogo.print_linkIdTemplatePerStampa = linkIdTemplate;
else {
myelemtocopy.catalogo.print_linkIdTemplate = linkIdTemplate;
}
return myelemtocopy.catalogo; return myelemtocopy.catalogo;
} }
@@ -2615,6 +2604,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
createCatalogoVuoto(): IOptCatalogo { createCatalogoVuoto(): IOptCatalogo {
return { return {
idCatalogSel: '',
productTypes: [0], productTypes: [0],
excludeproductTypes: [], excludeproductTypes: [],
idTipologie: [], idTipologie: [],
@@ -2625,14 +2615,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
dimensioni_def: { dimensioni_def: {
isTemplate: false, isTemplate: false,
linkIdTemplate: '', linkIdTemplate: '',
linkIdTemplatePerStampa: '',
name: '', name: '',
pagina: tools.resetRecIDimensioni(null), pagina: tools.resetRecIDimensioni(null),
}, },
areadistampa: tools.resetRecIAreaDiStampa(null), areadistampa: tools.resetRecIAreaDiStampa(null),
print_isTemplate: false, print_isTemplate: false,
print_linkIdTemplate: '', print_linkIdTemplate: '',
print_linkIdTemplatePerStampa: '',
}; };
}, },
createRaccoltaCataloghiVuoto(): IOptCatalogo { createRaccoltaCataloghiVuoto(): IOptCatalogo {
@@ -2647,14 +2635,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
dimensioni_def: { dimensioni_def: {
isTemplate: false, isTemplate: false,
linkIdTemplate: '', linkIdTemplate: '',
linkIdTemplatePerStampa: '',
name: '', name: '',
pagina: tools.resetRecIDimensioni(null), pagina: tools.resetRecIDimensioni(null),
}, },
areadistampa: tools.resetRecIAreaDiStampa(null), areadistampa: tools.resetRecIAreaDiStampa(null),
print_isTemplate: false, print_isTemplate: false,
print_linkIdTemplate: '', print_linkIdTemplate: '',
print_linkIdTemplatePerStampa: '',
}; };
}, },
@@ -3086,5 +3072,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
} }
} catch (e) {} } catch (e) {}
}, },
setshowHeader(value: boolean) {
this.showHeader = value
}
}, },
}); });

View File

@@ -8,23 +8,23 @@
<q-btn <q-btn
label="Migrazione del DB MSSQL su MongoDB (TUTTE)" label="Migrazione del DB MSSQL su MongoDB (TUTTE)"
color="positive" color="positive"
@click="EseguiFunz('MigrateMSSQLToMongoDb', {tutte: true})" @click="EseguiFunz('MigrateMSSQLToMongoDb', { tutte: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Migrazione del DB MSSQL su MongoDB (Parte 1)" label="Migrazione del DB MSSQL su MongoDB (Parte 1)"
color="positive" color="positive"
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte1: true})" @click="EseguiFunz('MigrateMSSQLToMongoDb', { parte1: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Migrazione del DB MSSQL su MongoDB (Parte 2)" label="Migrazione del DB MSSQL su MongoDB (Parte 2)"
color="positive" color="positive"
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte2: true})" @click="EseguiFunz('MigrateMSSQLToMongoDb', { parte2: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Migrazione del DB MSSQL su MongoDB (Parte 3)" label="Migrazione del DB MSSQL su MongoDB (Parte 3)"
color="positive" color="positive"
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte3: true})" @click="EseguiFunz('MigrateMSSQLToMongoDb', { parte3: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Migrazione del DB MSSQL su MongoDB (ALCUNE)" label="Migrazione del DB MSSQL su MongoDB (ALCUNE)"
@@ -41,21 +41,27 @@
color="positive" color="positive"
@click="EseguiFunz('UpdateCatDeleteEmpty')" @click="EseguiFunz('UpdateCatDeleteEmpty')"
></q-btn> ></q-btn>
<br><br> <br /><br />
<q-btn <q-btn
label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER" label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER"
color="accent" color="accent"
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: false, caricatutti: true})" @click="EseguiFunz('updateAllBook', { usaDBGMLocale: false, caricatutti: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER e Rimuovi Cancellati !" label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER e Rimuovi Cancellati !"
color="negative" color="negative"
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: false, caricatutti: true, rimuovieventualiCancellati: true})" @click="
EseguiFunz('updateAllBook', {
usaDBGMLocale: false,
caricatutti: true,
rimuovieventualiCancellati: true,
})
"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Riaggiorna TUTTI gli ARTICOLI dal DB Locale Importato" label="Riaggiorna TUTTI gli ARTICOLI dal DB Locale Importato"
color="accent" color="accent"
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: true, caricatutti: true})" @click="EseguiFunz('updateAllBook', { usaDBGMLocale: true, caricatutti: true })"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Statistiche Macro" label="Statistiche Macro"
@@ -85,7 +91,9 @@
<q-btn <q-btn
label="Esporta CSV Dati Mancanti (num.pagine, formato, DataPubbl.)" label="Esporta CSV Dati Mancanti (num.pagine, formato, DataPubbl.)"
color="primary" color="primary"
@click="EseguiFunz('ScraperGeneraCSV', {generateCSV: true, filename: 'dati_mancanti'})" @click="
EseguiFunz('ScraperGeneraCSV', { generateCSV: true, filename: 'dati_mancanti' })
"
></q-btn> ></q-btn>
<q-btn <q-btn
label="Rimuove Duplicati di ArrVariazioni !" label="Rimuove Duplicati di ArrVariazioni !"
@@ -102,6 +110,19 @@
color="primary" color="primary"
@click="EseguiFunz('ScraperAzzeraFlagErrori')" @click="EseguiFunz('ScraperAzzeraFlagErrori')"
></q-btn> ></q-btn>
<q-btn
label="Genera PDF Amici Animali"
color="primary"
@click="
EseguiFunz('GeneraPdfCatalogo', {
idCatalog: '605c72e2f9b1a019c1e4f4ac',
stampa: true,
path: 'upload/cataloghi/',
idtag_pdfcontent: 'tag-catalogo',
compressione: 'printer',
})
"
></q-btn>
<!-- <!--
<q-btn <q-btn

View File

@@ -61,57 +61,57 @@ body {
font-family: 'DINPro-Condensed-Bold', sans-serif; font-family: 'DINPro-Condensed-Bold', sans-serif;
color: $colore_titolo_libro; color: $colore_titolo_libro;
text-transform: uppercase; text-transform: uppercase;
margin-top: calc(5 * var(--scalecatalog) * 1px); margin-top: calc(5 * var(--scalecatalogy) * 1px);
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(18 * var(--scalecatalog) * 1px); font-size: calc(18 * var(--scalecatalogx) * 1px);
line-height: 100%; line-height: 100%;
font-weight: bold; font-weight: bold;
} }
.book-author { .book-author {
font-family: 'DINPro-Condensed-Regular', sans-serif; font-family: 'DINPro-Condensed-Regular', sans-serif;
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
} }
.book-descr { .book-descr {
font-family: 'DINPro-Condensed-Bold-Italic', sans-serif; font-family: 'DINPro-Condensed-Bold-Italic', sans-serif;
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
} }
.book-details { .book-details {
font-family: 'DINPro-Condensed-Regular', sans-serif; font-family: 'DINPro-Condensed-Regular', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
text-align: left !important; text-align: left !important;
&.big { &.big {
font-size: calc(22 * var(--scalecatalog) * 1px); font-size: calc(22 * var(--scalecatalogx) * 1px);
} }
} }
.book-descr-estesa { .book-descr-estesa {
font-family: 'AGaramondPro-Regular', sans-serif; font-family: 'AGaramondPro-Regular', sans-serif;
font-size: calc(15 * var(--scalecatalog) * 1px); font-size: calc(15 * var(--scalecatalogx) * 1px);
text-align: justify; text-align: justify;
word-wrap: break-word; word-wrap: break-word;
} }
.book-link { .book-link {
font-style: italic; font-style: italic;
font-size: calc(14 * var(--scalecatalog) * 1px); font-size: calc(14 * var(--scalecatalogx) * 1px);
} }
.book-novita { .book-novita {
font-size: calc(20 * var(--scalecatalog) * 1px); font-size: calc(20 * var(--scalecatalogx) * 1px);
} }
.book-text-up { .book-text-up {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(20 * var(--scalecatalog) * 1px); font-size: calc(20 * var(--scalecatalogx) * 1px);
height: calc(380 * var(--scalecatalog) * 1px); height: calc(380 * var(--scalecatalogy) * 1px);
line-height: 130%; line-height: 130%;
font-weight: bold; font-weight: bold;
@@ -122,22 +122,22 @@ body {
.book-text-down { .book-text-down {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
} }
.book-pagina-title { .book-pagina-title {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-top: calc(50 * var(--scalecatalog) * 1px); margin-top: calc(50 * var(--scalecatalogy) * 1px);
margin-bottom: calc(0 * var(--scalecatalog) * 1px); margin-bottom: calc(0 * var(--scalecatalogy) * 1px);
font-size: calc(30 * var(--scalecatalog) * 1px); font-size: calc(30 * var(--scalecatalogx) * 1px);
height: calc(50 * var(--scalecatalog) * 1px); height: calc(50 * var(--scalecatalogy) * 1px);
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: bold;
} }
.book-pagina-title-footer { .book-pagina-title-footer {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
font-size: calc(20 * var(--scalecatalog) * 1px) !important; font-size: calc(20 * var(--scalecatalogx) * 1px) !important;
font-weight: bold; font-weight: bold;
text-transform: none; text-transform: none;
} }

File diff suppressed because it is too large Load Diff

View File

@@ -2,15 +2,15 @@
<q-page> <q-page>
<div> <div>
<div <div
v-if="ispageCatalogata" v-if="ispageCatalogata && !optcatalogo.showOnlyCatalogoPDF"
class="text-bold text-h6 text-center text-blue" class="text-bold text-h6 text-center text-blue"
> >
{{ getTitoloCatalogo() }} {{ getTitoloCatalogo() }}
</div> </div>
<div <div
v-if=" v-if="
ispageCatalogata && ispageCatalogata && !optcatalogo.showOnlyCatalogoPDF
(tools.isEditor() || tools.isCommerciale()) && && (tools.isEditor() || tools.isCommerciale()) &&
myCatalog?.referenti?.length > 0 myCatalog?.referenti?.length > 0
" "
class="text-h7 text-center text-red q-ma-sm" class="text-h7 text-center text-red q-ma-sm"
@@ -19,6 +19,7 @@
<span class="text-bold">{{ getReferentiCatalogo() }}</span> <span class="text-bold">{{ getReferentiCatalogo() }}</span>
</div> </div>
<q-tabs <q-tabs
v-if="!optcatalogo.showOnlyCatalogoPDF"
v-model="tabcatalogo" v-model="tabcatalogo"
dense dense
class="bg-green text-white" class="bg-green text-white"
@@ -77,7 +78,6 @@
<q-tab-panels <q-tab-panels
v-model="tabcatalogo" v-model="tabcatalogo"
animated animated
class=""
keep-alive keep-alive
> >
<q-tab-panel <q-tab-panel
@@ -135,7 +135,7 @@
</div> </div>
<div <div
v-if="!generatinglist" v-if="!generatinglist && !optcatalogo.showOnlyCatalogoPDF"
class="text-center q-py-sm prod_trov" class="text-center q-py-sm prod_trov"
> >
<div <div
@@ -248,13 +248,14 @@
<q-tab-panel <q-tab-panel
name="visu" name="visu"
v-if="optcatalogo" v-if="optcatalogo"
:style="{ 'padding': optcatalogo.showOnlyCatalogoPDF ? '0px !important' : '' }"
> >
<q-inner-loading <q-inner-loading
id="spinner" id="spinner"
:showing="generatinglist" :showing="generatinglist"
> >
</q-inner-loading> </q-inner-loading>
<div class="row justify-center q-mx-auto bg-blue-1"> <div class="">
<div class="text-center"> <div class="text-center">
<q-spinner <q-spinner
v-if="ismounting" v-if="ismounting"
@@ -267,7 +268,7 @@
v-if="!ismounting" v-if="!ismounting"
class="panel" class="panel"
> >
<div class="container"> <div :class="{container: !optcatalogo.showOnlyCatalogoPDF}">
<q-tabs <q-tabs
v-model="tabvisu" v-model="tabvisu"
dense dense
@@ -315,6 +316,7 @@
</q-tabs> </q-tabs>
<CTitleBanner <CTitleBanner
v-if="!optcatalogo.showOnlyCatalogoPDF"
v-show="tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0" v-show="tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0"
class="q-pa-xs" class="q-pa-xs"
title="Genera PDF" title="Genera PDF"
@@ -349,7 +351,6 @@
{ label: 'Versione Stampabile', value: shared_consts.PREPARA_PDF.STAMPA }, { label: 'Versione Stampabile', value: shared_consts.PREPARA_PDF.STAMPA },
]" ]"
label="Seleziona Versione" label="Seleziona Versione"
:disable="true"
emit-value emit-value
map-options map-options
style="width: 300px" style="width: 300px"
@@ -375,30 +376,82 @@
:push="optcatalogo.indebug" :push="optcatalogo.indebug"
:color="optcatalogo.indebug ? `positive` : 'primary'" :color="optcatalogo.indebug ? `positive` : 'primary'"
></q-btn> ></q-btn>
<q-input <div
v-if="optcatalogo.pdf && optcatalogo.indebug" v-if="optcatalogo.indebug"
@update:model-value="modifElem" class="row justify-center"
v-model="ratioconvert" >
label="Ratio Convert" <br />
type="number" <q-input
step="0.01" v-if="
outlined optcatalogo.pdf &&
dense !optcatalogo.generazionePDFInCorso &&
style="width: 100px; margin-right: 10px" optcatalogo.indebug
></q-input> "
<q-btn @update:model-value="modifElem"
v-if=" v-model="ratioconvert"
optcatalogo.pdf && label="Ratio Convert"
!optcatalogo.generazionePDFInCorso && type="number"
optcatalogo.indebug step="0.01"
" outlined
:label="`CONVERTI VALORI`" dense
@click="convertiValori" style="width: 100px; margin-right: 10px"
></q-btn> ></q-input>
<q-btn
v-if="
optcatalogo.pdf &&
!optcatalogo.generazionePDFInCorso &&
optcatalogo.indebug
"
:label="`CONVERTI VALORI`"
@click="convertiValori"
></q-btn>
</div>
<div v-if="optcatalogo.indebug">
Larghezza Pagina:
{{
tools.adjustSize(
optcatalogo,
optcatalogo.dimensioni_def?.pagina?.size?.width,
null,
true,
{ parteesternafissa: true }
)
}}<br />
Altezza Pagina:
{{
tools.adjustSize(
optcatalogo,
optcatalogo.dimensioni_def?.pagina?.size?.height,
null,
true,
{ parteesternafissa: true }
)
}}<br />
Margine
Top:
{{
tools.adjustSize(
optcatalogo,
optcatalogo.dimensioni_def?.pagina?.padding?.top,
null,
true,
{ paddingTop: true, parteesternafissa: true }
)
}} - Bottom:
{{
tools.adjustSize(
optcatalogo,
optcatalogo.dimensioni_def?.pagina?.padding?.bottom,
null,
true,
{ paddingBottom: true, parteesternafissa: true }
)
}}
</div>
</div> </div>
<CTitleBanner <CTitleBanner
v-show=" v-show="
tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0 tabcatalogo === 'visu' && tools.isAdmin() && arrProducts?.length > 0
" "
class="q-pa-xs" class="q-pa-xs"
title="Configurazione" title="Configurazione"
@@ -438,11 +491,31 @@
rounded rounded
style="width: 200px" style="width: 200px"
outlined outlined
v-model="optcatalogo.areadistampa.scale" v-model="optcatalogo.areadistampa.format_printable"
:options="tools.SelectListFormatPDF"
@update:model-value="modifElem"
dense
label="Formato:"
emit-value
map-options
>
</q-select>
<div v-if="optcatalogo.areadistampa.format_printable?.length > 1">
Ratio:
{{
optcatalogo.areadistampa.format_printable[0] /
optcatalogo.areadistampa.format_printable[1]
}}
</div>
<q-select
rounded
style="width: 200px"
outlined
v-model="optcatalogo.areadistampa.scalex"
:options="tools.SelectListScalePDF" :options="tools.SelectListScalePDF"
@update:model-value="modifElem" @update:model-value="modifElem"
dense dense
label="Scale:" label="Scale X:"
emit-value emit-value
map-options map-options
> >
@@ -451,11 +524,37 @@
rounded rounded
style="width: 200px" style="width: 200px"
outlined outlined
v-model="optcatalogo.areadistampa.scale_printable" v-model="optcatalogo.areadistampa.scaley"
:options="tools.SelectListScalePDF" :options="tools.SelectListScalePDF"
@update:model-value="modifElem" @update:model-value="modifElem"
dense dense
label="Scale per Stampa:" label="Scale Y:"
emit-value
map-options
>
</q-select>
<q-select
rounded
style="width: 200px"
outlined
v-model="optcatalogo.areadistampa.scale_printablex"
:options="tools.SelectListScalePDF"
@update:model-value="modifElem"
dense
label="Scale X per Stampa:"
emit-value
map-options
>
</q-select>
<q-select
rounded
style="width: 200px"
outlined
v-model="optcatalogo.areadistampa.scale_printabley"
:options="tools.SelectListScalePDF"
@update:model-value="modifElem"
dense
label="Scale Y per Stampa:"
emit-value emit-value
map-options map-options
> >
@@ -521,121 +620,125 @@
<div v-if="strout"> <div v-if="strout">
{{ strout }} {{ strout }}
</div> </div>
<div v-if="myCatalog"> <CTitleBanner
<div v-show="
v-if="myCatalog.pdf_generato" tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0
class="bg-green-1 q-ma-sm q-pa-sm" "
> class="q-pa-xs"
<div class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm"> title="Lista PDF"
<strong>PDF generati Temporanei</strong> bgcolor="bg-blue"
</div> clcolor="text-white"
mystyle=""
<q-table myclass="myshad"
:rows="pdfRows" :canopen="true"
:columns="pdfColumns" :visible="true"
flat >
bordered <div v-if="myCatalog">
dense <div
row-key="name" v-if="myCatalog.pdf_generato"
class="bg-green-1 q-ma-sm q-pa-sm"
> >
<template v-slot:body-cell-pdf="props"> <div class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm">
<q-td :props="props"> <strong>PDF generati Temporanei</strong>
<a
v-if="props.row.pdf"
:href="tools.getURLByHostAndFilePath(props.row.pdf)"
target="_blank"
class="text-bold"
>
{{ tools.getURLByHostAndFilePath(props.row.pdf) }}
</a>
<span v-else>-</span>
</q-td>
</template>
<template v-slot:body-cell-size="props">
<q-td :props="props">
{{ props.row.size ? (props.row.size) + ' MB' : '-' }}
</q-td>
</template>
<template v-slot:body-cell-data="props">
<q-td :props="props">
{{ tools.getstrDateTime(props.row.data) }}
</q-td>
</template>
<template v-slot:body-cell-azioni="props">
<q-td :props="props">
<q-btn
v-if="props.row.showButton"
rounded
color="positive"
size="md"
:label="props.row.buttonLabel"
@click="props.row.action"
/>
</q-td>
</template>
</q-table>
<div class="bg-red-1 q-pa-md q-mt-md">
<div class="bg-blue-1 text-green text-bold text-h6 q-ma-sm q-pa-sm">
<strong>PDF Pubblicati OnLine</strong>
</div> </div>
<table class="q-table q-table--flat q-table--dense q-ma-none q-pa-none"> <q-table
<tbody> :rows="pdfRows"
<tr> :columns="pdfColumns"
<td> flat
<strong>PDF OnLine:</strong> bordered
</td> dense
<td> row-key="name"
<a >
v-if="myCatalog.pdf_online" <template v-slot:body-cell-name="props">
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)" <q-td :props="props">
target="_blank" <a
class="text-bold" v-if="props.row.pdf"
> :href="tools.getURLByHostAndFilePath(props.row.pdf)"
{{ tools.getURLByHostAndFilePath(myCatalog.pdf_online) }} target="_blank"
</a> class="text-bold"
<span v-else>-</span> >
</td> {{ props.row.name }}
<td> </a>
{{ myCatalog.pdf_online_size }} MB <span v-else>-</span>
</td> </q-td>
<td> </template>
{{ tools.getstrDateTime(myCatalog.data_online) }}
</td> <template v-slot:body-cell-size="props">
</tr> <q-td :props="props">
<tr> {{ props.row.size ? props.row.size + ' MB' : '-' }}
<td> </q-td>
<strong>PDF OnLine Stampa:</strong> </template>
</td>
<td> <template v-slot:body-cell-data="props">
<a <q-td :props="props">
v-if="myCatalog.pdf_online_stampa" {{ tools.getstrDateTime(props.row.data) }}
:href=" </q-td>
tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa) </template>
"
target="_blank" <template v-slot:body-cell-azioni="props">
class="text-bold" <q-td :props="props">
> <q-btn
{{ tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa) }} v-if="props.row.showButton"
</a> rounded
<span v-else>-</span> color="positive"
</td> size="md"
<td> :label="props.row.buttonLabel"
{{ myCatalog.pdf_online_stampa_size }} MB @click="props.row.action"
</td> />
<td> </q-td>
{{ tools.getstrDateTime(myCatalog.data_online_stampa) }} </template>
</td> </q-table>
</tr>
</tbody> <div class="bg-red-1 q-pa-md q-mt-md">
</table> <div class="bg-blue-1 text-green text-bold text-h6 q-ma-sm q-pa-sm">
<strong>PDF Pubblicati OnLine</strong>
</div>
<table class="q-table q-table--flat q-table--dense q-ma-none q-pa-none">
<tbody>
<tr>
<td>
<strong
><a
v-if="myCatalog.pdf_online"
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
target="_blank"
class="text-bold"
>PDF OnLine:</a
></strong
>
</td>
<td>{{ myCatalog.pdf_online_size }} MB</td>
<td>
{{ tools.getstrDateTime(myCatalog.data_online) }}
</td>
</tr>
<tr>
<td>
<strong
><a
v-if="myCatalog.pdf_online_stampa"
:href="
tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa)
"
target="_blank"
class="text-bold"
>PDF OnLine Stampa:</a
></strong
>
</td>
<td>{{ myCatalog.pdf_online_stampa_size }} MB</td>
<td>
{{ tools.getstrDateTime(myCatalog.data_online_stampa) }}
</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> </div>
</div> </CTitleBanner>
</div> </div>
</CTitleBanner> </CTitleBanner>
@@ -803,9 +906,9 @@
></q-select> ></q-select>
</div> </div>
<div class="text-center q-py-sm prod_trov"> <div class="text-center q-py-sm prod_trov" v-if="!optcatalogo.showOnlyCatalogoPDF">
<div <div
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata" v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata && !optcatalogo.showOnlyCatalogoPDF"
class="row justify-center text-h6" class="row justify-center text-h6"
> >
Seleziona {{ filtroStrApplicato }} Seleziona {{ filtroStrApplicato }}
@@ -918,6 +1021,7 @@
<div <div
v-else v-else
class="cards-container" class="cards-container"
id="tag-catalogo"
> >
<!-- Itera sulle schede --> <!-- Itera sulle schede -->
<div <div
@@ -940,10 +1044,18 @@
}" }"
:style="generateStylePageScheda(optcatalogo, recscheda.scheda)" :style="generateStylePageScheda(optcatalogo, recscheda.scheda)"
> >
<!--style {{generateStylePageScheda(optcatalogo, recscheda.scheda)}}-->
<div <div
v-if="recscheda.scheda.dimensioni.pagina?.testo_title?.contenuto" v-if="recscheda.scheda.dimensioni.pagina?.testo_title?.contenuto"
:style="{ :style="{
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(
optcatalogo,
recscheda.scheda
),
'--scalecatalogy': tools.getScaleY(
optcatalogo,
recscheda.scheda
),
'line-height': 'line-height':
recscheda.scheda.dimensioni.pagina?.testo_title?.font recscheda.scheda.dimensioni.pagina?.testo_title?.font
.line_height, .line_height,
@@ -970,7 +1082,14 @@
<div <div
v-if="recscheda.scheda.dimensioni.pagina?.testo_up?.contenuto" v-if="recscheda.scheda.dimensioni.pagina?.testo_up?.contenuto"
:style="{ :style="{
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(
optcatalogo,
recscheda.scheda
),
'--scalecatalogy': tools.getScaleY(
optcatalogo,
recscheda.scheda
),
'line-height': 'line-height':
recscheda.scheda.dimensioni.pagina?.testo_up?.font recscheda.scheda.dimensioni.pagina?.testo_up?.font
.line_height, .line_height,
@@ -988,13 +1107,20 @@
<div <div
v-if="recscheda.scheda?.dimensioni?.pagina?.testo_title" v-if="recscheda.scheda?.dimensioni?.pagina?.testo_title"
:style="{ :style="{
'--scalecatalog': tools.getScale(optcatalogo), '--scalecatalogx': tools.getScaleX(
optcatalogo,
recscheda.scheda
),
'--scalecatalogy': tools.getScaleY(
optcatalogo,
recscheda.scheda
),
'line-height': 'line-height':
recscheda.scheda.dimensioni.pagina?.testo_title?.font recscheda.scheda.dimensioni.pagina?.testo_title?.font
.line_height, .line_height,
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
position: 'absolute', // Posizione assoluta rispetto al contenitore padre position: 'absolute', // Posizione assoluta rispetto al contenitore padre
bottom: '2.2%', // Posiziona in basso bottom: '2.2%', // Posiziona in basso
left: '50%', // Centra orizzontalmente left: '50%', // Centra orizzontalmente
transform: 'translateX(-50%)', // Correzione per centrare perfettamente transform: 'translateX(-50%)', // Correzione per centrare perfettamente
@@ -1009,8 +1135,17 @@
</div> </div>
<div v-if="optcatalogo.indebug"> <div v-if="optcatalogo.indebug">
isStampa: {{ isStampa }} generazionePDFInCorso:
{{ optcatalogo.generazionePDFInCorso }} getScaleX:
{{ tools.getScaleX(optcatalogo, recscheda.scheda) }} getScaleY:
{{ tools.getScaleY(optcatalogo, recscheda.scheda) }}
IMG: IMG:
{{ getImgIntroCatalogo(recscheda.scheda) }} <span v-if="getTestoIntroduttivo(recscheda)">
{{ getImgIntroCatalogo(recscheda.scheda) }}
</span>
<span v-else>
{{ getSfondoImgCatalogo(recscheda.scheda) }}
</span>
num: {{ page.length }} num: {{ page.length }}
</div> </div>
@@ -1073,7 +1208,14 @@
> >
<q-separator <q-separator
inset inset
:size="tools.adjustSize(optcatalogo, '1px')" :size="
tools.adjustSize(
optcatalogo,
'1px',
recscheda.scheda,
true
)
"
></q-separator> ></q-separator>
</div> </div>
</div> </div>

View File

@@ -61,71 +61,71 @@ body {
font-family: 'DINPro-Condensed-Bold', sans-serif; font-family: 'DINPro-Condensed-Bold', sans-serif;
color: $colore_titolo_libro; color: $colore_titolo_libro;
text-transform: uppercase; text-transform: uppercase;
margin-top: calc(5 * var(--scalecatalog) * 1px); margin-top: calc(5 * var(--scalecatalogy) * 1px);
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(18 * var(--scalecatalog) * 1px); font-size: calc(18 * var(--scalecatalogx) * 1px);
line-height: 100%; line-height: 100%;
font-weight: bold; font-weight: bold;
} }
.book-author { .book-author {
font-family: 'DINPro-Condensed-Regular', sans-serif; font-family: 'DINPro-Condensed-Regular', sans-serif;
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
} }
.book-descr { .book-descr {
font-family: 'DINPro-Condensed-Bold-Italic', sans-serif; font-family: 'DINPro-Condensed-Bold-Italic', sans-serif;
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
} }
.book-details { .book-details {
font-family: 'DINPro-Condensed-Regular', sans-serif; font-family: 'DINPro-Condensed-Regular', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(16 * var(--scalecatalog) * 1px); font-size: calc(16 * var(--scalecatalogx) * 1px);
text-align: left !important; text-align: left !important;
&.big { &.big {
font-size: calc(22 * var(--scalecatalog) * 1px); font-size: calc(22 * var(--scalecatalogx) * 1px);
} }
} }
.book-descr-estesa { .book-descr-estesa {
font-family: 'AGaramondPro-Regular', sans-serif; font-family: 'AGaramondPro-Regular', sans-serif;
font-size: calc(15 * var(--scalecatalog) * 1px); font-size: calc(15 * var(--scalecatalogx) * 1px);
text-align: justify; text-align: justify;
word-wrap: break-word; word-wrap: break-word;
} }
.book-link { .book-link {
font-style: italic; font-style: italic;
font-size: calc(14 * var(--scalecatalog) * 1px); font-size: calc(14 * var(--scalecatalogx) * 1px);
} }
.book-novita { .book-novita {
font-size: calc(20 * var(--scalecatalog) * 1px); font-size: calc(20 * var(--scalecatalogx) * 1px);
} }
.book-text-up { .book-text-up {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(20 * var(--scalecatalog) * 1px); font-size: calc(20 * var(--scalecatalogx) * 1px);
height: calc(380 * var(--scalecatalog) * 1px); height: calc(380 * var(--scalecatalogy) * 1px);
line-height: 130%; line-height: 130%;
} }
.book-text-down { .book-text-down {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
} }
.book-pagina-title { .book-pagina-title {
font-family: 'DINPro', sans-serif; font-family: 'DINPro', sans-serif;
margin-top: calc(20 * var(--scalecatalog) * 1px); margin-top: calc(20 * var(--scalecatalogy) * 1px);
margin-bottom: calc(5 * var(--scalecatalog) * 1px); margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
font-size: calc(35 * var(--scalecatalog) * 1px); font-size: calc(35 * var(--scalecatalogx) * 1px);
height: calc(100 * var(--scalecatalog) * 1px); height: calc(100 * var(--scalecatalogy) * 1px);
} }
.categories { .categories {

View File

@@ -88,7 +88,7 @@ export default defineComponent({
const widthpdf = ref('8.88'); const widthpdf = ref('8.88');
const heightpdf = ref('12.31'); const heightpdf = ref('12.31');
const compressionepdf = ref('prepress'); const compressionepdf = ref('printer');
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue }); const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });