Merge branch 'Alex' into razrab

This commit is contained in:
iriska-gri committed 2024-02-14 10:44:32 +03:00
commit 6a11bddacf
3 files changed
+81 -54

No files matched your search

+81 -54
View File
@@ -1,47 +1,71 @@
<template>
<v-container :fluid="true">
<v-card>
<v-tabs
v-model="tab"
bg-color="teal-darken-1"
slider-color="teal-darken-2"
:grow="true">
<v-tab selected-class="isActiveTab" value="document">Библиотека документов</v-tab>
<v-tab selected-class="isActiveTab" value="testings">Тестирование</v-tab>
</v-tabs>
</v-card>
<v-window v-model="tab">
<v-window-item value="document">
<v-row class="my-1">
<v-col cols="5" class="d-flex justify-start h-screen">
<v-card v-for="item in safetyData" :key="item.id" class="overflow-y-auto h-auto flex-grow-1 flex-shrink-1">
<v-card-title>{{ item.name }}</v-card-title>
<v-container
v-for="category in item.categories"
:key="item.id + category.id"
:fluid="true"
class="py-0">
<v-card-actions>
<v-btn @click="showMore[item.id + category.id] = !showMore[item.id + category.id]" variant="text">{{ category.name }}</v-btn>
<v-btn
:icon="showMore[item.id + category.id] ? 'mdi-chevron-up' : 'mdi-chevron-down'"
@click="showMore[item.id + category.id] = !showMore[item.id + category.id]">
</v-btn>
</v-card-actions>
<v-expand-transition>
<div v-show="showMore[item.id + category.id]">
<v-card-actions v-for="file in category.files" :key="file.id" class="overflow-y-auto">
<v-card-text>{{ file.name }}</v-card-text>
<v-btn icon="mdi-file-pdf-box" color="red" @click="openPDF(burl + file.url), loading=true"></v-btn>
<v-btn icon='mdi-file-download-outline' color="green" @click="downloadItem(burl + file.url, file.name)"></v-btn>
</v-card-actions>
</div>
</v-expand-transition>
</v-container>
</v-card>
</v-col>
<v-col cols="7" class="d-flex justify-start h-screen">
<v-card v-show="showFile" class="flex-grow-1 flex-shrink-1 overflow-y-auto">
<v-row no-gutters class="flex-column h-100 gap pa-1">
<v-col lg="1" class="w100 h-100">
<v-card>
<v-tabs
v-model="tab"
bg-color="teal-darken-1"
slider-color="teal-darken-2"
:grow="true">
<v-tab selected-class="isActiveTab" value="document">Библиотека документов</v-tab>
<v-tab selected-class="isActiveTab" value="testings">Тестирование</v-tab>
</v-tabs>
</v-card>
</v-col>
<v-col class="w100 h-100">
<v-window v-model="tab" class="h-100">
<v-window-item value="document" class="h-100">
<v-row no-gutters class="gap h-100 ">
<v-col lg="6">
<v-card class="h-100 flex-column d-flex gap">
<v-row class="ma-0 my-3 overflow-auto h-0 pb-1">
<v-card v-for="item in safetyData" :key="item.id" class="overflow-y-auto flex-grow-1 flex-shrink-1 h-100">
<v-card-title>{{ item.name }}</v-card-title>
<v-container
v-for="category in item.categories"
:key="item.id + category.id"
:fluid="true"
class="py-0">
<v-card-actions>
<v-btn
@click="showMore[item.id + category.id] = !showMore[item.id + category.id]"
variant="text">
{{ category.name }}
</v-btn>
<v-btn
:icon="showMore[item.id + category.id] ? 'mdi-chevron-up' : 'mdi-chevron-down'"
@click="showMore[item.id + category.id] = !showMore[item.id + category.id]">
</v-btn>
</v-card-actions>
<v-expand-transition>
<div v-show="showMore[item.id + category.id]">
<v-card-actions v-for="file in category.files" :key="file.id" class="overflow-y-auto">
<v-card-text
class="cursor-pointer"
:ref_="openPDF(burl + file.url)"
@click="openPDF(burl + file.url), loading=true">
{{ file.name }}
</v-card-text>
<v-btn icon="mdi-file-pdf-box" color="red" @click="openPDF(burl + file.url), loading=true"></v-btn>
<v-btn icon='mdi-file-download-outline' color="green" @click="downloadItem(burl + file.url, file.name)"></v-btn>
</v-card-actions>
</div>
</v-expand-transition>
</v-container>
</v-card>
</v-row>
<v-row class="ma-0 overflow-auto h-0">
<v-card
title="Здесь будет отображена информация о комиссиях"
class="overflow-y-auto flex-grow-1 flex-shrink-1 h-100">
</v-card>
</v-row>
</v-card>
</v-col>
<v-col>
<v-card class="h-100 flex-column d-flex gap">
<v-row class="ma-0 overflow-auto h-0">
<v-card v-show="showFile" class="mr-2 flex-grow-1 flex-shrink-1 h-100 pa-2 overflow-auto">
<v-container v-if="loading">
<v-progress-linear
:rounded="5"
@@ -50,22 +74,25 @@
</v-progress-linear>
</v-container>
<VuePdfEmbed :source="pdfSource" width="720" @rendered="loading = false"/>
<v-card-actions>
<v-btn block @click="showFile = false">Закрыть</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-window-item>
</v-row>
<v-card-actions v-show="showFile">
<v-btn
position="sticky"
block
@click="showFile = false">Закрыть</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-window-item>
<v-window-item value="testings">
<!-- Для тестов с пропсами
<TestSafety :data="data"></TestSafety>
-->
<TestSafety></TestSafety>
</v-window-item>
</v-window>
</v-container>
</v-col>
</v-row>
</template>
<script setup>
Binary file not shown.
Binary file not shown.