Merge branch 'develop' into сja

This commit is contained in:
Cja committed 2025-01-27 11:44:25 +03:00
commit 9b5fcfa07d
2 files changed
+33 -22

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ import axios from "axios";
const spravURL = 'http://10.252.44.33/accounting6/images/photo/' const spravURL = 'http://10.252.44.33/accounting6/images/photo/'
const spravURLBase = 'http://10.252.44.33/accounting6/' const spravURLBase = 'http://10.252.44.33/accounting6/'
const baseURL = process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8000/' : `http://${window.location.host}/`; const baseURL = process.env.NODE_ENV === 'development' ? 'http://127.0.0.1:8000/' : `http://${window.location.host}/`;
const baseWS = process.env.NODE_ENV == 'development' ? 'ws://127.0.0.1:8000/' : `ws://${window.location.host}/`; const baseWS = process.env.NODE_ENV === 'development' ? 'ws://127.0.0.1:8000/' : `ws://${window.location.host}/`;
// const baseURL = process.env.NODE_ENV == 'development'? 'http://127.0.0.1:8000/': `http://10.252.44.60:9965/`; // const baseURL = process.env.NODE_ENV == 'development'? 'http://127.0.0.1:8000/': `http://10.252.44.60:9965/`;
// const baseWS = process.env.NODE_ENV == 'development'? 'ws://127.0.0.1:8000/': `ws://10.252.44.60:9966/`; // const baseWS = process.env.NODE_ENV == 'development'? 'ws://127.0.0.1:8000/': `ws://10.252.44.60:9966/`;
// для релизного меняем 'http://ukd/' // для релизного меняем 'http://ukd/'
+32 -21
View File
@@ -1,7 +1,7 @@
<template> <template>
<v-container> <v-container>
<v-tabs v-model="activeTab" class="mb-4 text-teal-darken-4"> <v-tabs v-model="activeTab" class="mb-4 text-teal-darken-4">
<v-tab>Назначенные ({{tests.length}})</v-tab> <v-tab>Назначенные ({{ tests.length }})</v-tab>
<v-tab>Завершенные</v-tab> <v-tab>Завершенные</v-tab>
<v-tab>Каталог</v-tab> <v-tab>Каталог</v-tab>
</v-tabs> </v-tabs>
@@ -15,27 +15,40 @@
<v-text-field <v-text-field
v-model="search" v-model="search"
class="mx-4"
clearable
label="Найти тестирование по названию" label="Найти тестирование по названию"
variant="outlined" variant="outlined"
clearable
class="mb-4"
></v-text-field> ></v-text-field>
<v-data-table <v-data-table
:items="filteredTests"
item-value="id"
class="elevation-1"
:headers="headers" :headers="headers"
:items="filteredTests"
hide-default-footer hide-default-footer
item-value="id"
> >
<template #item.image="{ item }"> <template #item.image="{ item }">
<v-avatar size="48"> <v-img :src="item.image" alt="Test Image" height="100" width="100"/>
<img :src="item.image" alt="Test Image" /> </template>
</v-avatar>
<template #item.title="{ item }">
<v-card-title>
{{ item.title }}
</v-card-title>
<v-card-subtitle>
<div>{{ item.description }}</div>
</v-card-subtitle>
<v-card-actions class="ga-4">
<div><v-icon color="teal-darken-4">mdi-calendar</v-icon><strong> До:</strong> {{ item.date }}</div>
<div><v-icon color="teal-darken-4">mdi-calendar-text</v-icon> <strong> Вопросов:</strong> {{ item.questions }}</div>
<div v-if="item.time"><v-icon color="teal-darken-4">mdi-clock</v-icon><strong> Время:</strong> {{ item.time }}</div>
<div v-if="item.attempts"><v-icon color="deep-orange-accent-4">mdi-alert-outline</v-icon><strong> Попытки:</strong> {{ item.attempts }}</div>
</v-card-actions>
</template> </template>
<template #item.actions="{ item }"> <template #item.actions="{ item }">
<v-btn v-if="item.type === 'test'" color="teal-darken-4" variant="tonal" class="mr-4">Тренироваться</v-btn> <v-btn v-if="item.type === 'test'" class="mr-4" color="teal-darken-4" variant="tonal">Тренироваться
</v-btn>
<v-btn color="teal-darken-4">Пройти</v-btn> <v-btn color="teal-darken-4">Пройти</v-btn>
</template> </template>
</v-data-table> </v-data-table>
@@ -63,8 +76,9 @@
</v-container> </v-container>
</template> </template>
<script> <script>
import { ref, computed } from 'vue'; import {computed, ref} from 'vue';
export default { export default {
setup() { setup() {
@@ -72,12 +86,9 @@ export default {
const search = ref(''); const search = ref('');
const headers = [ const headers = [
{ text: 'Картинка', value: 'image', sortable: false }, {text: 'Картинка', value: 'image', sortable: false},
{ text: 'Название', value: 'title', align: 'start' }, {text: 'Название', value: 'title', align: 'start'},
{ text: 'Тип', value: 'type' }, {text: 'Действия', value: 'actions', sortable: false},
{ text: 'Описание', value: 'description' },
{ text: 'Дата', value: 'date' },
{ text: 'Действия', value: 'actions', sortable: false },
]; ];
const tests = ref([ const tests = ref([
@@ -86,22 +97,22 @@ export default {
title: 'Комплекс тестовых вопросов на знание в области информационно-коммуникационных технологий', title: 'Комплекс тестовых вопросов на знание в области информационно-коммуникационных технологий',
type: 'test', type: 'test',
description: 'Краткое описание тестирования', description: 'Краткое описание тестирования',
date: '22.06.2024', date: '28.02.2025',
questions: 20, questions: 20,
time: '15 минут', time: '15 минут',
attempts: 1, attempts: 1,
image: 'https://via.placeholder.com/48', image: 'https://icdn.lenta.ru/images/2024/03/27/12/20240327123127525/square_1280_63e6b3d7acbfce65d885ae4cf216dfe2.jpg',
}, },
{ {
id: 2, id: 2,
title: 'Удобство раздела тестирования', title: 'Удобство раздела тестирования',
type: 'survey', type: 'survey',
description: 'Опрос среди сотрудников ЦОД МФ', description: 'Опрос среди сотрудников ЦОД МФ',
date: '22.06.2024', date: '22.06.2025',
questions: 28, questions: 28,
time: null, time: null,
attempts: null, attempts: null,
image: 'https://via.placeholder.com/48', image: 'https://icdn.lenta.ru/images/2024/03/27/12/20240327123127525/square_1280_63e6b3d7acbfce65d885ae4cf216dfe2.jpg',
}, },
]); ]);