Compare commits
No commits in common. "a9a8a60bbfa28711039e592ac069adc016d1313b" and "50184e54d06dd209a3cf1274e11cdc33862ee62a" have entirely different histories.
a9a8a60bbf
...
50184e54d0
10
src/App.vue
10
src/App.vue
@ -150,8 +150,8 @@ onMounted(async () => {
|
|||||||
|
|
||||||
async function getLoginToken(username, password) {
|
async function getLoginToken(username, password) {
|
||||||
const credentials = btoa(`${username}:${password}`); // base64 encoding
|
const credentials = btoa(`${username}:${password}`); // base64 encoding
|
||||||
const response = await fetch('/ahi/servlet/oauth/token?scope=logintoken', {
|
|
||||||
//const response = await fetch('/unilab/servlet/oauth/token?scope=logintoken', {
|
const response = await fetch('/unilab/servlet/oauth/token?scope=logintoken', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Basic ${credentials}`,
|
'Authorization': `Basic ${credentials}`,
|
||||||
@ -168,8 +168,7 @@ async function getLoginToken(username, password) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function fetchReportDataWithToken(token, pSERCER) {
|
async function fetchReportDataWithToken(token, pSERCER) {
|
||||||
const response = await fetch(`/ahi/servlet/api/pi_flabreportapi?pSERCER=${encodeURIComponent(pSERCER)}`, {
|
const response = await fetch(`/unilab/servlet/api/pi_flabreportapi?pSERCER=${encodeURIComponent(pSERCER)}`, {
|
||||||
//const response = await fetch(`/unilab/servlet/api/pi_flabreportapi?pSERCER=${encodeURIComponent(pSERCER)}`, {
|
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
},
|
},
|
||||||
@ -324,9 +323,6 @@ header {
|
|||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
white-space: pre-wrap; /* preserves newlines */
|
|
||||||
word-break: break-word; /* wraps long lines if needed */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-header {
|
.sub-header {
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
<td>{{ formatNumber(row.dimA, 2) }}</td>
|
<td>{{ formatNumber(row.dimA, 2) }}</td>
|
||||||
<td>{{ formatNumber(row.dimH, 2) }}</td>
|
<td>{{ formatNumber(row.dimH, 2) }}</td>
|
||||||
<td>{{ formatNumber(row.massaVolumica, 0) }}</td>
|
<td>{{ formatNumber(row.massaVolumica, 0) }}</td>
|
||||||
<td>{{ formatNumber(row.f, 2) }}</td>
|
<td>{{ formatNumber(row.f, 1) }}</td>
|
||||||
<td>{{ formatNumber(row.rc, 2) }}</td>
|
<td>{{ formatNumber(row.rc, 2) }}</td>
|
||||||
<td v-if="row.rowspanRprelievo > 0" :rowspan="row.rowspanRprelievo">{{ row.rprelievo }}</td>
|
<td v-if="row.rowspanRprelievo > 0" :rowspan="row.rowspanRprelievo">{{ row.rprelievo }}</td>
|
||||||
<td>{{ row.rType }}</td>
|
<td>{{ row.rType }}</td>
|
||||||
@ -85,25 +85,14 @@
|
|||||||
return new Date(dateStr).toLocaleDateString('it-IT')
|
return new Date(dateStr).toLocaleDateString('it-IT')
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(val, decimals = 2, useGrouping = false) {
|
function formatNumber(val, decimals) {
|
||||||
if (val == null) return '—'
|
return val != null
|
||||||
return Number(val).toLocaleString('it-IT', {
|
? Number(val).toLocaleString('it-IT', {
|
||||||
minimumFractionDigits: decimals,
|
minimumFractionDigits: decimals,
|
||||||
maximumFractionDigits: decimals,
|
maximumFractionDigits: decimals
|
||||||
useGrouping
|
})
|
||||||
})
|
: '—'
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
table:first-of-type thead tr:first-child > th:nth-child(6),
|
|
||||||
table:first-of-type tbody tr > td:nth-child(6) {
|
|
||||||
max-width: 150px; /* imposta qui la larghezza massima desiderata */
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<th colspan="3">Dimensioni</th>
|
<th colspan="3">Dimensioni</th>
|
||||||
<th rowspan="2">Massa<br>volumica</th>
|
<th rowspan="2">Massa<br>volumica</th>
|
||||||
<th rowspan="2">F</th>
|
<th rowspan="2">F</th>
|
||||||
<th rowspan="2">R<sub>c</sub>*</th>
|
<th rowspan="2">R<sub>c</sub></th>
|
||||||
<th rowspan="2">R<sub>PRELIEVO</sub></th>
|
<th rowspan="2">R<sub>PRELIEVO</sub></th>
|
||||||
<th rowspan="3">R**</th>
|
<th rowspan="3">R**</th>
|
||||||
<th rowspan="3">P***</th>
|
<th rowspan="3">P***</th>
|
||||||
@ -88,25 +88,14 @@
|
|||||||
return new Date(dateStr).toLocaleDateString('it-IT')
|
return new Date(dateStr).toLocaleDateString('it-IT')
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(val, decimals = 2, useGrouping = false) {
|
function formatNumber(val, decimals) {
|
||||||
if (val == null) return '—'
|
return val != null
|
||||||
return Number(val).toLocaleString('it-IT', {
|
? Number(val).toLocaleString('it-IT', {
|
||||||
minimumFractionDigits: decimals,
|
minimumFractionDigits: decimals,
|
||||||
maximumFractionDigits: decimals,
|
maximumFractionDigits: decimals
|
||||||
useGrouping
|
})
|
||||||
})
|
: '—'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
table:first-of-type thead tr:first-child > th:nth-child(6),
|
|
||||||
table:first-of-type tbody tr > td:nth-child(6) {
|
|
||||||
max-width: 150px; /* imposta qui la larghezza massima desiderata */
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<td>{{ row.verbale }}</td>
|
<td>{{ row.verbale }}</td>
|
||||||
<td>{{ formatDate(row.dataPrelievo) }}</td>
|
<td>{{ formatDate(row.dataPrelievo) }}</td>
|
||||||
<td>{{ formatNumber(row.diaNom,0) }}</td>
|
<td>{{ formatNumber(row.diaNom,0) }}</td>
|
||||||
<td>{{ formatNumber(row.lunBase,0) }}</td>
|
<td>{{ formatNumber(row.dimA,0) }}</td>
|
||||||
<td>{{ formatNumber(row.masG,1) }}</td>
|
<td>{{ formatNumber(row.masG,1) }}</td>
|
||||||
<td>{{ formatNumber(row.diaEff,2) }}</td>
|
<td>{{ formatNumber(row.diaEff,2) }}</td>
|
||||||
<td>{{ row.ferriera }}</td>
|
<td>{{ row.ferriera }}</td>
|
||||||
@ -84,27 +84,13 @@
|
|||||||
return new Date(dateStr).toLocaleDateString('it-IT')
|
return new Date(dateStr).toLocaleDateString('it-IT')
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(val, decimals = 2, useGrouping = false) {
|
function formatNumber(val, decimals) {
|
||||||
if (val == null) return '—'
|
return val != null
|
||||||
return Number(val).toLocaleString('it-IT', {
|
? Number(val).toLocaleString('it-IT', {
|
||||||
minimumFractionDigits: decimals,
|
minimumFractionDigits: decimals,
|
||||||
maximumFractionDigits: decimals,
|
maximumFractionDigits: decimals
|
||||||
useGrouping
|
})
|
||||||
})
|
: '—'
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
/* Seleziona il 10° <th> nella riga di intestazione */
|
|
||||||
table:first-of-type thead tr:first-child > th:nth-child(10),
|
|
||||||
/* Seleziona tutte le celle <td> in posizione 10 nei body */
|
|
||||||
table:first-of-type tbody tr > td:nth-child(10) {
|
|
||||||
max-width: 150px; /* imposta qui la larghezza massima desiderata */
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@ -28,8 +28,8 @@
|
|||||||
<td>{{ row.verbale }}</td>
|
<td>{{ row.verbale }}</td>
|
||||||
<td>{{ formatDate(row.dataPrelievo) }}</td>
|
<td>{{ formatDate(row.dataPrelievo) }}</td>
|
||||||
<td>{{ formatNumber(row.diaNom,0) }}</td>
|
<td>{{ formatNumber(row.diaNom,0) }}</td>
|
||||||
<td>{{ formatNumber(row.lunBase,2) }}</td>
|
<td>{{ formatNumber(row.dimA,0) }}</td>
|
||||||
<td>{{ formatNumber(row.masG,2) }}</td>
|
<td>{{ formatNumber(row.masG,1) }}</td>
|
||||||
<td>{{ formatNumber(row.diaEff,2) }}</td>
|
<td>{{ formatNumber(row.diaEff,2) }}</td>
|
||||||
<td>{{ row.ferriera }}</td>
|
<td>{{ row.ferriera }}</td>
|
||||||
<td v-if="row.rowspanArea > 0" :rowspan="row.rowspanArea">{{ row.area }}</td>
|
<td v-if="row.rowspanArea > 0" :rowspan="row.rowspanArea">{{ row.area }}</td>
|
||||||
@ -63,10 +63,10 @@
|
|||||||
<tr v-for="row in risult_data" :key="row.idProvino">
|
<tr v-for="row in risult_data" :key="row.idProvino">
|
||||||
<td>{{ row.idProvino }}</td>
|
<td>{{ row.idProvino }}</td>
|
||||||
<td>{{ formatNumber(row.carsne,2) }}</td>
|
<td>{{ formatNumber(row.carsne,2) }}</td>
|
||||||
<td>{{ formatNumber(row.tensne,2) }}</td>
|
<td>{{ formatNumber(row.tensne,1) }}</td>
|
||||||
<td>{{ formatNumber(row.carot,2) }}</td>
|
<td>{{ formatNumber(row.carot,2) }}</td>
|
||||||
<td>{{ formatNumber(row.tenrot,2) }}</td>
|
<td>{{ formatNumber(row.tenrot,1) }}</td>
|
||||||
<td>{{ formatNumber(row.agt,2) }}</td>
|
<td>{{ formatNumber(row.agt,1) }}</td>
|
||||||
<td>{{ formatNumber(row.ftFy,2) }}</td>
|
<td>{{ formatNumber(row.ftFy,2) }}</td>
|
||||||
<td>{{ formatNumber(row.ftFyNom,2) }}</td>
|
<td>{{ formatNumber(row.ftFyNom,2) }}</td>
|
||||||
<td>{{ formatNumber(row.disnod,2) }}</td>
|
<td>{{ formatNumber(row.disnod,2) }}</td>
|
||||||
@ -87,31 +87,13 @@
|
|||||||
return new Date(dateStr).toLocaleDateString('it-IT')
|
return new Date(dateStr).toLocaleDateString('it-IT')
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNumber(val, decimals = 2, useGrouping = false) {
|
function formatNumber(val, decimals) {
|
||||||
if (val == null) return '—'
|
return val != null
|
||||||
return Number(val).toLocaleString('it-IT', {
|
? Number(val).toLocaleString('it-IT', {
|
||||||
minimumFractionDigits: decimals,
|
minimumFractionDigits: decimals,
|
||||||
maximumFractionDigits: decimals,
|
maximumFractionDigits: decimals
|
||||||
useGrouping
|
})
|
||||||
})
|
: '—'
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
/* Seleziona il 10° <th> nella riga di intestazione */
|
|
||||||
table:first-of-type thead tr:first-child > th:nth-child(10),
|
|
||||||
/* Seleziona tutte le celle <td> in posizione 10 nei body */
|
|
||||||
table:first-of-type tbody tr > td:nth-child(10) {
|
|
||||||
max-width: 150px; /* imposta qui la larghezza massima desiderata */
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue
Block a user