mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 19:01:05 +03:30
fix : try to display files in test result
This commit is contained in:
@@ -111,21 +111,22 @@
|
||||
</v-layout>
|
||||
|
||||
<v-layout align-left justify-left wrap class="my-3">
|
||||
<v-layout align-left justify-left wrap class="my-3" v-if="data.files && data.files.length">
|
||||
<v-layout align-left justify-left wrap class="my-3" v-if="data.media && data.media.length">
|
||||
<h3 class="CSSD-font">Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light"/>
|
||||
</v-flex>
|
||||
<v-layout row wrap class="align-center">
|
||||
<v-flex xs6 md2 sm2 v-for="(file, key) in data.files" :key="key">
|
||||
<v-flex xs6 md2 sm2 v-for="(file, key) in data.media" :key="key">
|
||||
<template v-if="file.file_type == 'document'">
|
||||
<a target="_blank" :href="'/'+file.thumbnail">
|
||||
<a target="_blank" :href="'/'+file.original_url">
|
||||
<v-icon class="mr-2 caption">fas fa-check</v-icon>
|
||||
{{ file.file_name }}</a>
|
||||
{{ file.file_name }}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<img :src="file.thumbnail" style="width: 100%" @click="openLightbox(key)"/>
|
||||
<img :src="file.original_url" style="width: 100%" @click="openLightbox(key)"/>
|
||||
</template>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
@@ -187,7 +188,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
imagesOnly() {
|
||||
return this.data.files && this.data.files.length ? this.data.files.filter(file => file.file_type !== 'document') : [];
|
||||
return this.data.media && this.data.media.length ? this.data.media.filter(file => file.mime_type !== 'document') : [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -245,8 +246,8 @@ export default {
|
||||
this.load(this.$route.params.id);
|
||||
}
|
||||
this.lightboxImages = this.imagesOnly && this.imagesOnly.length ? this.imagesOnly.map(file => ({
|
||||
src: file.thumbnail,
|
||||
thumb: file.thumbnail,
|
||||
src: file.original_url,
|
||||
thumb: file.original_url,
|
||||
})) : [];
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user