P-82 Макет тестов
This commit is contained in:
1 parent
9673fdacfa
commit
98e800519a
1 file changed
+121
-14
@@ -1,23 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row>
|
<v-container>
|
||||||
<v-col
|
<v-tabs v-model="activeTab" class="mb-4 text-teal-darken-4">
|
||||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
<v-tab>Назначенные ({{tests.length}})</v-tab>
|
||||||
>
|
<v-tab>Завершенные</v-tab>
|
||||||
Тестирование
|
<v-tab>Каталог</v-tab>
|
||||||
</v-col>
|
</v-tabs>
|
||||||
</v-row>
|
|
||||||
|
<v-tabs-window v-model="activeTab">
|
||||||
|
<v-tabs-window-item>
|
||||||
|
<v-card class="mb-6" outlined>
|
||||||
|
<v-card-title>
|
||||||
|
Назначенные
|
||||||
|
</v-card-title>
|
||||||
|
|
||||||
|
<v-text-field
|
||||||
|
v-model="search"
|
||||||
|
label="Найти тестирование по названию"
|
||||||
|
variant="outlined"
|
||||||
|
clearable
|
||||||
|
class="mb-4"
|
||||||
|
></v-text-field>
|
||||||
|
|
||||||
|
<v-data-table
|
||||||
|
:items="filteredTests"
|
||||||
|
item-value="id"
|
||||||
|
class="elevation-1"
|
||||||
|
:headers="headers"
|
||||||
|
hide-default-footer
|
||||||
|
>
|
||||||
|
<template #item.image="{ item }">
|
||||||
|
<v-avatar size="48">
|
||||||
|
<img :src="item.image" alt="Test Image" />
|
||||||
|
</v-avatar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #item.actions="{ item }">
|
||||||
|
<v-btn v-if="item.type === 'test'" color="teal-darken-4" variant="tonal" class="mr-4">Тренироваться</v-btn>
|
||||||
|
<v-btn color="teal-darken-4">Пройти</v-btn>
|
||||||
|
</template>
|
||||||
|
</v-data-table>
|
||||||
|
</v-card>
|
||||||
|
</v-tabs-window-item>
|
||||||
|
|
||||||
|
<v-tabs-window-item>
|
||||||
|
<v-card class="mb-6" outlined>
|
||||||
|
<v-card-title>
|
||||||
|
Завершенные
|
||||||
|
</v-card-title>
|
||||||
|
<p>Список завершенных тестов будет здесь.</p>
|
||||||
|
</v-card>
|
||||||
|
</v-tabs-window-item>
|
||||||
|
|
||||||
|
<v-tabs-window-item>
|
||||||
|
<v-card class="mb-6" outlined>
|
||||||
|
<v-card-title>
|
||||||
|
Каталог
|
||||||
|
</v-card-title>
|
||||||
|
<p>Список доступных тестов будет здесь.</p>
|
||||||
|
</v-card>
|
||||||
|
</v-tabs-window-item>
|
||||||
|
</v-tabs-window>
|
||||||
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {pagecounter} from '@/utils/universal_functions'
|
import { ref, computed } from 'vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup(){
|
setup() {
|
||||||
pagecounter()
|
const activeTab = ref(0);
|
||||||
}
|
const search = ref('');
|
||||||
}
|
|
||||||
|
const headers = [
|
||||||
|
{ text: 'Картинка', value: 'image', sortable: false },
|
||||||
|
{ text: 'Название', value: 'title', align: 'start' },
|
||||||
|
{ text: 'Тип', value: 'type' },
|
||||||
|
{ text: 'Описание', value: 'description' },
|
||||||
|
{ text: 'Дата', value: 'date' },
|
||||||
|
{ text: 'Действия', value: 'actions', sortable: false },
|
||||||
|
];
|
||||||
|
|
||||||
|
const tests = ref([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: 'Комплекс тестовых вопросов на знание в области информационно-коммуникационных технологий',
|
||||||
|
type: 'test',
|
||||||
|
description: 'Краткое описание тестирования',
|
||||||
|
date: '22.06.2024',
|
||||||
|
questions: 20,
|
||||||
|
time: '15 минут',
|
||||||
|
attempts: 1,
|
||||||
|
image: 'https://via.placeholder.com/48',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
title: 'Удобство раздела тестирования',
|
||||||
|
type: 'survey',
|
||||||
|
description: 'Опрос среди сотрудников ЦОД МФ',
|
||||||
|
date: '22.06.2024',
|
||||||
|
questions: 28,
|
||||||
|
time: null,
|
||||||
|
attempts: null,
|
||||||
|
image: 'https://via.placeholder.com/48',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const filteredTests = computed(() => {
|
||||||
|
if (!search.value) return tests.value;
|
||||||
|
return tests.value.filter((test) =>
|
||||||
|
test.title.toLowerCase().includes(search.value.toLowerCase())
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
activeTab,
|
||||||
|
search,
|
||||||
|
headers,
|
||||||
|
tests,
|
||||||
|
filteredTests,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.v-data-table__wrapper {
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user