Merge branch 'Alex' into develop
This commit is contained in:
commit
656f37728d
2 files changed
+163
-13
No files matched your search
@@ -0,0 +1,117 @@
|
||||
<!-- Раздел с назначенным тестированием -->
|
||||
<template>
|
||||
<div class="my-4 text-h5"> {{ title }} </div>
|
||||
<v-container :fluid="true">
|
||||
<v-row>
|
||||
<v-text-field
|
||||
v-model="search"
|
||||
append-inner-icon="mdi-magnify"
|
||||
label="Найти тестирование по названию"
|
||||
variant="solo"
|
||||
@click:append-inner="searchTest"
|
||||
clearable/>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<!-- Карточка где буду отрисовываться тесты в цикле -->
|
||||
<v-card v-for="cardValue in searchTest" :key="cardValue.id" class="my-2">
|
||||
<v-row class="pa-2">
|
||||
<v-col cols="1">
|
||||
<v-img height="125" :src="cardValue.file" />
|
||||
</v-col>
|
||||
<v-col cols="auto" class="d-flex flex-grow-1">
|
||||
<div class="d-flex flex-column justify-center flex-grow-1">
|
||||
<div class="text-body-1 font-weight-medium mb-2">{{ cardValue.name }}</div>
|
||||
<div class="text-body-1 text-disabled mb-2">{{ cardValue.description }}</div>
|
||||
<div class="d-flex ga-4">
|
||||
<div v-for="icon in icons">
|
||||
<v-icon :color="icon.color" :icon="icon.icon" size="large" />
|
||||
<span class="ml-1">{{ cardValue[icon.field] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</v-col>
|
||||
<v-col cols="auto" class="align-self-center">
|
||||
<slot name="buttons"></slot>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
<v-container v-if="!searchTest.length" :fluid="true">
|
||||
<v-row class="align-center flex-column">
|
||||
<v-icon icon="mdi-note-off-outline" color="grey-lighten-1" size="x-large" />
|
||||
<v-card-title class="text-h4 text-grey-lighten-1">Данные не найдены</v-card-title>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, computed } from 'vue';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: 'Не забыть передать тайтл сюда!'
|
||||
},
|
||||
testingCard: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Комплекс тестовых вопросов на знание в области информационно-коммуникационных технологий',
|
||||
type: 'test',
|
||||
description: 'Краткое описание тестирования',
|
||||
file: 'https://icdn.lenta.ru/images/2024/03/27/12/20240327123127525/square_1280_63e6b3d7acbfce65d885ae4cf216dfe2.jpg',
|
||||
dateend: `до ${'31.02.2025'}`,
|
||||
questionCount: 20,
|
||||
time: '15 минут',
|
||||
attempts_number: 1,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Удобство раздела тестирования',
|
||||
type: 'test',
|
||||
description: 'Опрос среди сотрудников ЦОД МФ',
|
||||
file: 'https://icdn.lenta.ru/images/2024/03/27/12/20240327123127525/square_1280_63e6b3d7acbfce65d885ae4cf216dfe2.jpg',
|
||||
dateend: `до ${'31.06.2025'}`,
|
||||
questionCount: 28,
|
||||
time: '15 минут',
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
setup(props) {
|
||||
const search = ref('');
|
||||
const icons = [
|
||||
{
|
||||
icon: 'mdi-calendar-clock',
|
||||
field: 'dateend',
|
||||
color: 'teal-darken-1',
|
||||
},
|
||||
{
|
||||
icon: 'mdi-clipboard-list-outline',
|
||||
field: 'questionCount',
|
||||
color: 'teal-darken-1',
|
||||
},
|
||||
// иконки для использования на вкладке назначенные использовать можно эти
|
||||
// {
|
||||
// icon: 'mdi-timer-outline',
|
||||
// field: 'time',
|
||||
// color: 'teal-darken-1',
|
||||
// },
|
||||
// {
|
||||
// icon: 'mdi-fire',
|
||||
// field: 'attempts_number',
|
||||
// color: '#FF9800'
|
||||
// },
|
||||
]
|
||||
|
||||
const searchTest = computed(() => {
|
||||
if (!search.value) return props.testingCard
|
||||
return props.testingCard.filter(item => item.name.toLowerCase().includes(search.value.toLowerCase()))
|
||||
})
|
||||
|
||||
return { icons, search, searchTest }
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,27 +1,60 @@
|
||||
<template>
|
||||
<!-- <v-container>
|
||||
<TimerUI :endTime="end" />
|
||||
<SmallTimer :endTime="end"/>
|
||||
</v-container> -->
|
||||
<VoteCard />
|
||||
<v-container :fluid="true">
|
||||
<v-tabs v-model="activeTab" class="mb-2 text-teal-darken-4">
|
||||
<v-tab v-for="tab in tabs" :key="tab.value" :value="tab.value"> {{ tab.title }} </v-tab>
|
||||
</v-tabs>
|
||||
<v-tabs-window v-model="activeTab" class="border-t-thin">
|
||||
<v-tabs-window-item class="my-2 ">
|
||||
<CatalogTest />
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item>
|
||||
<div>Сюда заврешенные!</div>
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item>
|
||||
<CatalogTest title="Каталог">
|
||||
<template #buttons>
|
||||
<v-btn color="#00897B1F" class="mr-2 text-teal-darken-1" elevation="0">
|
||||
Тренироваться
|
||||
</v-btn>
|
||||
<v-btn color="teal-darken-1" elevation="0">
|
||||
Пройти
|
||||
</v-btn>
|
||||
</template>
|
||||
</CatalogTest>
|
||||
</v-tabs-window-item>
|
||||
</v-tabs-window>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import TimerUI from "@/components/secret/TimerUI.vue"
|
||||
// import SmallTimer from "@/components/secret/SmallTimer.vue"
|
||||
import VoteCard from "@/components/vote/VoteCard.vue"
|
||||
import CatalogTest from "@/components/testing/CatalogTest.vue";
|
||||
import { ref } from "vue"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
// TimerUI,
|
||||
// SmallTimer,
|
||||
VoteCard
|
||||
CatalogTest
|
||||
},
|
||||
setup() {
|
||||
// const end = new Date(2025, 0, 14, 15, 58, 5)
|
||||
const activeTab = ref(0);
|
||||
|
||||
const test = [
|
||||
{
|
||||
text: 'awdawd',
|
||||
},
|
||||
{
|
||||
text: 'awdawd',
|
||||
},
|
||||
]
|
||||
|
||||
const tabs = ref([
|
||||
{ value: 0, title: `Назначенные (${test.length})`, },
|
||||
{ value: 1, title: 'Завершенные', },
|
||||
{ value: 2, title: 'Каталог', },
|
||||
])
|
||||
|
||||
return {
|
||||
// end
|
||||
activeTab,
|
||||
tabs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user