- anche la versione file compressa del PDF ora è ok.

This commit is contained in:
Surya Paolo
2025-05-29 19:19:35 +02:00
parent 67aaf719f4
commit 5ba3bef8a1
5 changed files with 16 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ 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, useRoute } from 'vue-router';
export default defineComponent({ export default defineComponent({
name: 'CMyPageElem', name: 'CMyPageElem',
@@ -78,6 +78,7 @@ export default defineComponent({
const { t } = useI18n(); const { t } = useI18n();
const globalStore = useGlobalStore(); const globalStore = useGlobalStore();
const $router = useRouter(); const $router = useRouter();
const $route = useRoute()
const mywidthEditor = ref(400); const mywidthEditor = ref(400);
@@ -114,6 +115,10 @@ export default defineComponent({
else return null; else return null;
}); });
const hideHeader = computed(() => {
return rec.value?.hideHeader || $route.query?.hideHeader;
});
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'));
@@ -121,7 +126,7 @@ export default defineComponent({
onloading.value = true; onloading.value = true;
await globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then((ris) => { await globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then((ris) => {
rec.value = ris; rec.value = ris;
if (ris && ris.hideHeader) { if (ris && hideHeader.value) {
globalStore.setshowHeader(false); globalStore.setshowHeader(false);
} }
@@ -220,6 +225,7 @@ export default defineComponent({
duplicatePage, duplicatePage,
showexportPage, showexportPage,
showimportPage, showimportPage,
hideHeader,
}; };
}, },
}); });

View File

@@ -68,8 +68,8 @@
</q-drawer> </q-drawer>
<div <div
:class="{ 'q-gutter-xs': !rec.hideHeader }" :class="{ 'q-gutter-xs': !hideHeader }"
:style="[{'margin-left': rec.hideHeader ? 0 : 1 + 'px', 'margin-right': rec.hideHeader ? 0 : 1 + 'px' }]" :style="[{'margin-left': hideHeader ? 0 : 1 + 'px', 'margin-right': hideHeader ? 0 : 1 + 'px' }]"
> >
<div <div
v-if="!!rec.img1" v-if="!!rec.img1"

View File

@@ -116,6 +116,7 @@
@click=" @click="
EseguiFunz('GeneraPdfCatalogo', { EseguiFunz('GeneraPdfCatalogo', {
idCatalog: '605c72e2f9b1a019c1e4f4ac', idCatalog: '605c72e2f9b1a019c1e4f4ac',
comprimi: true,
stampa: true, stampa: true,
path: 'upload/cataloghi/', path: 'upload/cataloghi/',
idtag_pdfcontent: 'tag-catalogo', idtag_pdfcontent: 'tag-catalogo',

View File

@@ -2531,8 +2531,10 @@ export default defineComponent({
const ris = await userStore.eseguiFunzSulServer({ const ris = await userStore.eseguiFunzSulServer({
dbop: 'GeneraPdfCatalogo', dbop: 'GeneraPdfCatalogo',
options: { options: {
idCatalog: '605c72e2f9b1a019c1e4f4ac', idCatalog: myCatalog.value._id,
stampa: instampa, stampa: instampa,
comprimi: true,
compressione: 'printer',
path: 'upload/cataloghi/', path: 'upload/cataloghi/',
// idtag_pdfcontent: 'tag-catalogo', // idtag_pdfcontent: 'tag-catalogo',
compressione: 'printer', compressione: 'printer',

View File

@@ -705,7 +705,7 @@
:href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)" :href="tools.getURLByHostAndFilePath(myCatalog.pdf_online)"
target="_blank" target="_blank"
class="text-bold" class="text-bold"
>PDF OnLine:</a >PDF OnLine</a
></strong ></strong
> >
</td> </td>
@@ -724,7 +724,7 @@
" "
target="_blank" target="_blank"
class="text-bold" class="text-bold"
>PDF OnLine Stampa:</a >PDF OnLine Stampa</a
></strong ></strong
> >
</td> </td>