ver: 1.1.21:
- Lista dei Cataloghi - Gestione Cataloghi in base alla configurazione
This commit is contained in:
@@ -59,24 +59,25 @@ export default defineComponent({
|
||||
const tokenList = [
|
||||
{ label: '50 Token', value: 50 },
|
||||
{ label: '100 Token', value: 100 },
|
||||
{ label: '200 Token', value: 200 },
|
||||
{ label: '500 Token', value: 500 },
|
||||
{ label: '1000 Token', value: 1000 },
|
||||
{ label: '2500 Token', value: 2500 },
|
||||
{ label: '4000 Token', value: 4000 },
|
||||
{ label: '5000 Token', value: 5000 },
|
||||
{ label: '10000 Token', value: 10000 },
|
||||
{ label: '200 Token', value: 200 },
|
||||
{ label: '500 Token', value: 500 },
|
||||
{ label: '1000 Token', value: 1000 },
|
||||
{ label: '2500 Token', value: 2500 },
|
||||
{ label: '4000 Token', value: 4000 },
|
||||
{ label: '5000 Token', value: 5000 },
|
||||
{ label: '10000 Token', value: 10000 },
|
||||
]
|
||||
|
||||
const model = ref('deepseek-chat')
|
||||
const max_tokens = ref(100)
|
||||
const max_tokens = ref(50)
|
||||
const outputType = ref('')
|
||||
const temp = ref(0.3)
|
||||
const temperatura = ref(0.3)
|
||||
const stream = ref(false)
|
||||
const contestsystem = ref('')
|
||||
|
||||
const inputPrompt = ref('');
|
||||
const result = ref('');
|
||||
const outputvisibile = ref('');
|
||||
const isLoading = ref(false);
|
||||
const errorMessage = ref('');
|
||||
const finish_reason = ref('');
|
||||
@@ -95,56 +96,138 @@ export default defineComponent({
|
||||
|
||||
querylist.value = globalStore.getQueryAI()
|
||||
|
||||
outputType.value = outputTypeList[0].value
|
||||
model.value = tools.getCookie('AI_MOD', 'deepseek-chat')
|
||||
max_tokens.value = tools.getCookie('AI_MT', 50, true)
|
||||
withexplain.value = tools.getCookie('AI_WS', '0') === '1'
|
||||
outputType.value = tools.getCookie('AI_OT', outputTypeList[0].value)
|
||||
temperatura.value = tools.convstrToNum(tools.getCookie('AI_TEM', '0.3'))
|
||||
stream.value = tools.getCookie('AI_ST', '0') === '1'
|
||||
contestsystem.value = tools.getCookie('AI_CON', '')
|
||||
inputPrompt.value = tools.getCookie('AI_PRO', '')
|
||||
|
||||
}
|
||||
|
||||
function getInput() {
|
||||
return "Prompt:\n" + inputPrompt.value + '\n\nRisposta:\n'
|
||||
}
|
||||
|
||||
async function handleSubmit() {
|
||||
isLoading.value = true;
|
||||
errorMessage.value = '';
|
||||
if (outputvisibile.value) {
|
||||
outputvisibile.value += '\n\n'
|
||||
}
|
||||
outputvisibile.value += getInput();
|
||||
result.value = '';
|
||||
finish_reason.value = '';
|
||||
|
||||
|
||||
tools.setCookie('AI_MOD', model.value)
|
||||
tools.setCookie('AI_MT', max_tokens.value.toString())
|
||||
tools.setCookie('AI_OT', outputType.value)
|
||||
tools.setCookie('AI_TEM', temperatura.value.toString())
|
||||
tools.setCookie('AI_ST', stream.value ? '1' : '0')
|
||||
tools.setCookie('AI_WE', withexplain.value ? '1' : '0')
|
||||
tools.setCookie('AI_CON', contestsystem.value)
|
||||
tools.setCookie('AI_PRO', inputPrompt.value)
|
||||
|
||||
options.value = {
|
||||
model: model.value,
|
||||
max_tokens: max_tokens.value,
|
||||
temp: temp.value,
|
||||
temp: temperatura.value,
|
||||
stream: stream.value,
|
||||
withexplain: withexplain.value,
|
||||
}
|
||||
outputType: outputType.value,
|
||||
};
|
||||
|
||||
try {
|
||||
if (options.value.stream) {
|
||||
// Modalità streaming
|
||||
const response = await globalStore.getQueryDS(inputPrompt.value, options.value);
|
||||
|
||||
const resdata = await globalStore.getQueryDS(inputPrompt.value, options.value)
|
||||
console.log('uscita da getQueryDS')
|
||||
|
||||
if (resdata.code === serv_constants.RIS_CODE_OK) {
|
||||
if (resdata.choice) {
|
||||
finish_reason.value = resdata.choice.finish_reason || ''
|
||||
isLoading.value = false;
|
||||
|
||||
// Leggi il flusso di dati
|
||||
const reader = response.data.getReader();
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
|
||||
while (true) {
|
||||
const { done, value } = await reader.read();
|
||||
if (done) break;
|
||||
|
||||
// Decodifica il chunk e gestisci i dati
|
||||
const chunk = decoder.decode(value);
|
||||
console.log('Received chunk:', chunk); // Log del chunk ricevuto
|
||||
|
||||
const lines = chunk.split('\n\n').filter((line) => line.trim() !== '');
|
||||
|
||||
for (const line of lines) {
|
||||
if (line.startsWith('data: ')) {
|
||||
const data = JSON.parse(line.slice(6)); // Rimuovi "data: " e parsifica il JSON
|
||||
if (data.choice && data.choice.delta && data.choice.delta.content) {
|
||||
result.value += data.choice.delta.content || ''
|
||||
outputvisibile.value += data.choice.delta.content || ''
|
||||
}
|
||||
|
||||
/*errorMessage.value = data.error;
|
||||
$q.notify({
|
||||
color: 'negative',
|
||||
icon: 'error',
|
||||
message: 'Errore durante la richiesta',
|
||||
caption: errorMessage.value,
|
||||
});
|
||||
break; // Interrompi il ciclo in caso di errore
|
||||
}*/
|
||||
} else if (line.startsWith('data: [DONE]')) {
|
||||
const data = JSON.parse(line.slice(12)); // Rimuovi "data: " e parsifica il JSON
|
||||
if (data.choice && data.choice.finish_reason) {
|
||||
finish_reason.value = data.choice.finish_reason;
|
||||
}
|
||||
inputPrompt.value = '';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (resdata.choice.message) {
|
||||
result.value = resdata.choice.message.content || ''
|
||||
} else {
|
||||
// Modalità non streaming
|
||||
const resdata = await globalStore.getQueryDS(inputPrompt.value, options.value);
|
||||
|
||||
if (resdata.code === serv_constants.RIS_CODE_OK) {
|
||||
inputPrompt.value = '';
|
||||
if (resdata.choice) {
|
||||
finish_reason.value = resdata.choice.finish_reason || '';
|
||||
}
|
||||
if (resdata.choice.message) {
|
||||
result.value = resdata.choice.message.content || '';
|
||||
outputvisibile.value += result.value
|
||||
}
|
||||
} else if (resdata.code === serv_constants.RIS_CODE_ERR) {
|
||||
errorMessage.value = resdata.error.message || resdata.error;
|
||||
$q.notify({
|
||||
color: 'negative',
|
||||
icon: 'error',
|
||||
message: 'Errore durante la richiesta',
|
||||
caption: errorMessage.value,
|
||||
});
|
||||
}
|
||||
} else if (resdata.code === serv_constants.RIS_CODE_ERR) {
|
||||
errorMessage.value = resdata.error.message || resdata.error;
|
||||
$q.notify({
|
||||
color: 'negative',
|
||||
icon: 'error',
|
||||
message: 'Errore durante la richiesta',
|
||||
caption: errorMessage.value
|
||||
});
|
||||
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
errorMessage.value = error.response?.data?.error || error.message;
|
||||
$q.notify({
|
||||
color: 'negative',
|
||||
icon: 'error',
|
||||
message: 'Errore durante la richiesta',
|
||||
caption: errorMessage.value
|
||||
caption: errorMessage.value,
|
||||
});
|
||||
}
|
||||
|
||||
isLoading.value = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
const copyToClipboard = () => {
|
||||
@@ -164,7 +247,14 @@ export default defineComponent({
|
||||
icon: 'error',
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function submitPrompt(event: any) {
|
||||
|
||||
if (inputPrompt.value.trim()) { // Controlla che l'input non sia vuoto
|
||||
handleSubmit(); // Inviare la richiesta
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mount)
|
||||
|
||||
@@ -175,6 +265,7 @@ export default defineComponent({
|
||||
globalStore,
|
||||
inputPrompt,
|
||||
result,
|
||||
outputvisibile,
|
||||
isLoading,
|
||||
errorMessage,
|
||||
handleSubmit,
|
||||
@@ -193,6 +284,8 @@ export default defineComponent({
|
||||
withexplain,
|
||||
outputType,
|
||||
outputTypeList,
|
||||
temperatura,
|
||||
submitPrompt,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-page class="q-pa-md">
|
||||
<q-page class="q-mt-sm q-pa-sm">
|
||||
<div class="column text-center">
|
||||
<div class="row justify-center">
|
||||
<q-select
|
||||
@@ -60,10 +60,10 @@
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
v-model="temp"
|
||||
v-model="temperatura"
|
||||
style="min-width: 200px"
|
||||
:options="tempList"
|
||||
:label="t('queryai.temp') + `:`"
|
||||
:label="t('queryai.temperatura') + `:`"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="value"
|
||||
@@ -76,7 +76,7 @@
|
||||
v-model="outputType"
|
||||
style="min-width: 200px"
|
||||
:options="outputTypeList"
|
||||
:label="t('queryai.numtoken') + `:`"
|
||||
:label="t('queryai.outputType') + `:`"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="value"
|
||||
@@ -105,54 +105,35 @@
|
||||
<q-separator></q-separator>
|
||||
</div>
|
||||
|
||||
<div class="q-mt-md q-gutter-y-md">
|
||||
<q-form @submit.prevent="handleSubmit">
|
||||
<q-input
|
||||
v-model="inputPrompt"
|
||||
filled
|
||||
autogrow
|
||||
type="textarea"
|
||||
label="Inserisci la tua richiesta"
|
||||
hint="Scrivi qui il tuo prompt"
|
||||
class="q-mb-md"
|
||||
autofocus
|
||||
<q-card v-if="outputvisibile" class="q-mt-sm">
|
||||
<q-card-section>
|
||||
<q-scroll-area style="height: 300px">
|
||||
<pre class="response-content">{{ outputvisibile }}</pre>
|
||||
</q-scroll-area>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
label="Copia la Risposta"
|
||||
icon="content_copy"
|
||||
@click="copyToClipboard"
|
||||
v-tooltip="'Copia negli appunti'"
|
||||
/>
|
||||
<pre class="response-reason">Esito: {{ finish_reason }}</pre>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
:label="`Invia a ` + modelLabel"
|
||||
type="submit"
|
||||
color="primary"
|
||||
:loading="isLoading"
|
||||
icon="send"
|
||||
/>
|
||||
</div>
|
||||
</q-form>
|
||||
|
||||
MARKDOWN:
|
||||
<q-markdown :content="`L'altezza \( h \) di un triangolo isoscele con base 10 è \( h = \sqrt{l^2 - 25} \), dove \( l \) è la lunghezza dei lati congruenti.`" />
|
||||
|
||||
<q-card v-if="result" class="q-mt-md">
|
||||
<q-card-section>
|
||||
<div class="text-h6 row items-center justify-between">
|
||||
<span>Risposta</span>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
dense
|
||||
icon="content_copy"
|
||||
@click="copyToClipboard"
|
||||
v-tooltip="'Copia negli appunti'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-markdown :content="result" />
|
||||
<q-scroll-area style="height: 300px">
|
||||
<pre class="response-content">{{ result }}</pre>
|
||||
</q-scroll-area>
|
||||
<pre class="response-reason">Esito: {{ finish_reason }}</pre>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<div class="q-mt-md q-gutter-y-md">
|
||||
<q-input
|
||||
v-model="inputPrompt"
|
||||
filled
|
||||
autogrow
|
||||
type="textarea"
|
||||
label="Inserisci la tua richiesta"
|
||||
class="q-mb-md"
|
||||
autofocus
|
||||
@keydown.enter.prevent="submitPrompt"
|
||||
/>
|
||||
|
||||
<q-banner
|
||||
v-if="errorMessage"
|
||||
@@ -162,6 +143,18 @@ MARKDOWN:
|
||||
{{ errorMessage }}
|
||||
</q-banner>
|
||||
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
:label="`Invia a ` + modelLabel"
|
||||
type="submit"
|
||||
color="primary"
|
||||
:disable="!inputPrompt"
|
||||
:loading="isLoading"
|
||||
icon="send"
|
||||
@click="handleSubmit"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-inner-loading :showing="isLoading">
|
||||
<q-spinner-gears size="50px" color="primary" />
|
||||
<div class="q-mt-sm">Elaborazione richiesta...</div>
|
||||
|
||||
@@ -40,19 +40,19 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
height: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 100,
|
||||
default: '100',
|
||||
},
|
||||
gap: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 0,
|
||||
default: '0',
|
||||
},
|
||||
fontsize: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 16,
|
||||
default: '16',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
@@ -68,14 +68,14 @@ export default defineComponent({
|
||||
JsBarcode("#C" + value.value, value.value, {
|
||||
format: format.value,
|
||||
width: widthlines.value,
|
||||
height: height.value,
|
||||
height: tools.convstrToNum(height.value),
|
||||
displayValue: true,
|
||||
lineColor: "#000",
|
||||
font: "monospace",
|
||||
margin: 0,
|
||||
textMargin: 0,
|
||||
marginTop: 0,
|
||||
fontSize: fontsize.value,
|
||||
fontSize: tools.convstrToNum(fontsize.value),
|
||||
textPosition: "bottom",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
:prop_searchList="searchList"
|
||||
:defaultnewrec="tools.getdefaultnewrec(table)"
|
||||
labelBtnAddRow="NONE"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable()"
|
||||
labelBtnAddExtra="Aggiungi Catalogo"
|
||||
:extraparams="tools.extraparams(table, { myrecfiltertoggle })"
|
||||
:prop_showMap="false"
|
||||
:heightcarousel="heightcarousel"
|
||||
@clickButtBar="clickButtBar"
|
||||
:opt="{rowclass: true, widthcard: '170px', heightcard: '170px'}"
|
||||
:opt="{rowclass: true, widthcard: $q.screen.gt.xs ? '300px' : '170px', heightcard: $q.screen.gt.xs ? '300px' : '170px'}"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,11 @@ export default defineComponent({
|
||||
type: Object as PropType<IOptCatalogo>,
|
||||
required: true,
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()">
|
||||
<Catalogo v-model="localCatalogo" @updateCatalogo="updateCatalogoEmit()" :idPage="idPage">
|
||||
|
||||
</Catalogo>
|
||||
</div>
|
||||
|
||||
@@ -66,6 +66,11 @@ export default defineComponent({
|
||||
type: Object as PropType<IOptCatalogo>,
|
||||
required: true,
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
scheda: {
|
||||
type: Object as PropType<IMyScheda>,
|
||||
required: false,
|
||||
@@ -152,14 +157,16 @@ export default defineComponent({
|
||||
return products.replaceKeyWordsByProduct(
|
||||
optcatalogo.value,
|
||||
myproduct.value!,
|
||||
props.scheda!.testo_right!
|
||||
props.scheda!.testo_right!,
|
||||
props.idPage,
|
||||
)
|
||||
})
|
||||
const getTesto_Right_attaccato = computed(() => {
|
||||
return products.replaceKeyWordsByProduct(
|
||||
optcatalogo.value,
|
||||
myproduct.value!,
|
||||
props.scheda!.testo_right_attaccato!
|
||||
props.scheda!.testo_right_attaccato!,
|
||||
props.idPage,
|
||||
)
|
||||
})
|
||||
const getTesto_Debug = computed(() => {
|
||||
@@ -167,6 +174,7 @@ export default defineComponent({
|
||||
optcatalogo.value,
|
||||
myproduct.value!,
|
||||
{ contenuto: '{debug}', maxlength: 10000 },
|
||||
props.idPage,
|
||||
)
|
||||
})
|
||||
|
||||
@@ -174,7 +182,8 @@ export default defineComponent({
|
||||
return products.replaceKeyWordsByProduct(
|
||||
optcatalogo.value,
|
||||
myproduct.value!,
|
||||
props.scheda!.testo_bottom!
|
||||
props.scheda!.testo_bottom!,
|
||||
props.idPage,
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
:myproduct="myproduct"
|
||||
:optcatalogo="optcatalogo"
|
||||
:scheda="scheda"
|
||||
:idPage="idPage"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
@@ -163,6 +164,8 @@
|
||||
:myproduct="myproduct"
|
||||
:optcatalogo="optcatalogo"
|
||||
:show_at_right="scheda.barcode.show_at_right"
|
||||
:scheda="scheda"
|
||||
:idPage="idPage"
|
||||
>
|
||||
<div class="row no-wrap items-center">
|
||||
<div v-if="scheda.barcode && scheda.barcode.show">
|
||||
@@ -241,6 +244,7 @@
|
||||
:optcatalogo="optcatalogo"
|
||||
:scheda="scheda"
|
||||
:show_at_right="scheda.barcode.show_at_right"
|
||||
:idPage="idPage"
|
||||
>
|
||||
<div class="row no-wrap items-center">
|
||||
<div v-if="scheda.barcode && scheda.barcode.show">
|
||||
@@ -320,6 +324,7 @@
|
||||
:scheda="scheda"
|
||||
:myproduct="myproduct"
|
||||
:optcatalogo="optcatalogo"
|
||||
:idPage="idPage"
|
||||
></CText>
|
||||
<!--<div v-if="optcatalogo.indebug">testo: "{{ getTesto_Bottom }}"</div>-->
|
||||
</div>
|
||||
@@ -456,7 +461,7 @@
|
||||
></iframe>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<q-card-actions align="bottom">
|
||||
<q-card-actions align="center">
|
||||
<q-btn color="primary" label="Chiudi" @click="apriSchedaPDF = false" />
|
||||
</q-card-actions>
|
||||
</q-dialog>
|
||||
|
||||
@@ -51,6 +51,11 @@ export default defineComponent({
|
||||
type: Object as PropType<IOptCatalogo>,
|
||||
required: true,
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
scheda: {
|
||||
type: Object as PropType<IMyScheda>,
|
||||
required: false,
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
:id="id"
|
||||
:product="product"
|
||||
:complete="complete"
|
||||
:idPage="idPage"
|
||||
:cosa="cosa"
|
||||
:options="options"
|
||||
@selauthor="selauthor"
|
||||
@@ -33,6 +34,7 @@
|
||||
in_3d: true,
|
||||
}"
|
||||
v-model="optcatalogo"
|
||||
:idPage="idPage"
|
||||
@selauthor="selauthor"
|
||||
:scheda="scheda"
|
||||
>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
:prop_searchList="searchList"
|
||||
:defaultnewrec="tools.getdefaultnewrec(table)"
|
||||
labelBtnAddRow="NONE"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable()"
|
||||
:labelBtnAddExtra_OFF="noButtAdd ? `` : (ind >= 0) ? `Aggiungi ` + costanti.MAINCARDS[ind].strsingolo : ''"
|
||||
:labelBtnAddExtra="labelBtnAddExtra"
|
||||
:extraparams="tools.extraparams(table, {myrecfiltertoggle})"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
labelBtnAddRow="NONE"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable()"
|
||||
labelBtnAddExtra=""
|
||||
:extraparams="tools.extraparams(table, { myrecfiltertoggle })"
|
||||
:prop_showMap="showMap"
|
||||
|
||||
@@ -274,8 +274,9 @@ export default defineComponent({
|
||||
default: 0,
|
||||
},
|
||||
defaultnewrec: {
|
||||
type: Function,
|
||||
type: Object,
|
||||
required: false,
|
||||
default: {},
|
||||
},
|
||||
col_title: {
|
||||
type: String,
|
||||
@@ -1722,7 +1723,7 @@ export default defineComponent({
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
if (props.defaultnewrec) {
|
||||
if (!tools.isEmptyObject(props.defaultnewrec)) {
|
||||
// @ts-ignore
|
||||
newRecord.value = props.defaultnewrec
|
||||
} else {
|
||||
|
||||
@@ -18,6 +18,16 @@ export default defineComponent({
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
class_text: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
copy: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline" tabindex="0">
|
||||
{{ value }}
|
||||
<span :class="class_text" :style="`color: ` + color ">{{ value }}</span>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1640,6 +1640,14 @@
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<q-toggle
|
||||
v-model="recscheda.scheda.isPagIntro"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
:label="$t('scheda.isPagIntro')"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<q-input
|
||||
label="Nome Template"
|
||||
@update:model-value="modifElem"
|
||||
|
||||
@@ -34,12 +34,18 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
maxlength: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
|
||||
const editorRef = ref(<any>null)
|
||||
const editor = ref('')
|
||||
const characterCount = ref(0)
|
||||
|
||||
//const myvalue = toRef(props, 'value')
|
||||
const myvalue = ref('')
|
||||
@@ -126,8 +132,16 @@ export default defineComponent({
|
||||
|
||||
})
|
||||
|
||||
function getTextLength(html: string) {
|
||||
// Crea un elemento temporaneo per convertire HTML in testo
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = html; // Imposta l'HTML
|
||||
return div.innerText.length; // Restituisce la lunghezza del testo
|
||||
}
|
||||
|
||||
function changeval(newval: any) {
|
||||
// console.log('myEditor: changeval', newval)
|
||||
characterCount.value = getTextLength(newval)
|
||||
emit('update:value', newval)
|
||||
}
|
||||
|
||||
@@ -186,6 +200,8 @@ export default defineComponent({
|
||||
myvalue.value = props.value
|
||||
|
||||
showtools.value = tools.getCookie('showtools', '0') === '1'
|
||||
|
||||
characterCount.value = getTextLength(myvalue.value)
|
||||
}
|
||||
|
||||
function onPaste (evt: any) {
|
||||
@@ -228,6 +244,7 @@ export default defineComponent({
|
||||
onPaste,
|
||||
editorRef,
|
||||
showtools,
|
||||
characterCount,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar v-if="showButtons" class="bg-primary text-white" style="min-height: 30px;">
|
||||
<q-toolbar-title>
|
||||
Editor
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup @click="showeditor=false"></q-btn>
|
||||
<q-toolbar
|
||||
v-if="showButtons"
|
||||
class="bg-primary text-white"
|
||||
style="min-height: 30px"
|
||||
>
|
||||
<q-toolbar-title> Editor </q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
@click="showeditor = false"
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important;">
|
||||
|
||||
<q-card-section class="inset-shadow" style="padding: 4px !important">
|
||||
<CTitleBanner v-if="title" :title="title"></CTitleBanner>
|
||||
<form
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
>
|
||||
|
||||
<q-toggle v-model="showtools" :label="showtools ? $t('editor.hidetool') : $t('editor.showtool')" @click="tools.setCookie('showtools', showtools ? '1' : '0')"></q-toggle>
|
||||
<br>
|
||||
<form autocapitalize="off" autocomplete="off" spellcheck="false">
|
||||
<q-toggle
|
||||
v-model="showtools"
|
||||
:label="showtools ? $t('editor.hidetool') : $t('editor.showtool')"
|
||||
@click="tools.setCookie('showtools', showtools ? '1' : '0')"
|
||||
></q-toggle>
|
||||
<br />
|
||||
<q-btn v-if="showtools" rounded size="sm" color="primary">
|
||||
<q-icon name="colorize" class="cursor-pointer">
|
||||
<q-popup-proxy>
|
||||
@@ -38,17 +45,35 @@
|
||||
@update:model-value="changeval"
|
||||
@paste="onPaste"
|
||||
@keyup.enter.stop
|
||||
v-model="myvalue">
|
||||
v-model="myvalue"
|
||||
>
|
||||
</q-editor>
|
||||
<div v-if="maxlength" class="text-gray text-italic">Caratteri: {{ characterCount }} / {{ maxlength }}</div>
|
||||
</form>
|
||||
</q-card-section>
|
||||
<q-card-actions v-if="showButtons" align="center">
|
||||
<q-btn v-if="canModify" :label="$t('dialog.ok')" color="primary" @click="saveval"></q-btn>
|
||||
<q-btn v-if="canModify" flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn>
|
||||
<q-btn v-if="!canModify" :label="$t('dialog.ok')" color="primary" v-close-popup></q-btn>
|
||||
<q-btn
|
||||
v-if="canModify"
|
||||
:label="$t('dialog.ok')"
|
||||
color="primary"
|
||||
@click="saveval"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="canModify"
|
||||
flat
|
||||
:label="$t('dialog.cancel')"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
@click="annulla"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="!canModify"
|
||||
:label="$t('dialog.ok')"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -87,6 +87,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
editOn: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
|
||||
@@ -667,6 +667,7 @@
|
||||
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
|
||||
<CCatalogo
|
||||
v-model="myel.catalogo"
|
||||
:idPage="idPage"
|
||||
@updateCatalogo="updateCatalogoEmit()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
>
|
||||
<CMyElem
|
||||
:myelem="myelem"
|
||||
:idPage="rec._id"
|
||||
:editOn="editOn"
|
||||
:addOn="addOn"
|
||||
:path="!!rec.path ? rec.path : ''"
|
||||
@@ -123,6 +124,7 @@
|
||||
:myelem="myelem"
|
||||
:editOn="editOn"
|
||||
:addOn="addOn"
|
||||
:idPage="rec._id"
|
||||
:path="!!rec.path ? rec.path : ''"
|
||||
:selElem="selElem"
|
||||
@selElemClick="selElemClick"
|
||||
@@ -141,6 +143,7 @@
|
||||
:myelem="myelemVoid"
|
||||
:editOn="editOn"
|
||||
:addOn="addOn"
|
||||
:idPage="rec._id"
|
||||
:selElem="selElem"
|
||||
:path="rec.path"
|
||||
@selElemClick="selElemClick"
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
:myelem="myelem"
|
||||
:editOn="editOn"
|
||||
:addOn="addOn"
|
||||
:idPage="rec._id"
|
||||
:path="rec.path"
|
||||
:selElem="selElem"
|
||||
@selElemClick="selElemClick"
|
||||
@@ -77,6 +78,7 @@
|
||||
:myelem="myelemVoid"
|
||||
:editOn="editOn"
|
||||
:addOn="addOn"
|
||||
:idPage="rec._id"
|
||||
:selElem="selElem"
|
||||
:path="rec.path"
|
||||
@selElemClick="selElemClick"
|
||||
|
||||
@@ -1609,6 +1609,7 @@
|
||||
:canModify="canModify"
|
||||
@update:value="changevalRec"
|
||||
@showandsave="Savedb"
|
||||
:maxlength="col.maxlength"
|
||||
>
|
||||
</CMyEditor>
|
||||
</div>
|
||||
|
||||
@@ -69,13 +69,15 @@
|
||||
/* Arrotonda gli angoli dello sfondo */
|
||||
}
|
||||
|
||||
.text-h6 {
|
||||
font-family: 'Arial', sans-serif;
|
||||
/* Scegli un font accattivante e comune */
|
||||
font-size: 1.15rem;
|
||||
/* Dimensione del font modificabile */
|
||||
color: #FFF;
|
||||
/* Colore del testo */
|
||||
margin-top: auto;
|
||||
/* Assicura che il titolo sia posizionato alla base della scheda */
|
||||
|
||||
.clickable-image {
|
||||
cursor: pointer;
|
||||
/* Cambia il cursore a puntatore quando si passa sopra */
|
||||
transition: transform 0.2s;
|
||||
/* Aggiunge una transizione dolce */
|
||||
}
|
||||
|
||||
.clickable-image:hover {
|
||||
transform: scale(1.05);
|
||||
/* Aumenta leggermente l'immagine al passaggio del mouse */
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch, computed } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { IImgGallery, IOptGrid, IUserFields, IUserProfile } from 'model'
|
||||
import { ICatalog, IImgGallery, IOptGrid, IUserFields, IUserProfile } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -8,14 +8,18 @@ import { tools } from '@store/Modules/tools'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { CLabel } from '@/components/CLabel'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useCalendarStore } from '@src/store/CalendarStore'
|
||||
import { useGlobalStore } from '@src/store/globalStore'
|
||||
|
||||
import { ICollana, IPublisher } from "@src/model/Products"
|
||||
import { useProducts } from '@src/store/Products'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyRecCatalog',
|
||||
components: { CMyCardPopup },
|
||||
components: { CMyCardPopup, CLabel },
|
||||
emits: ['setCmd', 'cmdext'],
|
||||
props: {
|
||||
table: {
|
||||
@@ -53,12 +57,36 @@ export default defineComponent({
|
||||
const { t } = useI18n()
|
||||
const $router = useRouter()
|
||||
|
||||
const myrec = ref(<any>null)
|
||||
const myrec = ref(<ICatalog>{})
|
||||
|
||||
const statecolor = ref('negative')
|
||||
const apriInfo = ref(false)
|
||||
const collanestr = ref('')
|
||||
const editorestr = ref('')
|
||||
|
||||
const products = useProducts()
|
||||
|
||||
const visupage = ref(false)
|
||||
const disabilita = computed(() => {
|
||||
return props.table === shared_consts.TABLES_MYBACHECAS
|
||||
})
|
||||
})
|
||||
const esiste_descrintro = computed(() => {
|
||||
return myrec.value.descr_introduttiva && myrec.value.descr_introduttiva.length > 100
|
||||
})
|
||||
const pagina_collegata = computed(() => {
|
||||
|
||||
let linkpage = ''
|
||||
|
||||
let idpag = myrec.value.idPageAssigned
|
||||
if (idpag) {
|
||||
let mypage = globalStore.getPageById(idpag)
|
||||
if (mypage)
|
||||
linkpage = mypage.path!
|
||||
}
|
||||
|
||||
return linkpage
|
||||
|
||||
})
|
||||
|
||||
watch(() => props.prop_myrec, (newval, oldval) => {
|
||||
|
||||
@@ -70,6 +98,30 @@ export default defineComponent({
|
||||
if (props.prop_myrec) {
|
||||
myrec.value = props.prop_myrec
|
||||
}
|
||||
|
||||
collanestr.value = ''
|
||||
if (myrec.value.idCollane) {
|
||||
for (const idcollana of myrec.value.idCollane!) {
|
||||
const reccoll: ICollana = products.collane!.find((coll: ICollana) => coll.idCollana === idcollana)
|
||||
collanestr.value += reccoll.title + ' '
|
||||
}
|
||||
}
|
||||
editorestr.value = ''
|
||||
if (myrec.value.editore) {
|
||||
for (const receditore of myrec.value.editore!) {
|
||||
const rectrovato: IPublisher = products.publishers!.find((editore: IPublisher) => editore._id === receditore)
|
||||
editorestr.value += rectrovato!.name + ' '
|
||||
}
|
||||
}
|
||||
|
||||
statecolor.value = 'negative'
|
||||
|
||||
if (myrec.value.descr_introduttiva && myrec.value.img_bordata?.imagefile && myrec.value.img_intro?.imagefile) {
|
||||
statecolor.value = 'orange-8'
|
||||
if (myrec.value.pdf_generato) {
|
||||
statecolor.value = 'positive'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showBadge() {
|
||||
@@ -88,6 +140,8 @@ export default defineComponent({
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
|
||||
emit('setCmd', $q, cmd, myusername, value, groupname)
|
||||
}
|
||||
@@ -138,6 +192,12 @@ export default defineComponent({
|
||||
disabilita,
|
||||
globalStore,
|
||||
computedWidth,
|
||||
statecolor,
|
||||
apriInfo,
|
||||
collanestr,
|
||||
editorestr,
|
||||
pagina_collegata,
|
||||
esiste_descrintro,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,76 +1,236 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="myrec"
|
||||
class="q-py-xs centermydiv cardrec back_img column justify-between"
|
||||
:style="{
|
||||
width: opt.widthcard,
|
||||
height: opt.heightcard,
|
||||
backgroundImage:
|
||||
`url(` +
|
||||
tools.getFullFileName(
|
||||
[myrec.foto_collana],
|
||||
table,
|
||||
myrec.username,
|
||||
myrec._id
|
||||
) +
|
||||
`)`,
|
||||
}"
|
||||
>
|
||||
<div class="flex-grow" />
|
||||
<!-- Questo elemento occupa spazio per separare l'immagine dal titolo -->
|
||||
<div class="title-container">
|
||||
<div class="text-h6 text-center">
|
||||
{{ myrec.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="q-pa-sm row items-start q-gutter-sm">
|
||||
<q-card
|
||||
v-if="myrec"
|
||||
flat
|
||||
bordered
|
||||
:style="`width: ` + opt.widthcard + `; height: 540px;`"
|
||||
>
|
||||
<!--<q-skeleton
|
||||
v-if="!myrec.foto_collana"
|
||||
type="QAvatar"
|
||||
:width="opt.widthcard"
|
||||
:height="opt.heightcard"
|
||||
/>-->
|
||||
<q-img
|
||||
:width="opt.widthcard"
|
||||
@click="apriInfo = true"
|
||||
:height="opt.heightcard"
|
||||
class="clickable-image"
|
||||
:src="
|
||||
tools.getFullFileName(
|
||||
[myrec.foto_collana],
|
||||
table,
|
||||
myrec.username,
|
||||
myrec._id
|
||||
)
|
||||
"
|
||||
>
|
||||
<template v-slot:error>
|
||||
<div class="absolute-full flex flex-center text-white">
|
||||
immagine non impostata
|
||||
</div>
|
||||
</template>
|
||||
<div class="text-h6 absolute-bottom text-left">
|
||||
{{ myrec.title }}
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
<q-item>
|
||||
<q-item-section side v-if="tools.canModifyThisRec(myrec, table) || editOn">
|
||||
<q-item-label>
|
||||
<q-btn rounded dense icon="fas fa-pencil-alt" color="blue">
|
||||
<q-menu>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="cmdExt(costanti.CMD_MODIFY, myrec._id, null)"
|
||||
>
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-pencil-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="cmdExt(costanti.CMD_CLONE, myrec._id, null)"
|
||||
>
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-copy" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('event.duplicate') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="cmdExt(costanti.CMD_DELETE, myrec._id, null)"
|
||||
>
|
||||
<q-item-section side>
|
||||
<q-icon name="fas fa-trash-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('reg.elimina') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-card-section>
|
||||
<div
|
||||
v-if="!myrec.foto_collana"
|
||||
class="q-mt-sm q-mb-xs"
|
||||
style="font-size: 1.15rem"
|
||||
>
|
||||
{{ myrec.title }}
|
||||
</div>
|
||||
<div class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-user" /> Referente:
|
||||
<span
|
||||
v-if="myrec.referenti && myrec.referenti.length > 0"
|
||||
:class="
|
||||
`text-bold ` + myrec.referenti && myrec.referenti.length > 0
|
||||
? 'text-blue'
|
||||
: 'text-red'
|
||||
"
|
||||
>
|
||||
{{ myrec.referenti ? myrec.referenti.join(', ') : '' }}
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="text-red">[Nessuno]</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="collanestr" class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-book" /> Collana:
|
||||
<span class="text-blue">{{ collanestr }}</span>
|
||||
</div>
|
||||
<div v-if="editorestr" class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-book-open" /> Editore:
|
||||
<span class="text-blue">{{ editorestr }}</span>
|
||||
</div>
|
||||
<div v-if="!esiste_descrintro" class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-pencil-alt" /> Testo descrittivo:
|
||||
<span :style="`color: ` + (esiste_descrintro ? 'green' : 'red')">{{
|
||||
esiste_descrintro ? 'Presente' : 'Mancante'
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="!myrec.img_bordata?.imagefile"
|
||||
class="text-caption text-h7 text-grey"
|
||||
>
|
||||
<q-icon name="fas fa-image" /> Sfondo:
|
||||
<span
|
||||
:style="
|
||||
`color: ` + (myrec.img_bordata?.imagefile ? 'green' : 'red')
|
||||
"
|
||||
>{{ esiste_descrintro ? 'Presente' : 'Mancante' }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
v-if="!myrec.img_intro?.imagefile"
|
||||
class="text-caption text-h7 text-grey"
|
||||
>
|
||||
<q-icon name="fas fa-image" /> Copertina:
|
||||
<span
|
||||
:style="`color: ` + (myrec.img_intro?.imagefile ? 'green' : 'red')"
|
||||
>{{ esiste_descrintro ? 'Presente' : 'Mancante' }}</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="myrec.pdf_generato" class="text-caption text-h7 text-blue">
|
||||
<q-icon name="fas fa-book" /> -
|
||||
<a :href="myrec.pdf_generato" target="_blank">PDF Generato</a>
|
||||
(Data: {{tools.getstrDate(myrec.data_generato)}})
|
||||
</div>
|
||||
<div v-if="myrec.pdf_online" class="text-caption text-h7 text-blue">
|
||||
<q-icon name="fas fa-book" /> -
|
||||
<a :href="myrec.pdf_online" target="_blank">PDF ONLINE</a>
|
||||
(Data: {{tools.getstrDate(myrec.data_online)}})
|
||||
</div>
|
||||
<!--<div class="text-overline text-orange-9">{{collanestr}}</div>-->
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions>
|
||||
<div class="row justify-center">
|
||||
<q-fab
|
||||
color="primary"
|
||||
icon="fas fa-caret-down"
|
||||
label="Menu"
|
||||
direction="up"
|
||||
flat
|
||||
dense
|
||||
>
|
||||
<q-fab-action
|
||||
v-if="tools.canModifyThisRec(myrec, table) || editOn"
|
||||
@click="cmdExt(costanti.CMD_DELETE, myrec._id, null)"
|
||||
color="negative"
|
||||
:label="$t('reg.elimina')"
|
||||
icon="fas fa-trash-alt"
|
||||
/>
|
||||
<q-fab-action
|
||||
v-if="tools.canModifyThisRec(myrec, table) || editOn"
|
||||
@click="cmdExt(costanti.CMD_CLONE, myrec._id, null)"
|
||||
color="accent"
|
||||
:label="$t('event.duplicate')"
|
||||
icon="fas fa-copy"
|
||||
/>
|
||||
<q-fab-action
|
||||
color="positive"
|
||||
label="Gestisci"
|
||||
icon="fas fa-book-open"
|
||||
@click="naviga(pagina_collegata)"
|
||||
/>
|
||||
<q-fab-action
|
||||
v-if="tools.canModifyThisRec(myrec, table) || editOn"
|
||||
@click="cmdExt(costanti.CMD_MODIFY, myrec._id, null)"
|
||||
color="primary"
|
||||
:label="$t('reg.edit')"
|
||||
icon="fas fa-pencil-alt"
|
||||
/>
|
||||
</q-fab>
|
||||
<q-btn
|
||||
flat
|
||||
color="primary"
|
||||
label="Info"
|
||||
icon="fas fa-info"
|
||||
@click="apriInfo = true"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
:color="statecolor"
|
||||
label="PDF"
|
||||
icon="fas fa-book"
|
||||
:disable="!myrec.pdf_generato"
|
||||
@click="naviga(myrec.pdf_generato)"
|
||||
/>
|
||||
</div>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="apriInfo">
|
||||
<q-card>
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ myrec.title }}
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
label="CHIUDI"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section>
|
||||
<div class="row justify-center q-ma-sm q-pa-sm">
|
||||
<div style="width: 300px" class="q-ma-sm">
|
||||
<CLabel
|
||||
:value="
|
||||
myrec.referenti && myrec.referenti.length > 0
|
||||
? myrec.referenti.join(', ')
|
||||
: '[Non Assegnato]'
|
||||
"
|
||||
label="Referente/i:"
|
||||
:color="
|
||||
myrec.referenti && myrec.referenti.length > 0
|
||||
? 'text-blue'
|
||||
: 'text-red'
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div style="width: 300px" class="q-ma-sm">
|
||||
<CLabel v-if="collanestr" :value="collanestr" label="Collana/e:" />
|
||||
</div>
|
||||
<div style="width: 300px" class="q-ma-sm">
|
||||
<CLabel
|
||||
class_text="text-bold"
|
||||
:value="esiste_descrintro ? 'PRESENTE ' : 'MANCANTE !'"
|
||||
label="Testo descrittivo"
|
||||
:color="esiste_descrintro ? 'green' : 'red'"
|
||||
/>
|
||||
</div>
|
||||
<div style="width: 300px" class="q-ma-sm">
|
||||
<CLabel
|
||||
:value="myrec.pdf_generato || 'ancora non è stato generato'"
|
||||
label="PDF generato"
|
||||
:color="myrec.pdf_generato ? 'green' : 'red'"
|
||||
:copy="true"
|
||||
/>
|
||||
<CLabel
|
||||
:value="myrec.pdf_online || 'ancora non è andato ONLINE'"
|
||||
label="PDF On-Line Ufficiale"
|
||||
:color="myrec.pdf_online ? 'green' : 'red'"
|
||||
:copy="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<q-card-actions align="center">
|
||||
<q-btn color="primary" label="Chiudi" @click="apriInfo = false" />
|
||||
</q-card-actions>
|
||||
</q-dialog>
|
||||
</template>
|
||||
<script lang="ts" src="./CMyRecCatalog.ts">
|
||||
</script>
|
||||
|
||||
@@ -48,6 +48,8 @@ export default defineComponent({
|
||||
|
||||
const sliderValue = computed({
|
||||
get: () => {
|
||||
if (!props.modelValue)
|
||||
return ''
|
||||
let mystr = props.modelValue + ''
|
||||
return mystr.replace(props.addstr, '')
|
||||
},
|
||||
|
||||
@@ -1031,7 +1031,7 @@
|
||||
></iframe>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<q-card-actions align="bottom">
|
||||
<q-card-actions align="center">
|
||||
<q-btn color="primary" label="Chiudi" @click="apriSchedaPDF = false" />
|
||||
</q-card-actions>
|
||||
</q-dialog>
|
||||
|
||||
@@ -36,6 +36,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
idPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, { attrs, slots, emit }) {
|
||||
@@ -48,6 +53,7 @@ export default defineComponent({
|
||||
props.optcatalogo,
|
||||
props.myproduct,
|
||||
props.rectext,
|
||||
props.idPage,
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user