- Le immagini uploadate non vengono visualizzate subito... cache... aggiungere la versione dell'immagine: vers_img
- Aggiunto il Server TESTRISO e TEST_PCB.
This commit is contained in:
@@ -294,6 +294,7 @@ export default defineComponent({
|
||||
myImgGall.value = [{
|
||||
_id: '',
|
||||
imagefile: myvalue.value,
|
||||
vers_img: 1,
|
||||
// order: 1,
|
||||
alt: 'img',
|
||||
}]
|
||||
@@ -629,7 +630,7 @@ export default defineComponent({
|
||||
function savefield(value: any, initialval: any, myq: any) {
|
||||
if (!props.insertMode) {
|
||||
myvalue.value = value
|
||||
setValDb(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
tools.saveInDBForTypes(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -644,7 +645,7 @@ export default defineComponent({
|
||||
else
|
||||
myvalue.value = value
|
||||
|
||||
setValDb($q, props.field, myvalue, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
tools.saveInDBForTypes($q, props.field, myvalue, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +827,12 @@ export default defineComponent({
|
||||
function uploaded(info: any) {
|
||||
|
||||
if (info.files) {
|
||||
myvalue.value = tools.geturlrelativeprofile() + '/' + getMyUsername() + '/' + info.files[0].name
|
||||
if (info.files[0].name.imagefile) {
|
||||
myvalue.value = tools.geturlrelativeprofile() + '/' + getMyUsername() + '/' + info.files[0].name.imagefile
|
||||
} else {
|
||||
myvalue.value = tools.geturlrelativeprofile() + '/' + getMyUsername() + '/' + info.files[0].name
|
||||
}
|
||||
|
||||
console.log('uploaded', myvalue.value)
|
||||
savefield(myvalue.value, '', $q)
|
||||
}
|
||||
|
||||
@@ -299,13 +299,13 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.coordinates">
|
||||
<CMapEditAddressByCoord
|
||||
:visuMappa="false"
|
||||
:editaddress="true"
|
||||
v-model:model-value="myvalue"
|
||||
@update:model-value="changeValRecCoordAddr"
|
||||
></CMapEditAddressByCoord>
|
||||
<div v-else-if="col.fieldtype === costanti.FieldType.coordinates">
|
||||
<CMapEditAddressByCoord
|
||||
:visuMappa="false"
|
||||
:editaddress="true"
|
||||
v-model:model-value="myvalue"
|
||||
@update:model-value="changeValRecCoordAddr"
|
||||
></CMapEditAddressByCoord>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
@@ -389,7 +389,9 @@
|
||||
"
|
||||
:title="tools.getTitleGall(table)"
|
||||
:directory="tools.getDirectoryGall(myrow, table, mypath)"
|
||||
:imgGall="myvalue"
|
||||
:imgGall="
|
||||
myvalue && myvalue.imagefile ? myvalue.imagefile : myvalue
|
||||
"
|
||||
:isInModif="isInModif"
|
||||
:edit="isviewfield() && isInModif"
|
||||
:canModify="canModify && isInModif"
|
||||
@@ -426,7 +428,11 @@
|
||||
"
|
||||
:title="tools.getTitleGall(table)"
|
||||
:directory="tools.getDirectoryGall(myrow, table, mypath)"
|
||||
:imgGall="[{ imagefile: myvalue }]"
|
||||
:imgGall="
|
||||
myvalue && myvalue.imagefile
|
||||
? [myvalue]
|
||||
: [{ imagefile: myvalue, vers_img: 1 }]
|
||||
"
|
||||
:edit="isviewfield()"
|
||||
:canModify="canModify"
|
||||
:isInModif="isInModif"
|
||||
@@ -490,7 +496,11 @@
|
||||
"
|
||||
:title="tools.getTitleGall(table)"
|
||||
:directory="tools.getDirectoryGall(myrow, table, mypath)"
|
||||
:imgGall="[{ imagefile: myvalue }]"
|
||||
:imgGall="
|
||||
myvalue && myvalue.imagefile
|
||||
? [myvalue]
|
||||
: [{ imagefile: myvalue, vers_img: 1 }]
|
||||
"
|
||||
:edit="isviewfield()"
|
||||
:canModify="canModify"
|
||||
:isInModif="isInModif"
|
||||
@@ -545,7 +555,9 @@
|
||||
"
|
||||
:title="tools.getTitleGall(table)"
|
||||
:directory="tools.getDirectoryGall(myrow, table, mypath)"
|
||||
:imgGall="[myvalue]"
|
||||
:imgGall="
|
||||
myvalue && myvalue.imagefile ? [myvalue.imagefile] : [myvalue]
|
||||
"
|
||||
:edit="isviewfield()"
|
||||
:canModify="canModify"
|
||||
:isInModif="isInModif"
|
||||
@@ -1601,7 +1613,11 @@
|
||||
"
|
||||
:title="tools.getTitleGall(table)"
|
||||
:directory="tools.getDirectoryGall(myrow, table, mypath)"
|
||||
:imgGall="[{ imagefile: myvalue }]"
|
||||
:imgGall="
|
||||
myvalue && myvalue.imagefile
|
||||
? [myvalue]
|
||||
: [{ imagefile: myvalue, vers_img: 1 }]
|
||||
"
|
||||
:edit="isviewfield()"
|
||||
:canModify="canModify"
|
||||
:isInModif="isInModif"
|
||||
|
||||
Reference in New Issue
Block a user