- 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:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"singleAttributePerLine": true,
|
||||
"printWidth": 100,
|
||||
"printWidth": 90,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<MyFooter></MyFooter>
|
||||
</q-layout>
|
||||
</div>
|
||||
<BannerCookies urlInfo="/policy"></BannerCookies>
|
||||
<!--<BannerCookies urlInfo="/policy"></BannerCookies>-->
|
||||
</template>
|
||||
<script lang="ts" src="./App.ts">
|
||||
</script>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()" :idPage="idPage">
|
||||
<Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()" :idPage="idPage">
|
||||
|
||||
</Catalogo>
|
||||
</div>
|
||||
</Catalogo>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCatalogo.ts">
|
||||
|
||||
@@ -393,7 +393,7 @@ $grigioscuro: rgb(120, 120, 120);
|
||||
.flex-details_and_barcode {
|
||||
display: flex; /* Rende il div un container flex per allineare i contenuti */
|
||||
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;
|
||||
flex-grow: 0; /* Opzionale: permette agli elementi di crescere uniformemente */
|
||||
}
|
||||
|
||||
@@ -137,9 +137,20 @@ export default defineComponent({
|
||||
const field_updated_fromGM = ref('');
|
||||
const dataextractedWeb = ref('');
|
||||
|
||||
const widthoggetto = ref(40)
|
||||
const heightoggetto = ref(40)
|
||||
|
||||
// Crea una copia locale reattiva di 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({
|
||||
get(): boolean {
|
||||
return globalStore.editOn ? globalStore.editOn : false;
|
||||
@@ -694,12 +705,6 @@ export default defineComponent({
|
||||
return false;
|
||||
}
|
||||
|
||||
function getScale() {
|
||||
if (optcatalogo.value.printable)
|
||||
return optcatalogo.value.areadistampa!.scale_printable;
|
||||
else return optcatalogo.value.areadistampa!.scale;
|
||||
}
|
||||
|
||||
/*async function refreshDataFromGM() {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
@@ -894,7 +899,6 @@ export default defineComponent({
|
||||
getTesto_Right_attaccato,
|
||||
getTesto_Bottom,
|
||||
getTesto_Debug,
|
||||
getScale,
|
||||
updateCatalogo,
|
||||
optcatalogo,
|
||||
visufromgm,
|
||||
@@ -911,6 +915,10 @@ export default defineComponent({
|
||||
loading,
|
||||
modifTrafiletto,
|
||||
getDataExtracted,
|
||||
widthoggetto,
|
||||
heightoggetto,
|
||||
mywidthogg,
|
||||
myheightogg
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
<div
|
||||
v-if="optcatalogo"
|
||||
:class="{
|
||||
' items-start q-gutter-sm': true,
|
||||
' items-start': true,
|
||||
}"
|
||||
:style="
|
||||
scheda.dimensioni?.pagina?.dimensioni?.size?.height
|
||||
? ' height: ' +
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.pagina?.dimensioni?.size?.height
|
||||
scheda.dimensioni?.pagina?.dimensioni?.size?.height,
|
||||
scheda,
|
||||
false
|
||||
) +
|
||||
'px !important; '
|
||||
: ''
|
||||
@@ -54,8 +56,7 @@
|
||||
'flex', // Classi comuni
|
||||
'image-container',
|
||||
{ 'shadow-2': options.in_3d && !optcatalogo.pdf }, // Classe condizionale
|
||||
scheda.testo_right_attaccato.font?.posiz_text ===
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? ''
|
||||
: 'flex flex-row', // Layout flessibile
|
||||
]"
|
||||
@@ -63,16 +64,22 @@
|
||||
gap:
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.gap
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.gap,
|
||||
scheda,
|
||||
true
|
||||
) ?? '0.1rem',
|
||||
width:
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.width
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.width,
|
||||
scheda,
|
||||
true
|
||||
) ?? '100%',
|
||||
height: tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.height
|
||||
scheda.dimensioni?.scheda_prodotto?.size?.height,
|
||||
scheda,
|
||||
false
|
||||
),
|
||||
}"
|
||||
>
|
||||
@@ -92,9 +99,7 @@
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
:fit="
|
||||
scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'
|
||||
"
|
||||
:fit="scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'"
|
||||
:class="{
|
||||
'book-image-fixed': complete,
|
||||
'cursor-pointer': !complete,
|
||||
@@ -104,24 +109,29 @@
|
||||
:style="{
|
||||
zIndex: 2,
|
||||
width:
|
||||
scheda.testo_right.font?.posiz_text ===
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
scheda.testo_right.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? (scheda.testo_right.font?.perc_text ?? '50%')
|
||||
: '45%',
|
||||
...(tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.immagine_prodotto?.size?.width
|
||||
scheda.dimensioni?.immagine_prodotto?.size?.width,
|
||||
scheda,
|
||||
true
|
||||
) && {
|
||||
width:
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.immagine_prodotto.size?.width
|
||||
scheda.dimensioni?.immagine_prodotto.size?.width,
|
||||
scheda,
|
||||
true
|
||||
) + ' !important',
|
||||
}),
|
||||
height: scheda.dimensioni?.immagine_prodotto?.size?.height
|
||||
? tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.dimensioni?.immagine_prodotto?.size?.height
|
||||
scheda.dimensioni?.immagine_prodotto?.size?.height,
|
||||
scheda,
|
||||
false
|
||||
)
|
||||
: undefined,
|
||||
display: 'block',
|
||||
@@ -129,7 +139,14 @@
|
||||
@click="click_opendetail()"
|
||||
/>
|
||||
</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
|
||||
class="row absolute-top-left semi-transparent"
|
||||
style="z-index: 10"
|
||||
@@ -212,8 +229,7 @@
|
||||
</q-item>-->
|
||||
<q-item
|
||||
v-if="
|
||||
!optcatalogo.generazionePDFInCorso &&
|
||||
(editOn || options.show_edit_book)
|
||||
!optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@@ -316,8 +332,7 @@
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
!optcatalogo.generazionePDFInCorso &&
|
||||
(editOn || options.show_edit_book)
|
||||
!optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@@ -331,10 +346,7 @@
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>Visualizza dati Estrapolati (dal WEB
|
||||
Esterno)</q-item-label
|
||||
>
|
||||
<q-item-label>Visualizza dati Estrapolati (dal WEB Esterno)</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
@@ -380,10 +392,7 @@
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
>Visualizza su GM (con le Quantità in
|
||||
Magazzino)</q-item-label
|
||||
>
|
||||
<q-item-label>Visualizza su GM (con le Quantità in Magazzino)</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
@@ -401,19 +410,14 @@
|
||||
:idPage="idPage"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
scheda.testo_right_attaccato.font?.posiz_text !==
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
"
|
||||
v-if="scheda.testo_right_attaccato.font?.posiz_text !== costanti.POSIZ_TESTO.IN_BASSO"
|
||||
:style="{
|
||||
alignSelf:
|
||||
scheda.testo_right_attaccato.font?.posiz_text ===
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? ''
|
||||
: 'center',
|
||||
marginTop:
|
||||
scheda.testo_right_attaccato.font?.posiz_text ===
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? 'auto'
|
||||
: '0',
|
||||
}"
|
||||
@@ -432,54 +436,37 @@
|
||||
:value="myproduct.productInfo.code"
|
||||
:format="scheda.barcode.format"
|
||||
:fontsizeprop="scheda.barcode.font?.size"
|
||||
:gap="
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
|
||||
"
|
||||
:gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap, scheda, true)"
|
||||
:width="
|
||||
parseInt(
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.barcode.size?.width
|
||||
)
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.size?.width, scheda, true)
|
||||
)
|
||||
"
|
||||
:widthlines="
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.widthlines, scheda, true)
|
||||
"
|
||||
: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"
|
||||
>
|
||||
</CBarCode>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
scheda.etichette?.bestseller?.show &&
|
||||
isProductBestseller()
|
||||
"
|
||||
>
|
||||
<div v-if="scheda.etichette?.bestseller?.show && isProductBestseller()">
|
||||
<q-img
|
||||
src="/images/bestseller.png"
|
||||
alt="Bestseller"
|
||||
:width="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:height="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:width="mywidthogg + 'px'"
|
||||
:height="myheightogg + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
scheda.etichette?.novita?.show && isProductNovita()
|
||||
"
|
||||
>
|
||||
<div v-else-if="scheda.etichette?.novita?.show && isProductNovita()">
|
||||
<q-img
|
||||
src="/images/novita.png"
|
||||
alt="Novita"
|
||||
:width="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:height="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:width="mywidthogg + 'px'"
|
||||
:height="myheightogg + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
@@ -488,10 +475,7 @@
|
||||
</div>
|
||||
</CText>
|
||||
<div
|
||||
v-if="
|
||||
scheda.testo_right_attaccato.font?.posiz_text ===
|
||||
costanti.POSIZ_TESTO.IN_BASSO
|
||||
"
|
||||
v-if="scheda.testo_right_attaccato.font?.posiz_text === costanti.POSIZ_TESTO.IN_BASSO"
|
||||
class="flexible-width"
|
||||
:style="{
|
||||
marginTop: 'auto',
|
||||
@@ -511,50 +495,37 @@
|
||||
:value="myproduct.productInfo.code"
|
||||
:format="scheda.barcode.format"
|
||||
:fontsizeprop="scheda.barcode.font?.size"
|
||||
:gap="
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
|
||||
"
|
||||
:gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap, scheda, true)"
|
||||
:width="
|
||||
parseInt(
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
scheda.barcode.size?.width
|
||||
)
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.size?.width, scheda, true)
|
||||
)
|
||||
"
|
||||
:widthlines="
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
|
||||
tools.adjustSize(optcatalogo, scheda.barcode.widthlines, scheda, true)
|
||||
"
|
||||
: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"
|
||||
>
|
||||
</CBarCode>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
scheda.etichette?.bestseller?.show && isProductBestseller()
|
||||
"
|
||||
>
|
||||
<div v-if="scheda.etichette?.bestseller?.show && isProductBestseller()">
|
||||
<q-img
|
||||
src="/images/bestseller.png"
|
||||
alt="Bestseller"
|
||||
:width="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:height="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:width="mywidthogg + 'px'"
|
||||
:height="myheightogg + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
scheda.etichette?.novita?.show && isProductNovita()
|
||||
"
|
||||
>
|
||||
<div v-else-if="scheda.etichette?.novita?.show && isProductNovita()">
|
||||
<q-img
|
||||
src="/images/novita.png"
|
||||
alt="Novita"
|
||||
:width="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:height="40 * tools.getScale(optcatalogo) + 'px'"
|
||||
:width="mywidthogg + 'px'"
|
||||
:height="myheightogg + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
@@ -570,7 +541,8 @@
|
||||
>
|
||||
<div
|
||||
:style="{
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
|
||||
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
|
||||
'line-height': scheda.testo_bottom.font?.line_height,
|
||||
}"
|
||||
v-html="getTesto_Debug"
|
||||
@@ -651,14 +623,10 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong>{{
|
||||
tools.getNomeUtenteEUsernameByRecUser(ordcart.user)
|
||||
}}</strong>
|
||||
<strong>{{ tools.getNomeUtenteEUsernameByRecUser(ordcart.user) }}</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong>{{
|
||||
shared_consts.getStatusStr(ordcart.status)
|
||||
}}</strong>
|
||||
<strong>{{ shared_consts.getStatusStr(ordcart.status) }}</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div
|
||||
@@ -667,8 +635,7 @@
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
singleord.order.idProduct === myproduct._id &&
|
||||
singleord.order.quantity > 0
|
||||
singleord.order.idProduct === myproduct._id && singleord.order.quantity > 0
|
||||
"
|
||||
>
|
||||
{{ singleord.order.quantity }}</span
|
||||
@@ -703,12 +670,7 @@
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-if="
|
||||
true &&
|
||||
myproduct &&
|
||||
myproduct.productInfo &&
|
||||
myproduct.productInfo.link_scheda
|
||||
"
|
||||
v-if="true && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda"
|
||||
v-model="apriSchedaPDF"
|
||||
maximized
|
||||
>
|
||||
@@ -745,12 +707,7 @@
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-if="
|
||||
false &&
|
||||
myproduct &&
|
||||
myproduct.productInfo &&
|
||||
myproduct.productInfo.link_scheda
|
||||
"
|
||||
v-if="false && myproduct && myproduct.productInfo && myproduct.productInfo.link_scheda"
|
||||
v-model="apriSchedaPDF"
|
||||
fullscreen
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div :class="class">
|
||||
<div v-if="internalModel" :class="class">
|
||||
<q-dialog
|
||||
v-model="internalModel"
|
||||
maximized
|
||||
|
||||
@@ -14,6 +14,7 @@ import type {
|
||||
} from '@src/model';
|
||||
import { IImgGallery, ILabelValue, IMyPage, IOperators } from '@src/model';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { useCatalogStore } from '@store/catalogStore';
|
||||
|
||||
import { CImgTitle } from '@src/components/CImgTitle';
|
||||
import { CImgPoster } from '@src/components/CImgPoster';
|
||||
@@ -28,6 +29,7 @@ import { CMyPageIntro } from '@src/components/CMyPageIntro';
|
||||
import { CEventsCalendar } from '@src/components/CEventsCalendar';
|
||||
import { CMyEditor } from '@src/components/CMyEditor';
|
||||
import { CMySlider } from '@src/components/CMySlider';
|
||||
import { CMySlideNumber } from '@src/components/CMySlideNumber';
|
||||
import { CMyFieldRec } from '@src/components/CMyFieldRec';
|
||||
import { CSelectImage } from '@src/components/CSelectImage';
|
||||
import { CSelectAnimation } from '@src/components/CSelectAnimation';
|
||||
@@ -69,7 +71,7 @@ export default defineComponent({
|
||||
CMySize,
|
||||
CBorders,
|
||||
CMyDimensioni,
|
||||
CMyText,
|
||||
CMyText, CMySlideNumber,
|
||||
},
|
||||
emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem', 'dupPage', 'expPage', 'impPage'],
|
||||
props: {
|
||||
@@ -100,6 +102,7 @@ export default defineComponent({
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const globalStore = useGlobalStore();
|
||||
const catalogStore = useCatalogStore();
|
||||
|
||||
const { setmeta, getsrcbyimg } = MixinMetaTags();
|
||||
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.print_isTemplate = false;
|
||||
myel.value.catalogo.print_linkIdTemplate = '';
|
||||
myel.value.catalogo.print_linkIdTemplatePerStampa = '';
|
||||
}
|
||||
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa);
|
||||
@@ -357,7 +359,8 @@ export default defineComponent({
|
||||
myel.value.catalogo.dimensioni_def = {
|
||||
isTemplate: false,
|
||||
linkIdTemplate: '',
|
||||
linkIdTemplatePerStampa: '',
|
||||
scalexscheda: 1,
|
||||
scaleyscheda: 1,
|
||||
name: '',
|
||||
pagina: {},
|
||||
};
|
||||
@@ -810,6 +813,7 @@ export default defineComponent({
|
||||
exportPage,
|
||||
importPage,
|
||||
globalStore,
|
||||
catalogStore,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1606,6 +1606,28 @@
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</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
|
||||
v-model="myel.catalogo.showListaCollane"
|
||||
color="positive"
|
||||
@@ -1818,20 +1840,6 @@
|
||||
map-options
|
||||
>
|
||||
</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
|
||||
v-if="myel.catalogo.dimensioni_def.pagina"
|
||||
@@ -1979,20 +1987,21 @@
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.linkIdTemplatePerStampa"
|
||||
:options="globalStore.getSchedeOpt()"
|
||||
<CMySlideNumber
|
||||
v-model="recscheda.scheda.scalex"
|
||||
label="Scale X:"
|
||||
:min="0.5"
|
||||
:max="1.5"
|
||||
@update:model-value="modifElem"
|
||||
label="Scheda collegata STAMPA:"
|
||||
style="width: 350px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
/>
|
||||
<CMySlideNumber
|
||||
v-model="recscheda.scheda.scaley"
|
||||
label="Scale Y:"
|
||||
:min="0.5"
|
||||
:max="1.5"
|
||||
@update:model-value="modifElem"
|
||||
/>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<q-select
|
||||
@@ -2477,20 +2486,6 @@
|
||||
map-options
|
||||
>
|
||||
</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
|
||||
:class="{
|
||||
@@ -2536,30 +2531,53 @@
|
||||
</div>
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 200px"
|
||||
style="width: 350px"
|
||||
outlined
|
||||
v-model="myel.catalogo.areadistampa.scale"
|
||||
:options="tools.SelectListScalePDF"
|
||||
v-model="myel.catalogo.areadistampa.format_printable"
|
||||
:options="tools.SelectListFormatPDF"
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Scale:"
|
||||
label="Formato per Stampa:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
rounded
|
||||
style="width: 200px"
|
||||
outlined
|
||||
v-model="myel.catalogo.areadistampa.scale_printable"
|
||||
:options="tools.SelectListScalePDF"
|
||||
<div v-if="myel.catalogo.areadistampa.format_printable?.length > 1">
|
||||
Ratio:
|
||||
{{
|
||||
myel.catalogo.areadistampa.format_printable[0] /
|
||||
myel.catalogo.areadistampa.format_printable[1]
|
||||
}}
|
||||
</div>
|
||||
<CMySlideNumber
|
||||
v-model="myel.catalogo.areadistampa.scalex"
|
||||
label="Scale X:"
|
||||
:min="0.5"
|
||||
:max="1.5"
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Scale per Stampa:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
/>
|
||||
<CMySlideNumber
|
||||
v-model="myel.catalogo.areadistampa.scaley"
|
||||
label="Scale Y:"
|
||||
:min="0.5"
|
||||
: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
|
||||
rounded
|
||||
style="width: 200px"
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
import {
|
||||
computed,
|
||||
defineComponent, onMounted, ref, toRef, watch,
|
||||
} from 'vue'
|
||||
import { computed, defineComponent, onMounted, ref, toRef, watch } from 'vue';
|
||||
|
||||
import type { IMyElem, IMyPage } from '@src/model'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { LandingFooter } from '@src/components/LandingFooter'
|
||||
import { CMyElem } from '@src/components/CMyElem'
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner'
|
||||
import { CMyEditElem } from '@src/components/CMyEditElem'
|
||||
import { CMyPageElem2 } from '@src/components/CMyPageElem2'
|
||||
import { CExportImportPage } from '@src/components/CExportImportPage'
|
||||
import type { IMyElem, IMyPage } from '@src/model';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { LandingFooter } from '@src/components/LandingFooter';
|
||||
import { CMyElem } from '@src/components/CMyElem';
|
||||
import { CTitleBanner } from '@src/components/CTitleBanner';
|
||||
import { CMyEditElem } from '@src/components/CMyEditElem';
|
||||
import { CMyPageElem2 } from '@src/components/CMyPageElem2';
|
||||
import { CExportImportPage } from '@src/components/CExportImportPage';
|
||||
|
||||
import { CImgTitle } from '../CImgTitle/index'
|
||||
import { CTitle } from '../CTitle/index'
|
||||
import { tools } from '@tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import objectId from '@src/js/objectId'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { CImgTitle } from '../CImgTitle/index';
|
||||
import { CTitle } from '../CTitle/index';
|
||||
import { tools } from '@tools';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { shared_consts } from '@src/common/shared_vuejs';
|
||||
import objectId from '@src/js/objectId';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyPageElem',
|
||||
components: {
|
||||
LandingFooter, CImgTitle, CTitle, CMyElem,
|
||||
CMyEditElem, CMyPageElem2, CTitleBanner, CExportImportPage,
|
||||
LandingFooter,
|
||||
CImgTitle,
|
||||
CTitle,
|
||||
CMyElem,
|
||||
CMyEditElem,
|
||||
CMyPageElem2,
|
||||
CTitleBanner,
|
||||
CExportImportPage,
|
||||
},
|
||||
props: {
|
||||
title: String,
|
||||
@@ -36,7 +39,7 @@ export default defineComponent({
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
@@ -66,64 +69,73 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
setup(props) {
|
||||
const rec = ref<IMyPage | null>(null)
|
||||
const mypathin = toRef(props, 'mypath')
|
||||
const myidPage = toRef(props, 'idPage')
|
||||
const rec = ref<IMyPage | null>(null);
|
||||
const mypathin = toRef(props, 'mypath');
|
||||
const myidPage = toRef(props, 'idPage');
|
||||
|
||||
const $q = useQuasar()
|
||||
const $q = useQuasar();
|
||||
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
const $router = useRouter()
|
||||
const { t } = useI18n();
|
||||
const globalStore = useGlobalStore();
|
||||
const $router = useRouter();
|
||||
|
||||
const mywidthEditor = ref(400)
|
||||
const mywidthEditor = ref(400);
|
||||
|
||||
const showexportPage = ref(false)
|
||||
const showimportPage = ref(false)
|
||||
const showexportPage = ref(false);
|
||||
const showimportPage = ref(false);
|
||||
|
||||
const editOn = computed({
|
||||
get(): boolean {
|
||||
return !!globalStore.editOn ? globalStore.editOn : false
|
||||
return !!globalStore.editOn ? globalStore.editOn : false;
|
||||
},
|
||||
|
||||
set(value: boolean) {
|
||||
return tools.updateEditOn(value)
|
||||
}
|
||||
})
|
||||
const visuEditor = ref(false)
|
||||
const addOn = ref(false)
|
||||
const myelemVoid = ref({ _id: objectId(), active: true, type: shared_consts.ELEMTYPE.TEXT, container: '...', path: mypathin.value } as IMyElem)
|
||||
return tools.updateEditOn(value);
|
||||
},
|
||||
});
|
||||
const visuEditor = 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 selElem = ref(<IMyElem | null>globalStore.selElem);
|
||||
const site = ref(globalStore.site);
|
||||
|
||||
const selElem = ref(<IMyElem | null>globalStore.selElem)
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
const onloading = ref(false)
|
||||
const onloading = ref(false);
|
||||
|
||||
const myelems = computed(() => {
|
||||
if (myidPage.value)
|
||||
return globalStore.getMyElemsByIdPage(myidPage.value)
|
||||
else if (mypathin.value)
|
||||
return globalStore.getMyElems(mypathin.value)
|
||||
else
|
||||
return null
|
||||
})
|
||||
if (myidPage.value) return globalStore.getMyElemsByIdPage(myidPage.value);
|
||||
else if (mypathin.value) return globalStore.getMyElems(mypathin.value);
|
||||
else return null;
|
||||
});
|
||||
|
||||
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 !== '') {
|
||||
onloading.value = true
|
||||
await globalStore.loadPage('/' + mypathin.value, 'cmypageelem')
|
||||
.then(ris => {
|
||||
rec.value = ris
|
||||
// console.log('LoadPage', ris)
|
||||
})
|
||||
onloading.value = false
|
||||
onloading.value = true;
|
||||
await globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then((ris) => {
|
||||
rec.value = ris;
|
||||
if (ris && ris.hideHeader) {
|
||||
globalStore.setshowHeader(false);
|
||||
}
|
||||
|
||||
// console.log('LoadPage', ris)
|
||||
});
|
||||
onloading.value = false;
|
||||
}
|
||||
|
||||
if (mypathin.value === 'home_logout' && globalStore.site.name === 'local' && !rec.value) {
|
||||
$router.replace('/install_site')
|
||||
if (
|
||||
mypathin.value === 'home_logout' &&
|
||||
globalStore.site.name === 'local' &&
|
||||
!rec.value
|
||||
) {
|
||||
$router.replace('/install_site');
|
||||
}
|
||||
|
||||
if (tools.isManager()) {
|
||||
@@ -131,22 +143,26 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => props.mypath, (to: string, from: string) => {
|
||||
// console.log('... load', mypathin.value, props.mypath)
|
||||
selElem.value = {}
|
||||
load()
|
||||
})
|
||||
watch(
|
||||
() => props.mypath,
|
||||
(to: string, from: string) => {
|
||||
// console.log('... load', mypathin.value, props.mypath)
|
||||
selElem.value = {};
|
||||
load();
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => editOn.value,
|
||||
() => {
|
||||
if (!editOn.value) {
|
||||
selElem.value = {}
|
||||
selElem.value = {};
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
async function mounted() {
|
||||
await load()
|
||||
await load();
|
||||
}
|
||||
|
||||
function saveElem(myelem: IMyElem) {
|
||||
@@ -154,39 +170,38 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function changeVisuDrawer(path: string, edit: boolean) {
|
||||
globalStore.changeVisuDrawer(path, edit)
|
||||
globalStore.changeVisuDrawer(path, edit);
|
||||
}
|
||||
|
||||
function toggleSize() {
|
||||
mywidthEditor.value = mywidthEditor.value === 400 ? 1050 : 400
|
||||
mywidthEditor.value = mywidthEditor.value === 400 ? 1050 : 400;
|
||||
}
|
||||
|
||||
function deleteElem() {
|
||||
selElem.value = {}
|
||||
visuEditor.value = false
|
||||
selElem.value = {};
|
||||
visuEditor.value = false;
|
||||
}
|
||||
function selElemClick(myelem: IMyElem) {
|
||||
console.log('mypageelem selElemClick', myelem)
|
||||
console.log('mypageelem selElemClick', myelem);
|
||||
|
||||
try {
|
||||
selElem.value = {}
|
||||
selElem.value = myelem
|
||||
visuEditor.value = !!myelem
|
||||
selElem.value = {};
|
||||
selElem.value = myelem;
|
||||
visuEditor.value = !!myelem;
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async function duplicatePage() {
|
||||
await globalStore.duplicatePage(mypathin.value, $q, t)
|
||||
await globalStore.duplicatePage(mypathin.value, $q, t);
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
onMounted(mounted);
|
||||
|
||||
return {
|
||||
rec, myelems,
|
||||
rec,
|
||||
myelems,
|
||||
mypathin,
|
||||
editOn,
|
||||
visuEditor,
|
||||
@@ -205,7 +220,6 @@ export default defineComponent({
|
||||
duplicatePage,
|
||||
showexportPage,
|
||||
showimportPage,
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="mypathin && !!rec">
|
||||
<q-inner-loading id="spinner" :showing="onloading">
|
||||
<q-spinner-tail color="primary" size="4em"> </q-spinner-tail>
|
||||
<q-inner-loading
|
||||
id="spinner"
|
||||
:showing="onloading"
|
||||
>
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em"
|
||||
>
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="!onloading">
|
||||
@@ -27,7 +34,10 @@
|
||||
elevated
|
||||
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-btn
|
||||
flat
|
||||
@@ -57,54 +67,91 @@
|
||||
</CMyEditElem>
|
||||
</q-drawer>
|
||||
|
||||
<div class="q-gutter-xs" style="margin-left: 1px; margin-right: 1px">
|
||||
<div v-if="!!rec.img1" class="text-center">
|
||||
<q-img :src="`` + rec.img1" class="img"></q-img>
|
||||
<div
|
||||
:class="{ 'q-gutter-xs': !rec.hideHeader }"
|
||||
: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 v-if="!!rec.content" v-html="rec.content"></div>
|
||||
<q-video v-if="!!rec.video1" :src="rec.video1" :ratio="rec.ratio1">
|
||||
<div
|
||||
v-if="!!rec.content"
|
||||
v-html="rec.content"
|
||||
></div>
|
||||
<q-video
|
||||
v-if="!!rec.video1"
|
||||
:src="rec.video1"
|
||||
:ratio="rec.ratio1"
|
||||
>
|
||||
</q-video>
|
||||
|
||||
<div v-if="!!rec.img2" class="text-center">
|
||||
<q-img :src="`` + rec.img2" class="img"></q-img>
|
||||
<div
|
||||
v-if="!!rec.img2"
|
||||
class="text-center"
|
||||
>
|
||||
<q-img
|
||||
:src="`` + rec.img2"
|
||||
class="img"
|
||||
></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content2" v-html="rec.content2"></div>
|
||||
<div
|
||||
v-if="!!rec.content2"
|
||||
v-html="rec.content2"
|
||||
></div>
|
||||
<q-video
|
||||
v-if="!!rec.video2"
|
||||
:src="rec.video2"
|
||||
:ratio="rec.ratio2"
|
||||
></q-video>
|
||||
|
||||
<div v-if="!!rec.img3" class="text-center">
|
||||
<q-img :src="`` + rec.img2" class="img"></q-img>
|
||||
<div
|
||||
v-if="!!rec.img3"
|
||||
class="text-center"
|
||||
>
|
||||
<q-img
|
||||
:src="`` + rec.img2"
|
||||
class="img"
|
||||
></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="!!rec.content3" v-html="rec.content3"></div>
|
||||
<div
|
||||
v-if="!!rec.content3"
|
||||
v-html="rec.content3"
|
||||
></div>
|
||||
<q-video
|
||||
v-if="!!rec.video3"
|
||||
:src="rec.video3"
|
||||
:ratio="rec.ratio3"
|
||||
></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>
|
||||
<transition :duration="1000" appear>
|
||||
<transition
|
||||
:duration="1000"
|
||||
appear
|
||||
>
|
||||
<CTitleBanner
|
||||
v-if="
|
||||
(myelem.active || editOn) &&
|
||||
!!rec.path &&
|
||||
myelem.titleBanner
|
||||
"
|
||||
v-if="(myelem.active || editOn) && !!rec.path && myelem.titleBanner"
|
||||
:class="`q-pa-xs `"
|
||||
:title="myelem.titleBanner"
|
||||
bgcolor="bg-primary"
|
||||
:clcolor="myelem.color ? `` : `text-white`"
|
||||
:mystyle="
|
||||
myelem.color ? `color: ${myelem.color} !important;` : ``
|
||||
"
|
||||
:mystyle="myelem.color ? `color: ${myelem.color} !important;` : ``"
|
||||
:myclass="myelem.classBanner"
|
||||
:canopen="true"
|
||||
>
|
||||
@@ -164,7 +211,12 @@
|
||||
:styleadd="styleadd"
|
||||
></CTitle>
|
||||
<div v-if="!imgbackground">
|
||||
<CImgTitle v-if="img" :src="img" :title="title"> </CImgTitle>
|
||||
<CImgTitle
|
||||
v-if="img"
|
||||
:src="img"
|
||||
:title="title"
|
||||
>
|
||||
</CImgTitle>
|
||||
</div>
|
||||
<slot></slot>
|
||||
<div v-if="!nofooter"></div>
|
||||
@@ -175,7 +227,13 @@
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<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-card-section class="q-pa-xs inset-shadow">
|
||||
<br />
|
||||
@@ -193,7 +251,13 @@
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<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-card-section class="q-pa-xs inset-shadow">
|
||||
<br />
|
||||
@@ -209,8 +273,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyPageElem.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CMyPageElem.ts"></script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./CMyPageElem.scss";
|
||||
@import './CMyPageElem.scss';
|
||||
</style>
|
||||
|
||||
0
src/components/CMySlideNumber/CMySlideNumber.scss
Executable file
0
src/components/CMySlideNumber/CMySlideNumber.scss
Executable file
76
src/components/CMySlideNumber/CMySlideNumber.ts
Executable file
76
src/components/CMySlideNumber/CMySlideNumber.ts
Executable 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,
|
||||
};
|
||||
},
|
||||
});
|
||||
32
src/components/CMySlideNumber/CMySlideNumber.vue
Executable file
32
src/components/CMySlideNumber/CMySlideNumber.vue
Executable 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>
|
||||
1
src/components/CMySlideNumber/index.ts
Executable file
1
src/components/CMySlideNumber/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMySlideNumber} from './CMySlideNumber.vue'
|
||||
@@ -9,7 +9,8 @@
|
||||
width: rectext.font?.perc_text ?? '50%',
|
||||
...( rectext.size && rectext.size.height ? { height: tools.adjustSize(optcatalogo, rectext.size.height) } : {}),
|
||||
marginTop: '0',
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
|
||||
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
|
||||
'line-height': rectext.font?.line_height,
|
||||
}"
|
||||
>
|
||||
@@ -25,11 +26,12 @@
|
||||
:class="{ 'flex-details_and_barcode' : show_at_right }"
|
||||
:style="{
|
||||
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',
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(optcatalogo, scheda),
|
||||
'--scalecatalogy': tools.getScaleY(optcatalogo, scheda),
|
||||
'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>
|
||||
|
||||
@@ -581,6 +581,7 @@ export default defineComponent({
|
||||
tools.setCookie('menu3oriz', globalStore.leftDrawerOpen ? '1' : '0');
|
||||
}
|
||||
|
||||
|
||||
onBeforeMount(BeforeMount);
|
||||
onMounted(mounted);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="globalStore.showHeader">
|
||||
<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"
|
||||
class="toolbar">
|
||||
@@ -228,7 +228,7 @@
|
||||
</div>
|
||||
<div style="margin-top: 120px"></div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@@ -246,6 +246,7 @@ export interface IMyPage {
|
||||
showFooter?: boolean
|
||||
mainMenu?: boolean
|
||||
sottoMenu?: string[]
|
||||
hideHeader?: boolean
|
||||
|
||||
//Memory
|
||||
loaded?: boolean
|
||||
@@ -476,6 +477,7 @@ export interface ISelector {
|
||||
}
|
||||
export interface IGlobalState {
|
||||
finishLoading: boolean
|
||||
showHeader?: boolean
|
||||
conta: number
|
||||
wasAlreadySubOnDb: boolean
|
||||
wasAlreadySubscribed: boolean
|
||||
@@ -786,15 +788,18 @@ export interface IAreaDiStampa {
|
||||
format?: number[]
|
||||
orientation?: string
|
||||
compress?: boolean
|
||||
scale?: number
|
||||
scale_printable?: number
|
||||
scalex?: number
|
||||
scaley?: number
|
||||
scale_printablex?: number
|
||||
scale_printabley?: number
|
||||
scalecanvas?: number
|
||||
}
|
||||
|
||||
export interface IElementiPagina {
|
||||
isTemplate?: boolean,
|
||||
linkIdTemplate?: string,
|
||||
linkIdTemplatePerStampa?: string,
|
||||
scalexscheda?: number
|
||||
scaleyscheda?: number
|
||||
name?: string,
|
||||
pagina: IDimensioni
|
||||
}
|
||||
@@ -819,7 +824,6 @@ export interface IMyScheda {
|
||||
isTemplate?: boolean,
|
||||
isPagIntro?: boolean,
|
||||
linkIdTemplate?: string,
|
||||
linkIdTemplatePerStampa?: string,
|
||||
name?: string,
|
||||
numschede_perRiga?: number
|
||||
numschede_perCol?: number
|
||||
@@ -881,6 +885,7 @@ export interface IOptRigenera {
|
||||
|
||||
export interface IOptCatalogo {
|
||||
//++AddCATALOGO_FIELDS
|
||||
idCatalogSel?: string
|
||||
productTypes?: number[]
|
||||
excludeproductTypes?: number[]
|
||||
formato?: string[]
|
||||
@@ -899,6 +904,7 @@ export interface IOptCatalogo {
|
||||
maxnumlibri?: number
|
||||
showListaArgomenti?: boolean
|
||||
showListaCollane?: boolean
|
||||
showOnlyCatalogoPDF?: boolean
|
||||
generazionePDFInCorso?: boolean
|
||||
|
||||
first_page?: IDimensioni
|
||||
@@ -907,7 +913,6 @@ export interface IOptCatalogo {
|
||||
|
||||
print_isTemplate?: boolean
|
||||
print_linkIdTemplate?: string
|
||||
print_linkIdTemplatePerStampa?: string
|
||||
|
||||
dimensioni_def?: IElementiPagina
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export default defineComponent({
|
||||
|
||||
const pdfFile = ref(<any>null);
|
||||
|
||||
const compressione = ref('prepress')
|
||||
const compressione = ref('printer')
|
||||
|
||||
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.]',
|
||||
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]',
|
||||
value: 'default',
|
||||
|
||||
@@ -29,6 +29,12 @@ export const useCatalogStore = defineStore('CatalogStore', {
|
||||
getCatalogById: (state) => (id: string): ICatalog => {
|
||||
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 => {
|
||||
return state.catalogs.find((cat: ICatalog) => cat.idPageAssigned === idPage) || null;
|
||||
},
|
||||
|
||||
@@ -366,7 +366,6 @@ export const colmyScheda = [
|
||||
AddCol({ name: 'isTemplate', label_trans: 'scheda.isTemplate', 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: 'linkIdTemplatePerStampa', label_trans: 'scheda.linkIdTemplatePerStampa', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'widthscheda', label_trans: 'scheda.widthscheda', 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 }),
|
||||
@@ -581,6 +580,7 @@ export const colmypage = [
|
||||
AddCol({ name: 'internalpage', label_trans: 'pages.internalpage', 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: 'hideHeader', label_trans: 'pages.hideHeader', fieldtype: costanti.FieldType.boolean }),
|
||||
AddCol({ name: 'iconsize', label_trans: 'pages.iconsize', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'extraclass', label_trans: 'pages.extraclass', fieldtype: costanti.FieldType.string }),
|
||||
AddCol(DeleteRec),
|
||||
|
||||
@@ -410,7 +410,8 @@ export const tools = {
|
||||
|
||||
SelectListFormatPDF: [
|
||||
{ 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: [
|
||||
@@ -10112,7 +10113,8 @@ export const tools = {
|
||||
compress: false,
|
||||
orientation: 'portrait',
|
||||
format: [210, 297],
|
||||
scale: 1,
|
||||
scalex: 1,
|
||||
scaley: 1,
|
||||
scalecanvas: 2,
|
||||
};
|
||||
} else {
|
||||
@@ -10124,7 +10126,64 @@ export const tools = {
|
||||
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) {
|
||||
return '';
|
||||
}
|
||||
@@ -10140,12 +10199,43 @@ export const tools = {
|
||||
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 (
|
||||
optcatalogo.printable &&
|
||||
optcatalogo.areadistampa?.scale &&
|
||||
optcatalogo.areadistampa?.scale > 0
|
||||
optcatalogo.generazionePDFInCorso &&
|
||||
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}`;
|
||||
@@ -10222,12 +10312,6 @@ export const tools = {
|
||||
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 {
|
||||
try {
|
||||
// Se l'URL non ha un protocollo, aggiunge "https://"
|
||||
@@ -10591,7 +10675,7 @@ export const tools = {
|
||||
|
||||
getFileCompresso(filename: string) {
|
||||
return this.removeFileExtension(filename) + `_compressed.pdf`;
|
||||
}
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
|
||||
@@ -1890,7 +1890,8 @@ export const useProducts = defineStore('Products', {
|
||||
'{formato}',
|
||||
'{tipologia}',
|
||||
'{stato}',
|
||||
'{scale}',
|
||||
'{scalex}',
|
||||
'{scaley}',
|
||||
'{descr_trafiletto_catalogo}',
|
||||
'{link_macro}',
|
||||
'{qta}',
|
||||
@@ -1973,8 +1974,11 @@ export const useProducts = defineStore('Products', {
|
||||
myproduct.productInfo?.idStatoProdotto || ''
|
||||
)
|
||||
break
|
||||
case '{scale}':
|
||||
replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scale : '1'
|
||||
case '{scalex}':
|
||||
replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scalex : '1'
|
||||
break
|
||||
case '{scaley}':
|
||||
replacements[key] = optcatalogo.printable ? optcatalogo.areadistampa?.scaley : '1'
|
||||
break
|
||||
case '{link_macro}':
|
||||
replacements[key] = myproduct.productInfo.link_macro || ''
|
||||
@@ -2362,10 +2366,7 @@ export const useProducts = defineStore('Products', {
|
||||
if (optcatalogo) {
|
||||
try {
|
||||
// LINK PAGINA
|
||||
let idLinkTempl =
|
||||
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
|
||||
? optcatalogo.dimensioni_def.linkIdTemplatePerStampa
|
||||
: optcatalogo.dimensioni_def.linkIdTemplate
|
||||
let idLinkTempl =optcatalogo.dimensioni_def.linkIdTemplate
|
||||
if (idLinkTempl) {
|
||||
const reccatalog = globalStore.sovrascriviPaginaDefaultFromTemplate(
|
||||
idLinkTempl,
|
||||
@@ -2378,10 +2379,7 @@ export const useProducts = defineStore('Products', {
|
||||
}
|
||||
}
|
||||
|
||||
let idLinkPr =
|
||||
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
|
||||
? optcatalogo.print_linkIdTemplatePerStampa
|
||||
: optcatalogo.print_linkIdTemplate
|
||||
let idLinkPr = optcatalogo.print_linkIdTemplate
|
||||
|
||||
if (idLinkPr) {
|
||||
const reccat2 = globalStore.sovrascriviAreadistampaFromTemplate(idLinkPr, optcatalogo)
|
||||
@@ -2390,10 +2388,13 @@ export const useProducts = defineStore('Products', {
|
||||
// optcatalogo2.areadistampa = { ...reccat2.areadistampa};
|
||||
optcatalogo2.areadistampa.margini = reccat2.areadistampa.margini
|
||||
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.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_printable = reccat2.areadistampa.format_printable
|
||||
optcatalogo2.areadistampa.orientation = reccat2.areadistampa.orientation
|
||||
optcatalogo2.areadistampa.compress = reccat2.areadistampa.compress
|
||||
|
||||
@@ -2404,11 +2405,7 @@ export const useProducts = defineStore('Products', {
|
||||
}
|
||||
|
||||
for (const recscheda of optcatalogo.arrSchede!) {
|
||||
let idtempl =
|
||||
optcatalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA &&
|
||||
recscheda.scheda?.linkIdTemplatePerStampa
|
||||
? recscheda.scheda?.linkIdTemplatePerStampa
|
||||
: recscheda.scheda?.linkIdTemplate
|
||||
let idtempl =recscheda.scheda?.linkIdTemplate
|
||||
if (idtempl) {
|
||||
// ricopia da Template:
|
||||
let myscheda = globalStore.sovrascriviSchedaFromTemplate(
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,6 +60,7 @@ async function getConfig(id: any) {
|
||||
|
||||
export const useGlobalStore = defineStore('GlobalStore', {
|
||||
state: (): IGlobalState => ({
|
||||
showHeader: true,
|
||||
finishLoading: false,
|
||||
conta: 0,
|
||||
wasAlreadySubscribed: false,
|
||||
@@ -230,9 +231,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
myschedatocopy.scheda._id = origScheda.scheda?._id;
|
||||
myschedatocopy.scheda.isTemplate = false;
|
||||
myschedatocopy.scheda.name = precname;
|
||||
myschedatocopy.scheda.linkIdTemplatePerStampa =
|
||||
origScheda.scheda?.linkIdTemplatePerStampa;
|
||||
myschedatocopy.scheda.linkIdTemplate = origScheda.scheda?.linkIdTemplate;
|
||||
myschedatocopy.scheda.scalexscheda = origScheda.scheda?.scalexscheda;
|
||||
myschedatocopy.scheda.scaleyscheda = origScheda.scheda?.scaleyscheda;
|
||||
|
||||
return myschedatocopy.scheda;
|
||||
}
|
||||
@@ -254,8 +255,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
// myelemtocopy.scheda._id = origScheda.scheda?._id;
|
||||
myelemtocopy.catalogo.dimensioni_def.isTemplate = false;
|
||||
myelemtocopy.catalogo.dimensioni_def.name = precname;
|
||||
myelemtocopy.catalogo.dimensioni_def.linkIdTemplatePerStampa =
|
||||
origDimensioni.linkIdTemplatePerStampa;
|
||||
myelemtocopy.catalogo.dimensioni_def.linkIdTemplate = origDimensioni.linkIdTemplate;
|
||||
|
||||
return myelemtocopy.catalogo;
|
||||
@@ -273,19 +272,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
const myelemtocopy = tools.jsonCopy(myfindelem);
|
||||
|
||||
if (myelemtocopy) {
|
||||
const linkIdTemplate =
|
||||
myelemtocopy.catalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
|
||||
? myelemtocopy.catalogo.print_linkIdTemplate
|
||||
: myelemtocopy.catalogo.print_linkIdTemplatePerStampa;
|
||||
// myelemtocopy.scheda._id = origScheda.scheda?._id;
|
||||
const linkIdTemplate = myelemtocopy.catalogo.print_linkIdTemplate
|
||||
myelemtocopy.catalogo.print_isTemplate = false;
|
||||
if (
|
||||
myelemtocopy.catalogo.selectedVersionStampabile === shared_consts.PREPARA_PDF.STAMPA
|
||||
)
|
||||
myelemtocopy.catalogo.print_linkIdTemplatePerStampa = linkIdTemplate;
|
||||
else {
|
||||
myelemtocopy.catalogo.print_linkIdTemplate = linkIdTemplate;
|
||||
}
|
||||
myelemtocopy.catalogo.print_linkIdTemplate = linkIdTemplate;
|
||||
|
||||
return myelemtocopy.catalogo;
|
||||
}
|
||||
@@ -2615,6 +2604,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
createCatalogoVuoto(): IOptCatalogo {
|
||||
return {
|
||||
idCatalogSel: '',
|
||||
productTypes: [0],
|
||||
excludeproductTypes: [],
|
||||
idTipologie: [],
|
||||
@@ -2625,14 +2615,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
dimensioni_def: {
|
||||
isTemplate: false,
|
||||
linkIdTemplate: '',
|
||||
linkIdTemplatePerStampa: '',
|
||||
name: '',
|
||||
pagina: tools.resetRecIDimensioni(null),
|
||||
},
|
||||
areadistampa: tools.resetRecIAreaDiStampa(null),
|
||||
print_isTemplate: false,
|
||||
print_linkIdTemplate: '',
|
||||
print_linkIdTemplatePerStampa: '',
|
||||
};
|
||||
},
|
||||
createRaccoltaCataloghiVuoto(): IOptCatalogo {
|
||||
@@ -2647,14 +2635,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
dimensioni_def: {
|
||||
isTemplate: false,
|
||||
linkIdTemplate: '',
|
||||
linkIdTemplatePerStampa: '',
|
||||
name: '',
|
||||
pagina: tools.resetRecIDimensioni(null),
|
||||
},
|
||||
areadistampa: tools.resetRecIAreaDiStampa(null),
|
||||
print_isTemplate: false,
|
||||
print_linkIdTemplate: '',
|
||||
print_linkIdTemplatePerStampa: '',
|
||||
};
|
||||
},
|
||||
|
||||
@@ -3086,5 +3072,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
setshowHeader(value: boolean) {
|
||||
this.showHeader = value
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
@@ -8,23 +8,23 @@
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (TUTTE)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', {tutte: true})"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', { tutte: true })"
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (Parte 1)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte1: true})"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', { parte1: true })"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (Parte 2)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte2: true})"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', { parte2: true })"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (Parte 3)"
|
||||
color="positive"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', {parte3: true})"
|
||||
@click="EseguiFunz('MigrateMSSQLToMongoDb', { parte3: true })"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Migrazione del DB MSSQL su MongoDB (ALCUNE)"
|
||||
@@ -41,21 +41,27 @@
|
||||
color="positive"
|
||||
@click="EseguiFunz('UpdateCatDeleteEmpty')"
|
||||
></q-btn>
|
||||
<br><br>
|
||||
<br /><br />
|
||||
<q-btn
|
||||
label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER"
|
||||
color="accent"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: false, caricatutti: true})"
|
||||
@click="EseguiFunz('updateAllBook', { usaDBGMLocale: false, caricatutti: true })"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Riaggiorna TUTTI gli ARTICOLI da GM SERVER e Rimuovi Cancellati !"
|
||||
color="negative"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: false, caricatutti: true, rimuovieventualiCancellati: true})"
|
||||
@click="
|
||||
EseguiFunz('updateAllBook', {
|
||||
usaDBGMLocale: false,
|
||||
caricatutti: true,
|
||||
rimuovieventualiCancellati: true,
|
||||
})
|
||||
"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Riaggiorna TUTTI gli ARTICOLI dal DB Locale Importato"
|
||||
color="accent"
|
||||
@click="EseguiFunz('updateAllBook', {usaDBGMLocale: true, caricatutti: true})"
|
||||
@click="EseguiFunz('updateAllBook', { usaDBGMLocale: true, caricatutti: true })"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Statistiche Macro"
|
||||
@@ -85,7 +91,9 @@
|
||||
<q-btn
|
||||
label="Esporta CSV Dati Mancanti (num.pagine, formato, DataPubbl.)"
|
||||
color="primary"
|
||||
@click="EseguiFunz('ScraperGeneraCSV', {generateCSV: true, filename: 'dati_mancanti'})"
|
||||
@click="
|
||||
EseguiFunz('ScraperGeneraCSV', { generateCSV: true, filename: 'dati_mancanti' })
|
||||
"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Rimuove Duplicati di ArrVariazioni !"
|
||||
@@ -102,6 +110,19 @@
|
||||
color="primary"
|
||||
@click="EseguiFunz('ScraperAzzeraFlagErrori')"
|
||||
></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
|
||||
|
||||
@@ -61,57 +61,57 @@ body {
|
||||
font-family: 'DINPro-Condensed-Bold', sans-serif;
|
||||
color: $colore_titolo_libro;
|
||||
text-transform: uppercase;
|
||||
margin-top: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalog) * 1px);
|
||||
margin-top: calc(5 * var(--scalecatalogy) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalogx) * 1px);
|
||||
line-height: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.book-author {
|
||||
font-family: 'DINPro-Condensed-Regular', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-descr {
|
||||
font-family: 'DINPro-Condensed-Bold-Italic', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-details {
|
||||
font-family: 'DINPro-Condensed-Regular', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
text-align: left !important;
|
||||
|
||||
&.big {
|
||||
font-size: calc(22 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(22 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.book-descr-estesa {
|
||||
font-family: 'AGaramondPro-Regular', sans-serif;
|
||||
font-size: calc(15 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(15 * var(--scalecatalogx) * 1px);
|
||||
text-align: justify;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.book-link {
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(14 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-novita {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
|
||||
.book-text-up {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
height: calc(380 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalogx) * 1px);
|
||||
height: calc(380 * var(--scalecatalogy) * 1px);
|
||||
line-height: 130%;
|
||||
font-weight: bold;
|
||||
|
||||
@@ -122,22 +122,22 @@ body {
|
||||
|
||||
.book-text-down {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
}
|
||||
|
||||
.book-pagina-title {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-top: calc(50 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(0 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(30 * var(--scalecatalog) * 1px);
|
||||
height: calc(50 * var(--scalecatalog) * 1px);
|
||||
margin-top: calc(50 * var(--scalecatalogy) * 1px);
|
||||
margin-bottom: calc(0 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(30 * var(--scalecatalogx) * 1px);
|
||||
height: calc(50 * var(--scalecatalogy) * 1px);
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.book-pagina-title-footer {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px) !important;
|
||||
font-size: calc(20 * var(--scalecatalogx) * 1px) !important;
|
||||
font-weight: bold;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,15 @@
|
||||
<q-page>
|
||||
<div>
|
||||
<div
|
||||
v-if="ispageCatalogata"
|
||||
v-if="ispageCatalogata && !optcatalogo.showOnlyCatalogoPDF"
|
||||
class="text-bold text-h6 text-center text-blue"
|
||||
>
|
||||
{{ getTitoloCatalogo() }}
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
ispageCatalogata &&
|
||||
(tools.isEditor() || tools.isCommerciale()) &&
|
||||
ispageCatalogata && !optcatalogo.showOnlyCatalogoPDF
|
||||
&& (tools.isEditor() || tools.isCommerciale()) &&
|
||||
myCatalog?.referenti?.length > 0
|
||||
"
|
||||
class="text-h7 text-center text-red q-ma-sm"
|
||||
@@ -19,6 +19,7 @@
|
||||
<span class="text-bold">{{ getReferentiCatalogo() }}</span>
|
||||
</div>
|
||||
<q-tabs
|
||||
v-if="!optcatalogo.showOnlyCatalogoPDF"
|
||||
v-model="tabcatalogo"
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
@@ -77,7 +78,6 @@
|
||||
<q-tab-panels
|
||||
v-model="tabcatalogo"
|
||||
animated
|
||||
class=""
|
||||
keep-alive
|
||||
>
|
||||
<q-tab-panel
|
||||
@@ -135,7 +135,7 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!generatinglist"
|
||||
v-if="!generatinglist && !optcatalogo.showOnlyCatalogoPDF"
|
||||
class="text-center q-py-sm prod_trov"
|
||||
>
|
||||
<div
|
||||
@@ -248,13 +248,14 @@
|
||||
<q-tab-panel
|
||||
name="visu"
|
||||
v-if="optcatalogo"
|
||||
:style="{ 'padding': optcatalogo.showOnlyCatalogoPDF ? '0px !important' : '' }"
|
||||
>
|
||||
<q-inner-loading
|
||||
id="spinner"
|
||||
:showing="generatinglist"
|
||||
>
|
||||
</q-inner-loading>
|
||||
<div class="row justify-center q-mx-auto bg-blue-1">
|
||||
<div class="">
|
||||
<div class="text-center">
|
||||
<q-spinner
|
||||
v-if="ismounting"
|
||||
@@ -267,7 +268,7 @@
|
||||
v-if="!ismounting"
|
||||
class="panel"
|
||||
>
|
||||
<div class="container">
|
||||
<div :class="{container: !optcatalogo.showOnlyCatalogoPDF}">
|
||||
<q-tabs
|
||||
v-model="tabvisu"
|
||||
dense
|
||||
@@ -315,6 +316,7 @@
|
||||
</q-tabs>
|
||||
|
||||
<CTitleBanner
|
||||
v-if="!optcatalogo.showOnlyCatalogoPDF"
|
||||
v-show="tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0"
|
||||
class="q-pa-xs"
|
||||
title="Genera PDF"
|
||||
@@ -349,7 +351,6 @@
|
||||
{ label: 'Versione Stampabile', value: shared_consts.PREPARA_PDF.STAMPA },
|
||||
]"
|
||||
label="Seleziona Versione"
|
||||
:disable="true"
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 300px"
|
||||
@@ -375,30 +376,82 @@
|
||||
:push="optcatalogo.indebug"
|
||||
:color="optcatalogo.indebug ? `positive` : 'primary'"
|
||||
></q-btn>
|
||||
<q-input
|
||||
v-if="optcatalogo.pdf && optcatalogo.indebug"
|
||||
@update:model-value="modifElem"
|
||||
v-model="ratioconvert"
|
||||
label="Ratio Convert"
|
||||
type="number"
|
||||
step="0.01"
|
||||
outlined
|
||||
dense
|
||||
style="width: 100px; margin-right: 10px"
|
||||
></q-input>
|
||||
<q-btn
|
||||
v-if="
|
||||
optcatalogo.pdf &&
|
||||
!optcatalogo.generazionePDFInCorso &&
|
||||
optcatalogo.indebug
|
||||
"
|
||||
:label="`CONVERTI VALORI`"
|
||||
@click="convertiValori"
|
||||
></q-btn>
|
||||
<div
|
||||
v-if="optcatalogo.indebug"
|
||||
class="row justify-center"
|
||||
>
|
||||
<br />
|
||||
<q-input
|
||||
v-if="
|
||||
optcatalogo.pdf &&
|
||||
!optcatalogo.generazionePDFInCorso &&
|
||||
optcatalogo.indebug
|
||||
"
|
||||
@update:model-value="modifElem"
|
||||
v-model="ratioconvert"
|
||||
label="Ratio Convert"
|
||||
type="number"
|
||||
step="0.01"
|
||||
outlined
|
||||
dense
|
||||
style="width: 100px; margin-right: 10px"
|
||||
></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>
|
||||
<CTitleBanner
|
||||
v-show="
|
||||
tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0
|
||||
tabcatalogo === 'visu' && tools.isAdmin() && arrProducts?.length > 0
|
||||
"
|
||||
class="q-pa-xs"
|
||||
title="Configurazione"
|
||||
@@ -438,11 +491,31 @@
|
||||
rounded
|
||||
style="width: 200px"
|
||||
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"
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Scale:"
|
||||
label="Scale X:"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
@@ -451,11 +524,37 @@
|
||||
rounded
|
||||
style="width: 200px"
|
||||
outlined
|
||||
v-model="optcatalogo.areadistampa.scale_printable"
|
||||
v-model="optcatalogo.areadistampa.scaley"
|
||||
:options="tools.SelectListScalePDF"
|
||||
@update:model-value="modifElem"
|
||||
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
|
||||
map-options
|
||||
>
|
||||
@@ -521,121 +620,125 @@
|
||||
<div v-if="strout">
|
||||
{{ strout }}
|
||||
</div>
|
||||
<div v-if="myCatalog">
|
||||
<div
|
||||
v-if="myCatalog.pdf_generato"
|
||||
class="bg-green-1 q-ma-sm q-pa-sm"
|
||||
>
|
||||
<div class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm">
|
||||
<strong>PDF generati Temporanei</strong>
|
||||
</div>
|
||||
|
||||
<q-table
|
||||
:rows="pdfRows"
|
||||
:columns="pdfColumns"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
row-key="name"
|
||||
<CTitleBanner
|
||||
v-show="
|
||||
tabcatalogo === 'visu' && !tools.isUtente() && arrProducts?.length > 0
|
||||
"
|
||||
class="q-pa-xs"
|
||||
title="Lista PDF"
|
||||
bgcolor="bg-blue"
|
||||
clcolor="text-white"
|
||||
mystyle=""
|
||||
myclass="myshad"
|
||||
:canopen="true"
|
||||
:visible="true"
|
||||
>
|
||||
<div v-if="myCatalog">
|
||||
<div
|
||||
v-if="myCatalog.pdf_generato"
|
||||
class="bg-green-1 q-ma-sm q-pa-sm"
|
||||
>
|
||||
<template v-slot:body-cell-pdf="props">
|
||||
<q-td :props="props">
|
||||
<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 class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm">
|
||||
<strong>PDF generati Temporanei</strong>
|
||||
</div>
|
||||
|
||||
<table class="q-table q-table--flat q-table--dense q-ma-none q-pa-none">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>PDF OnLine:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
v-if="myCatalog.pdf_online"
|
||||
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
|
||||
target="_blank"
|
||||
class="text-bold"
|
||||
>
|
||||
{{ tools.getURLByHostAndFilePath(myCatalog.pdf_online) }}
|
||||
</a>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ myCatalog.pdf_online_size }} MB
|
||||
</td>
|
||||
<td>
|
||||
{{ tools.getstrDateTime(myCatalog.data_online) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>PDF OnLine Stampa:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
v-if="myCatalog.pdf_online_stampa"
|
||||
:href="
|
||||
tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa)
|
||||
"
|
||||
target="_blank"
|
||||
class="text-bold"
|
||||
>
|
||||
{{ tools.getURLByHostAndFilePath(myCatalog.pdf_online_stampa) }}
|
||||
</a>
|
||||
<span v-else>-</span>
|
||||
</td>
|
||||
<td>
|
||||
{{ myCatalog.pdf_online_stampa_size }} MB
|
||||
</td>
|
||||
<td>
|
||||
{{ tools.getstrDateTime(myCatalog.data_online_stampa) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<q-table
|
||||
:rows="pdfRows"
|
||||
:columns="pdfColumns"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
row-key="name"
|
||||
>
|
||||
<template v-slot:body-cell-name="props">
|
||||
<q-td :props="props">
|
||||
<a
|
||||
v-if="props.row.pdf"
|
||||
:href="tools.getURLByHostAndFilePath(props.row.pdf)"
|
||||
target="_blank"
|
||||
class="text-bold"
|
||||
>
|
||||
{{ props.row.name }}
|
||||
</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>
|
||||
|
||||
<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>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
|
||||
@@ -803,9 +906,9 @@
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
<div class="text-center q-py-sm prod_trov">
|
||||
<div class="text-center q-py-sm prod_trov" v-if="!optcatalogo.showOnlyCatalogoPDF">
|
||||
<div
|
||||
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata"
|
||||
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata && !optcatalogo.showOnlyCatalogoPDF"
|
||||
class="row justify-center text-h6"
|
||||
>
|
||||
Seleziona {{ filtroStrApplicato }}
|
||||
@@ -918,6 +1021,7 @@
|
||||
<div
|
||||
v-else
|
||||
class="cards-container"
|
||||
id="tag-catalogo"
|
||||
>
|
||||
<!-- Itera sulle schede -->
|
||||
<div
|
||||
@@ -940,10 +1044,18 @@
|
||||
}"
|
||||
:style="generateStylePageScheda(optcatalogo, recscheda.scheda)"
|
||||
>
|
||||
<!--style {{generateStylePageScheda(optcatalogo, recscheda.scheda)}}-->
|
||||
<div
|
||||
v-if="recscheda.scheda.dimensioni.pagina?.testo_title?.contenuto"
|
||||
:style="{
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'--scalecatalogy': tools.getScaleY(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_title?.font
|
||||
.line_height,
|
||||
@@ -970,7 +1082,14 @@
|
||||
<div
|
||||
v-if="recscheda.scheda.dimensioni.pagina?.testo_up?.contenuto"
|
||||
:style="{
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'--scalecatalogy': tools.getScaleY(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_up?.font
|
||||
.line_height,
|
||||
@@ -988,13 +1107,20 @@
|
||||
<div
|
||||
v-if="recscheda.scheda?.dimensioni?.pagina?.testo_title"
|
||||
:style="{
|
||||
'--scalecatalog': tools.getScale(optcatalogo),
|
||||
'--scalecatalogx': tools.getScaleX(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'--scalecatalogy': tools.getScaleY(
|
||||
optcatalogo,
|
||||
recscheda.scheda
|
||||
),
|
||||
'line-height':
|
||||
recscheda.scheda.dimensioni.pagina?.testo_title?.font
|
||||
.line_height,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
position: 'absolute', // Posizione assoluta rispetto al contenitore padre
|
||||
position: 'absolute', // Posizione assoluta rispetto al contenitore padre
|
||||
bottom: '2.2%', // Posiziona in basso
|
||||
left: '50%', // Centra orizzontalmente
|
||||
transform: 'translateX(-50%)', // Correzione per centrare perfettamente
|
||||
@@ -1009,8 +1135,17 @@
|
||||
</div>
|
||||
|
||||
<div v-if="optcatalogo.indebug">
|
||||
isStampa: {{ isStampa }} generazionePDFInCorso:
|
||||
{{ optcatalogo.generazionePDFInCorso }} getScaleX:
|
||||
{{ tools.getScaleX(optcatalogo, recscheda.scheda) }} getScaleY:
|
||||
{{ tools.getScaleY(optcatalogo, recscheda.scheda) }}
|
||||
IMG:
|
||||
{{ getImgIntroCatalogo(recscheda.scheda) }}
|
||||
<span v-if="getTestoIntroduttivo(recscheda)">
|
||||
{{ getImgIntroCatalogo(recscheda.scheda) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ getSfondoImgCatalogo(recscheda.scheda) }}
|
||||
</span>
|
||||
num: {{ page.length }}
|
||||
</div>
|
||||
|
||||
@@ -1073,7 +1208,14 @@
|
||||
>
|
||||
<q-separator
|
||||
inset
|
||||
:size="tools.adjustSize(optcatalogo, '1px')"
|
||||
:size="
|
||||
tools.adjustSize(
|
||||
optcatalogo,
|
||||
'1px',
|
||||
recscheda.scheda,
|
||||
true
|
||||
)
|
||||
"
|
||||
></q-separator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -61,71 +61,71 @@ body {
|
||||
font-family: 'DINPro-Condensed-Bold', sans-serif;
|
||||
color: $colore_titolo_libro;
|
||||
text-transform: uppercase;
|
||||
margin-top: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalog) * 1px);
|
||||
margin-top: calc(5 * var(--scalecatalogy) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalogx) * 1px);
|
||||
line-height: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.book-author {
|
||||
font-family: 'DINPro-Condensed-Regular', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-descr {
|
||||
font-family: 'DINPro-Condensed-Bold-Italic', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-details {
|
||||
font-family: 'DINPro-Condensed-Regular', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(16 * var(--scalecatalogx) * 1px);
|
||||
text-align: left !important;
|
||||
|
||||
&.big {
|
||||
font-size: calc(22 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(22 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.book-descr-estesa {
|
||||
font-family: 'AGaramondPro-Regular', sans-serif;
|
||||
font-size: calc(15 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(15 * var(--scalecatalogx) * 1px);
|
||||
text-align: justify;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.book-link {
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(14 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
.book-novita {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalogx) * 1px);
|
||||
}
|
||||
|
||||
|
||||
.book-text-up {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
height: calc(380 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalogx) * 1px);
|
||||
height: calc(380 * var(--scalecatalogy) * 1px);
|
||||
line-height: 130%;
|
||||
}
|
||||
|
||||
.book-text-down {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
}
|
||||
|
||||
.book-pagina-title {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-top: calc(20 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(35 * var(--scalecatalog) * 1px);
|
||||
height: calc(100 * var(--scalecatalog) * 1px);
|
||||
margin-top: calc(20 * var(--scalecatalogy) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalogy) * 1px);
|
||||
font-size: calc(35 * var(--scalecatalogx) * 1px);
|
||||
height: calc(100 * var(--scalecatalogy) * 1px);
|
||||
}
|
||||
|
||||
.categories {
|
||||
|
||||
@@ -88,7 +88,7 @@ export default defineComponent({
|
||||
|
||||
const widthpdf = ref('8.88');
|
||||
const heightpdf = ref('12.31');
|
||||
const compressionepdf = ref('prepress');
|
||||
const compressionepdf = ref('printer');
|
||||
|
||||
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user