Merge branch 'Vit' into develop

This commit is contained in:
Nukeap committed 2025-02-05 09:21:43 +03:00
commit 5e3350cc80
7 files changed
+205 -318

No files matched your search

@@ -15,7 +15,6 @@
no-resize
variant="outlined"
/>
</v-col>
<v-col class="flex-grow-0 px-2">
<v-btn
@@ -47,14 +46,12 @@
</v-locale-provider>
</v-col>
<v-col class="flex-column d-flex">
<v-col class="flex-column d-flex">
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
<v-col>
<calendar-my
:calendars="
calendarForMy.filter(
(e) => e.author == accountStore.user.is_idEmployee
)
calendarForMy.filter((e) => e.author == accountStore.user.is_idEmployee)
"
title="Мои календари"
@getCalendar="getCalendar"
@@ -62,9 +59,7 @@
<calendar-my
:calendars="
calendarForMy.filter(
(e) => e.author != accountStore.user.is_idEmployee
)
calendarForMy.filter((e) => e.author != accountStore.user.is_idEmployee)
"
title="Подписки"
/>
@@ -104,13 +99,13 @@
</template>
<script>
import { ref, onMounted, watch } from "vue";
import { useWeekendsStore } from "@/store/WeekendsStore";
import EventCreate from "@/components/calendar_of_events/event-create.vue";
import CalendarMy from "@/components/calendar_of_events/calendar-my.vue";
import { axiosApiInstance } from "@/utils/axios-api";
import { useAccountStore } from "@/store/AccountStore";
import CalendarFull from "@/components/calendar_of_events/UI_calendar/calendarFull.vue";
import { ref, onMounted, watch } from 'vue';
import { useWeekendsStore } from '@/store/WeekendsStore';
import EventCreate from '@/components/calendar_of_events/event-create.vue';
import CalendarMy from '@/components/calendar_of_events/calendar-my.vue';
import { axiosApiInstance } from '@/utils/axios-api';
import { useAccountStore } from '@/store/AccountStore';
import CalendarFull from '@/components/calendar_of_events/UI_calendar/calendarFull.vue';
export default {
components: { EventCreate, CalendarMy, CalendarFull },
@@ -136,36 +131,27 @@ export default {
};
const getCalendar = () => {
axiosApiInstance
.get(`api/calendar_of_events/my_calendars/`)
.then((res) => {
res.data.forEach(
(e) =>
(e.visible = accountStore.calendar.includes(e.id) ? false : true)
);
calendarForMy.value = res.data;
});
axiosApiInstance.get(`api/calendar_of_events/my_calendars/`).then((res) => {
res.data.forEach((e) => (e.visible = accountStore.calendar.includes(e.id) ? false : true));
calendarForMy.value = res.data;
});
};
getCalendar();
const getEvents = (idEvent, clik) => {
axiosApiInstance
.get(
`api/calendar_of_events/my_events/${
idEvent === undefined ? "" : `?id=${idEvent}`
}`
)
.get(`api/calendar_of_events/my_events/${idEvent === undefined ? '' : `?id=${idEvent}`}`)
.then((res) => {
if (idEvent === undefined) {
res.data.event = {
name: "",
name: '',
participant: [accountStore.user.is_idEmployee],
files: [],
date_start: new Date(),
date_end: new Date(),
period: null,
description: "",
description: '',
calendar: null,
};
}
@@ -185,28 +171,25 @@ export default {
};
const weekendsData = () => {
cal.value.$el
.querySelectorAll(".v-date-picker-month__day")
.forEach((e) => {
let datas = e.getAttribute("data-v-date");
let weeks =
new Date(datas).getDay() === 6 || new Date(datas).getDay() === 0;
if (weeks) {
e.querySelectorAll("span").forEach((n) => {
n.classList.add("text-red");
cal.value.$el.querySelectorAll('.v-date-picker-month__day').forEach((e) => {
let datas = e.getAttribute('data-v-date');
let weeks = new Date(datas).getDay() === 6 || new Date(datas).getDay() === 0;
if (weeks) {
e.querySelectorAll('span').forEach((n) => {
n.classList.add('text-red');
});
}
if (MyMonth.value in week.week[MyYear.value]) {
if (week.week[MyYear.value][MyMonth.value].includes(datas)) {
e.querySelectorAll('span').forEach((n) => {
n.classList.add('text-red');
if (n.classList.contains('text-red') && weeks) {
n.classList.replace('text-red', 'text-black');
}
});
}
if (MyMonth.value in week.week[MyYear.value]) {
if (week.week[MyYear.value][MyMonth.value].includes(datas)) {
e.querySelectorAll("span").forEach((n) => {
n.classList.add("text-red");
if (n.classList.contains("text-red") && weeks) {
n.classList.replace("text-red", "text-black");
}
});
}
}
});
}
});
};
onMounted(() => {
@@ -219,7 +202,7 @@ export default {
if (newValue) {
weekendsData();
}
}
},
);
const CheckingStore = () => {
@@ -231,7 +214,7 @@ export default {
};
const infoEvent = (i) => {
console.log(i, "iiiiiiiiii");
console.log(i, 'iiiiiiiiii');
};
return {
+88 -150
View File
@@ -1,160 +1,98 @@
<template>
<v-carousel
cover
:height="carushi"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
>
<v-carousel-item v-for="(x, i) in carous" :key="i" :src="`${burl}${x.link}`" cover eager>
<v-container fill-height fluid pa-0 ma-0 pb-3 class="flex-column h-100 d-flex">
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{ x.title }} </v-col>
<v-carousel
cover
:height="carushi"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous" :key="i"
:src="`${burl}${x.link}`"
cover
eager
>
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img width="50" :aspect-ratio="1" :src="`${burl}${x.sender}`" cover />
</v-col>
</v-row>
</v-card-title>
<v-card-text
v-if="'text' in x && x.text.length > 0"
class="ml-2 mb-0 mb-2 flex-grow-0 pb-3 text-h6 h-100 pl-3 py-3 mr-1"
>
<v-row>
<v-col cols="6" class="bgText">
<v-textarea
class="mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value="x.text"
variant="plain"
readonly
auto-grow
rows="1"
hide-details
/>
</v-col>
<v-container
fill-height
fluid
pa-0 ma-0 pb-3
class="flex-column h-100 d-flex"
>
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
</v-col>
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text v-if="'text' in x && x.text.length>0" class="ml-2 mb-0 mb-2 flex-grow-0 pb-3 text-h6 h-100 pl-3 py-3 mr-1 ">
<v-row>
<v-col cols="6" class="bgText">
<v-img :aspect-ratio="1" :src="`${burl}${x.link2}`" />
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
</template>
<v-col cols=6 class=" bgText">
<v-textarea
class="mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value=x.text
variant='plain'
readonly
auto-grow
rows="1"
hide-details
<script>
import { ref, computed } from 'vue';
/>
</v-col>
import { baseURL } from '@/utils/axios-api';
import { axiosApiInstance } from '@/utils/axios-api';
<v-col cols=6 class=" bgText">
<v-img
:aspect-ratio="1"
:src="`${burl}${x.link2}`"
/>
</v-col>
</v-row>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
</template>
<script>
import { ref, computed } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
import { axiosApiInstance } from '@/utils/axios-api'
export default {
setup() {
const burl = baseURL.slice(0,-1)
const carous=ref([{link: ""}])
axiosApiInstance.get(`api/fns/links/`).then(data => {
carous.value= data.data
// t_dailyRound.value = data.data
export default {
setup() {
const burl = baseURL.slice(0, -1);
const carous = ref([{ link: '' }]);
// result.value=JSON.parse(JSON.stringify(data.data.daily))
axiosApiInstance.get(`api/fns/links/`).then((data) => {
carous.value = data.data;
})
// getfromserver("api/fns/links/", carous)
const carushi = computed(()=> {
return window.innerHeight-50
})
return { burl, carous, carushi}
}
// t_dailyRound.value = data.data
// result.value=JSON.parse(JSON.stringify(data.data.daily))
});
// getfromserver("api/fns/links/", carous)
}
</script>
<style>
.bgCard {
/* #ffffff6b #ffffff8c*/
background: #ffffff38 ;
}
.bgText {
background: #ffffffb0;
line-height: 3.1rem!important;
}
.titles {
/* font-family: cursive !important; */
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 2.5em!important;
}
</style>
const carushi = computed(() => {
return window.innerHeight - 50;
});
return { burl, carous, carushi };
},
};
</script>
<style>
.bgCard {
/* #ffffff6b #ffffff8c*/
background: #ffffff38;
}
.bgText {
background: #ffffffb0;
line-height: 3.1rem !important;
}
.titles {
/* font-family: cursive !important; */
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 2.5em !important;
}
</style>
+76 -74
View File
@@ -1,98 +1,100 @@
<template>
<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 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 title="Назначенные" :activeTab="activeTab" :testingCard="getAllTests">
<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-item class="my-2">
<CatalogTest title="Назначенные" :activeTab="activeTab" :testingCard="getAllTests">
<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-item>
<CatalogTest title="Завершенные" :activeTab="activeTab" :testingCard="getAllTests">
<!-- Здесь отобразить результат теста после того как будет готов БЭК и УМТ -->
<template #results>
<!-- <div>
<v-tabs-window-item>
<CatalogTest title="Завершенные" :activeTab="activeTab" :testingCard="getAllTests">
<!-- Здесь отобразить результат теста после того как будет готов БЭК и УМТ -->
<template #results>
<!-- <div>
<v-icon icon="mdi-calendar-clock" size="large" />
<span class="ml-1">12354</span>
</div> -->
</template>
<template #buttons>
<v-btn color="#00897B1F" class="mr-2 text-teal-darken-1" elevation="0">
Результаты
</v-btn>
</template>
</CatalogTest>
</v-tabs-window-item>
</template>
<template #buttons>
<v-btn color="#00897B1F" class="mr-2 text-teal-darken-1" elevation="0">
Результаты
</v-btn>
</template>
</CatalogTest>
</v-tabs-window-item>
<!-- Вкладка каталога -->
<v-tabs-window-item>
<CatalogTest title="Каталог" :activeTab="activeTab" :testingCard="getAllTests">
<template #buttons>
<v-btn color="#00897B1F" class="mr-2 text-teal-darken-1" elevation="0">
Тренироваться
</v-btn>
</template>
</CatalogTest>
</v-tabs-window-item>
</v-tabs-window>
<v-tabs-window-item>
<CatalogTest title="Каталог" :activeTab="activeTab" :testingCard="getAllTests">
<template #buttons>
<v-btn color="#00897B1F" class="mr-2 text-teal-darken-1" elevation="0">
Тренироваться
</v-btn>
</template>
</CatalogTest>
</v-tabs-window-item>
</v-tabs-window>
</v-container>
</template>
<script>
import CatalogTest from "@/components/testing/CatalogTest.vue";
import { axiosApiInstance } from "@/utils/axios-api";
import CatalogTest from '@/components/testing/CatalogTest.vue';
import { axiosApiInstance } from '@/utils/axios-api';
import { ref, computed, watch } from "vue"
import { ref, computed, watch } from 'vue';
export default {
components: {
CatalogTest
CatalogTest,
},
setup() {
const activeTab = ref(0);
const currentTest = ref('')
const getAllTests = ref([])
const activeTab = ref(0);
const currentTest = ref('');
const getTestById = () => {
let status = activeTab.value == 0 ? '?status=active' : activeTab.value == 1 ? '?status=completed' : ''
axiosApiInstance.get(`/api/tests/gettests/${status}`).then(resp => getAllTests.value = resp.data).finally(() => {
if (activeTab.value == 0) {
currentTest.value = getAllTests.value.length
}
})
}
const getAllTests = ref([]);
getTestById()
watch (() => activeTab.value,
() => {
getTestById()
const getTestById = () => {
let status =
activeTab.value == 0 ? '?status=active' : activeTab.value == 1 ? '?status=completed' : '';
axiosApiInstance
.get(`/api/tests/gettests/${status}`)
.then((resp) => (getAllTests.value = resp.data))
.finally(() => {
if (activeTab.value == 0) {
currentTest.value = getAllTests.value.length;
}
)
});
};
const tabs = computed(() => [
{ value: 0, title: `Назначенные (${currentTest.value})`, },
{ value: 1, title: 'Завершенные', },
{ value: 2, title: 'Каталог', },
])
getTestById();
watch(
() => activeTab.value,
() => {
getTestById();
},
);
return {
activeTab,
tabs,
getAllTests,
}
}
}
</script>
const tabs = computed(() => [
{ value: 0, title: `Назначенные (${currentTest.value})` },
{ value: 1, title: 'Завершенные' },
{ value: 2, title: 'Каталог' },
]);
return {
activeTab,
tabs,
getAllTests,
};
},
};
</script>