|
|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="flex details-deck">
|
|
|
|
|
<va-card v-show="Object.keys(itemPreview).length" id="preview" class="content-container">
|
|
|
|
|
<va-card v-show="hasImage" id="preview" class="content-container">
|
|
|
|
|
<va-image contain :src="slotPreviewPath" :alt="`${this.itemDetails.description}`">
|
|
|
|
|
<template #loader>
|
|
|
|
|
<va-progress-circle indeterminate />
|
|
|
|
|
</template>
|
|
|
|
|
<template #error>
|
|
|
|
|
Изображение не найдено! :(
|
|
|
|
|
Изображение не загружено
|
|
|
|
|
</template>
|
|
|
|
|
</va-image>
|
|
|
|
|
</va-card>
|
|
|
|
|
@ -66,8 +66,8 @@ export default {
|
|
|
|
|
"depth_min",
|
|
|
|
|
"depth_max",
|
|
|
|
|
],
|
|
|
|
|
itemPreview: {},
|
|
|
|
|
imageExtension: "bmp",
|
|
|
|
|
hasImage: false,
|
|
|
|
|
detailsLoaded: false,
|
|
|
|
|
columnHeaders: []
|
|
|
|
|
};
|
|
|
|
|
@ -92,6 +92,7 @@ export default {
|
|
|
|
|
fetch(path, { method: 'HEAD' })
|
|
|
|
|
.then(resp => {
|
|
|
|
|
if (resp.status === 200) {
|
|
|
|
|
this.hasImage = true;
|
|
|
|
|
this.imageExtension = extension;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -103,7 +104,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return `${this.baseURL}/static/previews/${this.itemDetails.fadr}+/${this.itemDetails.internal_id}.${this.imageExtension}`
|
|
|
|
|
return `/static/previews/${this.itemDetails.fadr}+/${this.itemDetails.internal_id}.${this.imageExtension}`
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
@ -126,7 +127,7 @@ export default {
|
|
|
|
|
return Object.entries(this.itemDetails)
|
|
|
|
|
.filter(([k, _v]) => !(this.hidden.includes(k)))
|
|
|
|
|
.map(([k, v]) => [this.dictHeaders[k], v])
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
components: { ItemMapComponent }
|
|
|
|
|
}
|
|
|
|
|
|