- 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:
Surya Paolo
2024-09-17 17:38:57 +02:00
parent 0872afbb39
commit b9a5c54071
86 changed files with 2154 additions and 1532 deletions

View File

@@ -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)
}