обнавлена версия дизайна страницы

This commit is contained in:
Andrei Filippov committed 2024-11-07 17:33:30 +03:00
1 parent 1de05f5861
commit 7c3c6a8490
3 files changed
+226 -148

No files matched your search

+5 -7
View File
@@ -1,9 +1,6 @@
<template> <template>
<v-card color="teal-darken-1" width="420" height="150" elevation="24"> <h3>ДО КОНЦА ГОЛОСОВАНИЯ ОСТАЛОСЬ:</h3>
<v-card-title>До конца голосования осталось:</v-card-title> <div class="card-count">{{ displayDays }} дней {{ displayHours }} часов {{ displayMinutes }} минут</div>
<div class="card-count">{{ displayDays }}:{{ displayHours }}:{{ displayMinutes }}</div>
<span class="card-sub-title ">дней : часов : минут</span>
</v-card>
</template> </template>
<script> <script>
export default { export default {
@@ -35,7 +32,7 @@ export default {
const timer = setInterval(() => { const timer = setInterval(() => {
const now = new Date(); const now = new Date();
// здесь задается конец отчета (гггг, мм, дд, остальные цифры не меняются) // здесь задается конец отчета (гггг, мм, дд, остальные цифры не меняются)
const end = new Date(2024, 11 - 1, 21, 10, 10, 10); const end = new Date(2024, 11 - 1, 14, 10, 10, 10);
const distance = end.getTime() - now.getTime(); const distance = end.getTime() - now.getTime();
if (distance < 0) { if (distance < 0) {
@@ -49,7 +46,7 @@ export default {
this.displayMinutes = minutes < 10 ? "0" + minutes : minutes; this.displayMinutes = minutes < 10 ? "0" + minutes : minutes;
this.displayHours = minutes < 10 & minutes > 10 ? "0" + hours : hours; this.displayHours = minutes < 10 & minutes > 10 ? "0" + hours : hours;
this.displayDays = days < 10 ? "0" + days : days; this.displayDays = days;
}, 1000) }, 1000)
} }
} }
@@ -60,6 +57,7 @@ export default {
<style> <style>
.card-count { .card-count {
font-size: 3em; font-size: 3em;
color: #ff0000;
} }
.card-sub-title { .card-sub-title {
+3 -3
View File
@@ -1,6 +1,6 @@
<template> <template>
<v-form @submit="voteSend"> <v-form @submit="voteSend">
<v-card id="scroll-window-chekbox" height="520" elevation="0"> <v-card id="scroll-window-chekbox" height="420" elevation="0">
<!-- Форма голосования --> <!-- Форма голосования -->
<v-virtual-scroll :items="vote_data" :item-height="40"> <v-virtual-scroll :items="vote_data" :item-height="40">
<template v-slot:default="{ item }"> <template v-slot:default="{ item }">
@@ -29,7 +29,8 @@
disabled>ДА</v-btn> disabled>ДА</v-btn>
</v-col> </v-col>
<v-col cols="2"> <v-col cols="2">
<v-btn variant="elevated" color="red-darken-1" @click="isActive.value = false">НЕТ</v-btn> <v-btn variant="elevated" color="red-darken-1"
@click="isActive.value = false">НЕТ</v-btn>
</v-col> </v-col>
</v-col> </v-col>
</v-card> </v-card>
@@ -121,6 +122,5 @@ export default {
<style> <style>
#scroll-window-chekbox { #scroll-window-chekbox {
overflow-y: scroll !important; overflow-y: scroll !important;
height: 400px;
} }
</style> </style>
+218 -138
View File
@@ -1,132 +1,202 @@
<template> <template>
<v-row justify="center" class="d-flex align-start h-100"> <v-row justify="center" class="d-flex align-start h-100">
<v-col cols="12" class="h-15 d-flex justify-center proc-count_cell"> <!-- Голосование Лучший сотрудник -->
<v-col justify="center" align="center" cols="2"> <v-col cols="12" justify="center" class="d-flex vote-card-container">
<v-card color="teal-darken-1" width="200" height="100" elevation="24" class="procent-card-font"> <v-col cols="6" justify="center" align="center">
<perc-bst /> <div class="flip-card" :class="{ 'flipped': isFlipped1 }">
</v-card> <div class="flip-card-inner">
<div v-if="voted_bst" class="flip-card-front">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
variant="elevated">
<div class="justify-center">
<div>
<v-card class="vote-card-information">
<v-card-title>&laquo;ЛУЧШИЙ В ОТДЕЛЕ&raquo;</v-card-title>
<v-card-text
class="justify-center align-center vote-card-information-title">
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
<p>СПАСИБО!</p>
</v-card-text>
</v-card>
</div>
</div>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<div v-else class="flip-card-front" @click="toggleFlip1">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
variant="elevated">
<div class="justify-center">
<div>
<v-card class="vote-card-information">
<v-card-title>&laquo;ЛУЧШИЙ В ОТДЕЛЕ&raquo;</v-card-title>
<v-card-text class="justify-center align-center
vote-card-information-title">
Выберите сотрудника<br>
который на Ваш взгляд,<br>
внес наибольший вклад в результат работы<br>
Отдела в 2024 году
</v-card-text>
</v-card>
</div>
</div>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Передняя сторона карточки КОНЕЦ-->
<div class="flip-card-back">
<!-- Задняя сторона карточки -->
<v-card class="justify-center elevation-24" width="500" height="600">
<v-card-title>
&laquo;МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ&raquo;
</v-card-title>
<v-card-text>
<vote-form :type_fetch="'bst'" />
</v-card-text>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button-back">
<v-btn @click="toggleFlip1" variant="elevated" color="teal-darken-1"
type="button">назад</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
</div>
</div>
<!-- Задняя сторона карточки КОНЕЦ-->
</v-col> </v-col>
<v-col justify="center" align="center" cols="4" class="vote-cards_cell "> <!-- Голосование Лучший сотрудник КОНЕЦ-->
<!-- Голосование Спасибо -->
<v-col cols="6" justify="center" align="center">
<div class="flip-card" :class="{ 'flipped': isFlipped2 }">
<div class="flip-card-inner">
<div v-if="voted_thn" class="flip-card-front">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
variant="elevated">
<div class="justify-center">
<div>
<v-card class="vote-card-information">
<v-card-title>&laquo;ХОЧУ СКАЗАТЬ СПАСИБО&raquo;</v-card-title>
<v-card-text
class="justify-center align-center vote-card-information-title">
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
<p>СПАСИБО!</p>
</v-card-text>
</v-card>
</div>
</div>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<div v-else class="flip-card-front" @click="toggleFlip2">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
variant="elevated">
<div class="justify-center">
<div>
<v-card class="vote-card-information">
<v-card-title>&laquo;ХОЧУ СКАЗАТЬ СПАСИБО&raquo;</v-card-title>
<v-card-text class="justify-center align-center
vote-card-information-title">
Выберите сотрудника <br>
(не из Вашего отдела)<br>
которому бы Вы лично обьявили бы<br>
благодарность по итогом работы в 2024 году
</v-card-text>
</v-card>
</div>
</div>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Передняя сторона карточки КОНЕЦ-->
<!-- Задняя сторона карточки -->
<div class="flip-card-back">
<v-card class="justify-center elevation-24" width="500" height="600" variant="elevated">
<v-card-title>
&laquo;ХОЧУ СКАЗАТЬ СПАСИБО!&raquo;
</v-card-title>
<v-card-text>
<vote-form :type_fetch="'thn'" />
</v-card-text>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button-back">
<v-btn @click="toggleFlip2" variant="elevated" color="teal-darken-1"
type="button">назад</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Задняя сторона карточки КОНЕЦ-->
</div>
</div>
</v-col>
</v-col>
<v-col cols="12" class="d-flex justify-center align-end ">
<h1>ПРИНЯЛИ УЧАСТИЕ В ГОЛОСОВАНИИ</h1>
</v-col>
<v-col cols="12" class="d-flex justify-center align-end pa-0">
<v-col v-if="admin_panel" justify="center" align="center" cols="6" class=" pa-0">
<v-dialog>
<template v-slot:activator="{ props: VoteAdmin }">
<v-btn variant="transparent" v-bind="VoteAdmin"
class="procent-card-font pa-0"><perc-bst /></v-btn>
</template>
<template v-slot:default="{ isActive }">
<v-row justify="center" class="h-100 admin-vote">
<v-card width="1500" height="900">
<vote-admin />
<v-row justify="center" align="center">
<v-btn variant="elevated" color="teal-darken-1"
@click="isActive.value = false">ЗАКРЫТЬ</v-btn>
</v-row>
</v-card>
</v-row>
</template>
</v-dialog>
</v-col>
<v-col v-else justify="center" align="center" cols="6" class="procent-card-font pa-0">
<perc-bst />
</v-col>
<v-col v-if="admin_panel" justify="center" align="center" cols="6" class=" pa-0">
<v-dialog>
<template v-slot:activator="{ props: VoteAdmin }">
<v-btn variant="transparent" v-bind="VoteAdmin"
class="procent-card-font pa-0"><perc-thn /></v-btn>
</template>
<template v-slot:default="{ isActive }">
<v-row justify="center" class="h-100 admin-vote">
<v-card width="1500" height="900">
<vote-admin />
<v-row justify="center" align="center">
<v-btn variant="elevated" color="teal-darken-1"
@click="isActive.value = false">ЗАКРЫТЬ</v-btn>
</v-row>
</v-card>
</v-row>
</template>
</v-dialog>
</v-col>
<v-col v-else justify="center" align="center" cols="6" class="procent-card-font pa-0">
<perc-thn />
</v-col>
</v-col>
<v-col cols="12" class="d-flex justify-center align-start pa-0">
<v-col justify="center" align="center" cols="6" class="vote-cards_cell ">
<count-down /> <count-down />
</v-col> </v-col>
<v-col justify="center" align="center" cols="2">
<v-card color="teal-darken-1" width="200" height="100" elevation="24" class="procent-card-font">
<perc-thn />
</v-card>
</v-col>
</v-col>
<!-- Голосование Лучший сотрудник -->
<v-col justify="center" align="center">
<div class="flip-card" :class="{ 'flipped': isFlipped1 }">
<div class="flip-card-inner">
<div class="flip-card-front">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24 " image="@/assets/best_employee.jpg" width="500"
height="700" variant="elevated">
<v-card-title class="vote-card-title">
&laquo;МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ&raquo;
</v-card-title>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button">
<v-card-title class="you-voted" v-if="voted_bst">
<div>Вы уже проголосовали!</div>
</v-card-title>
<v-btn v-else size="x-large" @click="toggleFlip1" variant="elevated"
color="teal-darken-1" type="button">ОТДАТЬ
ГОЛОС!</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Передняя сторона карточки КОНЕЦ-->
<div class="flip-card-back">
<!-- Задняя сторона карточки -->
<v-card class="justify-center elevation-24" width="500" height="700">
<v-card-title>
&laquo;МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ&raquo;
</v-card-title>
<v-card-text>
<vote-form :type_fetch="'bst'" />
</v-card-text>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button-back">
<v-btn @click="toggleFlip1" variant="elevated" color="teal-darken-1"
type="button">назад</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
</div>
</div>
<!-- Задняя сторона карточки КОНЕЦ-->
</v-col>
<!-- Голосование Лучший сотрудник КОНЕЦ-->
<v-col class="w-15" cols="2" v-if="admin_panel" justify="center" align="center">
<v-dialog>
<template v-slot:activator="{ props: VoteAdmin }">
<v-btn variant="elevated" v-bind="VoteAdmin" color="teal-darken-1">ИНФОРМАЦИЯ О ХОДЕ <br>
ГОЛОСОВАНИЯ</v-btn>
</template>
<template v-slot:default="{ isActive }">
<v-row justify="center" class="h-100 admin-vote">
<v-card width="1500" height="900">
<vote-admin />
<v-row justify="center" align="center">
<v-btn variant="elevated" color="teal-darken-1"
@click="isActive.value = false">ЗАКРЫТЬ</v-btn>
</v-row>
</v-card>
</v-row>
</template>
</v-dialog>
</v-col>
<!-- Голосование Спасибо -->
<v-col justify="center" align="center">
<div class="flip-card" :class="{ 'flipped': isFlipped2 }">
<div class="flip-card-inner">
<div class="flip-card-front">
<!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24" image="@/assets/thanks.jpeg" width="500"
height="700" variant="elevated">
<v-card-title class="vote-card-title">
&laquo;ХОЧУ СКАЗАТЬ СПАСИБО!&raquo;
</v-card-title>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button">
<v-card-title class="you-voted" v-if="voted_thn">
<div>Вы уже проголосовали!</div>
</v-card-title>
<v-btn v-else size="x-large" @click="toggleFlip2" variant="elevated"
color="teal-darken-1">ОТДАТЬ
ГОЛОС!</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Передняя сторона карточки КОНЕЦ-->
<!-- Задняя сторона карточки -->
<div class="flip-card-back">
<v-card class="justify-center elevation-24" width="500" height="700" variant="elevated">
<v-card-title>
&laquo;ХОЧУ СКАЗАТЬ СПАСИБО!&raquo;
</v-card-title>
<v-card-text>
<vote-form :type_fetch="'thn'" />
</v-card-text>
<!-- Кнопка активации поворота -->
<v-card-actions class="justify-center vote-button-back">
<v-btn @click="toggleFlip2" variant="elevated" color="teal-darken-1"
type="button">назад</v-btn>
</v-card-actions>
<!-- Кнопка активации поворота КОНЕЦ-->
</v-card>
</div>
<!-- Задняя сторона карточки КОНЕЦ-->
</div>
</div>
</v-col> </v-col>
<!-- Голосование Спасибо КОНЕЦ--> <!-- Голосование Спасибо КОНЕЦ-->
@@ -172,6 +242,7 @@ export default {
let finded_thn = votedListThn.find(({ voted_user }) => voted_user === account_login) let finded_thn = votedListThn.find(({ voted_user }) => voted_user === account_login)
if (finded_thn.voted_user === account_login) { if (finded_thn.voted_user === account_login) {
voted_thn.value = true; voted_thn.value = true;
} }
}); });
clearAxios.get(`/api/vote/getbest/`).then((data) => { clearAxios.get(`/api/vote/getbest/`).then((data) => {
@@ -195,7 +266,7 @@ export default {
isFlipped2.value = !isFlipped2.value; isFlipped2.value = !isFlipped2.value;
} }
if (account_login == '9966-00-134' || account_login == '9966-00-141') { if (account_login == '9966-00-134' || account_login == '9966-00-141' || account_login == '9966-00-011') {
admin_panel = true; admin_panel = true;
} }
@@ -214,10 +285,12 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.flip-card { .vote-card-container {
perspective: 1000px; height: 620px !important;
} }
.flip-card {}
.flip-card-inner { .flip-card-inner {
display: flex; display: flex;
position: relative; position: relative;
@@ -231,12 +304,8 @@ export default {
.flip-card-front, .flip-card-front,
.flip-card-back { .flip-card-back {
display: flex;
justify-content: center;
position: absolute; position: absolute;
align-items: center;
width: 100%; width: 100%;
height: 100%;
backface-visibility: hidden; backface-visibility: hidden;
} }
@@ -251,23 +320,21 @@ export default {
} }
.vote-button { .vote-button {
margin-top: 577px; margin-top: 57px;
} }
.vote-cards_cell { .vote-cards_cell {
height: 14% !important; height: 2% !important;
} }
.proc-count_cell {
height: 18% !important;
}
.procent-card-font { .procent-card-font {
font-size: 4em; font-size: 5em;
color: #008000;
} }
.card-count { .card-count {
font-size: 4em; font-size: 3em;
} }
.you-voted { .you-voted {
@@ -275,4 +342,17 @@ export default {
color: #ffff; color: #ffff;
border-radius: 5px; border-radius: 5px;
} }
.vote-card-information {
background-color: rgba(255, 255, 255, 0.7);
margin-top: 45%;
width: 460px;
height: 200px;
}
.vote-card-information-title {
font-size: 1.2em;
}
</style> </style>