|
|
@ -87,6 +87,8 @@ import { useDialog } from "primevue/usedialog"; |
|
|
|
import UpdPhoto from "./UpdPhoto.vue"; |
|
|
|
import UpdPhoto from "./UpdPhoto.vue"; |
|
|
|
import Upditemext from "./Upditemext.vue"; |
|
|
|
import Upditemext from "./Upditemext.vue"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const config = useRuntimeConfig(); |
|
|
|
|
|
|
|
console.log (config.public.apiHostname); |
|
|
|
|
|
|
|
|
|
|
|
interface cItemB { |
|
|
|
interface cItemB { |
|
|
|
id: number; |
|
|
|
id: number; |
|
|
@ -107,7 +109,7 @@ let imgurl = ref(); |
|
|
|
const imgref = ref(); |
|
|
|
const imgref = ref(); |
|
|
|
//imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg'; |
|
|
|
//imgref.value='1679468897186c75b5379eb6691871da30ef18b98a_1.jpg'; |
|
|
|
const {data: itemsb } = await awaitItemsb(); |
|
|
|
const {data: itemsb } = await awaitItemsb(); |
|
|
|
const {data: typen } = await useFetch('http://ubodroid-2:8081/api/v1/typ'); |
|
|
|
const {data: typen } = await useFetch(config.public.apiHostname + 'api/v1/typ'); |
|
|
|
|
|
|
|
|
|
|
|
async function openDetail(id) { |
|
|
|
async function openDetail(id) { |
|
|
|
await navigateTo({ |
|
|
|
await navigateTo({ |
|
|
@ -122,7 +124,7 @@ async function openDetail(id) { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
async function awaitItemsb() { |
|
|
|
async function awaitItemsb() { |
|
|
|
const res = await useFetch('http://ubodroid-2:8081/api/v1/itb'); |
|
|
|
const res = await useFetch(config.public.apiHostname + 'api/v1/itb'); |
|
|
|
let r: any; |
|
|
|
let r: any; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,7 +146,7 @@ async function openEval(id: number) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function openFrontview(iid: number) { |
|
|
|
async function openFrontview(iid: number) { |
|
|
|
const itemb = await useFetch('http://ubodroid-2:8081/api/v1/itb/'+iid); |
|
|
|
const itemb = await useFetch(config.public.apiHostname + 'api/v1/itb/'+iid); |
|
|
|
let itb: cItemB; |
|
|
|
let itb: cItemB; |
|
|
|
console.log(itemb.data.value); |
|
|
|
console.log(itemb.data.value); |
|
|
|
itb = itemb.data.value; |
|
|
|
itb = itemb.data.value; |
|
|
@ -175,7 +177,7 @@ async function doUpdate(t: cItemB) { |
|
|
|
fd.append('abmessungenid', t.abmessungen.id.toString()); |
|
|
|
fd.append('abmessungenid', t.abmessungen.id.toString()); |
|
|
|
fd.append('frontviewid', t.frontviewid.toString()); |
|
|
|
fd.append('frontviewid', t.frontviewid.toString()); |
|
|
|
console.log('fd = ', fd); |
|
|
|
console.log('fd = ', fd); |
|
|
|
await $fetch('http://ubodroid-2:8081/api/v1/itb/'+t.id,{ |
|
|
|
await $fetch(config.public.apiHostname + 'api/v1/itb/'+t.id,{ |
|
|
|
method: 'PUT', |
|
|
|
method: 'PUT', |
|
|
|
body: fd |
|
|
|
body: fd |
|
|
|
}); |
|
|
|
}); |
|
|
@ -205,7 +207,7 @@ const onNew = () => { |
|
|
|
fd.append('abmessungenid', t.abmessungenid.toString()); |
|
|
|
fd.append('abmessungenid', t.abmessungenid.toString()); |
|
|
|
fd.append('frontviewid', t.frontviewid.toString()); |
|
|
|
fd.append('frontviewid', t.frontviewid.toString()); |
|
|
|
console.log('fd = ', fd); |
|
|
|
console.log('fd = ', fd); |
|
|
|
await $fetch('http://ubodroid-2:8081/api/v1/itb',{ |
|
|
|
await $fetch(config.public.apiHostname + 'api/v1/itb',{ |
|
|
|
method: 'POST', |
|
|
|
method: 'POST', |
|
|
|
body: fd |
|
|
|
body: fd |
|
|
|
}); |
|
|
|
}); |
|
|
|