Обновление
This commit is contained in:
1 parent
7c3c6a8490
commit
b4f93efc88
3 files changed
+45
-31
No files matched your search
@@ -12,7 +12,7 @@ from .serializers import *
|
|||||||
class GetForThn(APIView):
|
class GetForThn(APIView):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
user_login = request.GET.get('login')
|
user_login = request.GET.get('login')
|
||||||
all_emps = DictEmplyeeR.objects.exclude(id_dict_employee__login=user_login).exclude(id_dict_employee__post='Начальник инспекции').exclude(id_dict_employee__deleted=1)
|
all_emps = DictEmplyeeR.objects.exclude(id_dict_employee__login=user_login).exclude(id_dict_employee__post='Начальник инспекции').exclude(id_dict_employee__deleted=1).order_by('id_dict_employee__fio')
|
||||||
return Response(GetEmpSerializerR(all_emps, many=True).data)
|
return Response(GetEmpSerializerR(all_emps, many=True).data)
|
||||||
|
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ class GetForBst(APIView):
|
|||||||
user_login = request.GET.get('login')
|
user_login = request.GET.get('login')
|
||||||
dep_id = request.GET.get('dep')
|
dep_id = request.GET.get('dep')
|
||||||
emp_user = DictEmplyeeR.objects.filter(Q(id_dict_department=dep_id), ~Q(
|
emp_user = DictEmplyeeR.objects.filter(Q(id_dict_department=dep_id), ~Q(
|
||||||
id_dict_employee__post="Начальник отдела"), ~Q(id_dict_employee__login=user_login)).exclude(id_dict_employee__deleted=1)
|
id_dict_employee__post="Начальник отдела"), ~Q(id_dict_employee__login=user_login)).exclude(id_dict_employee__deleted=1).order_by('id_dict_employee__fio')
|
||||||
return Response(GetEmpSerializerR(emp_user, many=True).data)
|
return Response(GetEmpSerializerR(emp_user, many=True).data)
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ class GetThanks(APIView):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
# Группировка кандидатов по имени и подсчет каждого
|
# Группировка кандидатов по имени и подсчет каждого
|
||||||
count_thanks = ThanksVote.objects.values('voted_user',
|
count_thanks = ThanksVote.objects.values('voted_user',
|
||||||
'cand_name').annotate(total=Count('id'))
|
'cand_name').annotate(total=Count('id')).order_by('cand_name')
|
||||||
return Response(count_thanks)
|
return Response(count_thanks)
|
||||||
|
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ class SetBest(APIView):
|
|||||||
class GetBest(APIView):
|
class GetBest(APIView):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
# Группировка кандидатов по имени и подсчет каждого
|
# Группировка кандидатов по имени и подсчет каждого
|
||||||
count_bests = BestVote.objects.values('voted_user','department_user', 'cand_name').annotate(total=Count('id'))
|
count_bests = BestVote.objects.values('voted_user','department_user', 'cand_name').annotate(total=Count('id')).order_by('cand_name')
|
||||||
return Response(count_bests)
|
return Response(count_bests)
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ class GetNotVoteThn(APIView):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
list_thn_users = ThanksVote.objects.values('voted_user')
|
list_thn_users = ThanksVote.objects.values('voted_user')
|
||||||
list_emp = DictEmplyeeR.objects.filter(
|
list_emp = DictEmplyeeR.objects.filter(
|
||||||
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_thn_users)
|
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_thn_users).order_by('id_dict_employee__fio')
|
||||||
return Response(GetEmpSerializerR(list_emp, many=True).data)
|
return Response(GetEmpSerializerR(list_emp, many=True).data)
|
||||||
|
|
||||||
|
|
||||||
@@ -78,5 +78,5 @@ class GetNotVoteBst(APIView):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
list_bst_users = BestVote.objects.values('voted_user')
|
list_bst_users = BestVote.objects.values('voted_user')
|
||||||
list_emp_bst = DictEmplyeeR.objects.filter(
|
list_emp_bst = DictEmplyeeR.objects.filter(
|
||||||
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_bst_users)
|
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_bst_users).order_by('id_dict_employee__fio')
|
||||||
return Response(GetEmpSerializerR(list_emp_bst, many=True).data)
|
return Response(GetEmpSerializerR(list_emp_bst, many=True).data)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-form @submit="voteSend">
|
<v-form @submit="voteSend">
|
||||||
<v-card id="scroll-window-chekbox" height="420" elevation="0">
|
<v-card id="scroll-window-chekbox" height="300" 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 }">
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<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="d-flex align-center justify-center vote-main-title pa-0 ma-0">
|
||||||
|
<v-col cols="6" class="pb-0 mb-0">ВЫБИРАЕМ ЛУЧШИХ СОТРУДНИКОВ 2024</v-col>
|
||||||
|
</v-col>
|
||||||
<!-- Голосование Лучший сотрудник -->
|
<!-- Голосование Лучший сотрудник -->
|
||||||
<v-col cols="12" justify="center" class="d-flex vote-card-container">
|
<v-col cols="12" justify="center" class="d-flex vote-card-container">
|
||||||
<v-col cols="6" justify="center" align="center">
|
<v-col cols="6" justify="center" align="center">
|
||||||
@@ -7,12 +10,12 @@
|
|||||||
<div class="flip-card-inner">
|
<div class="flip-card-inner">
|
||||||
<div v-if="voted_bst" class="flip-card-front">
|
<div v-if="voted_bst" class="flip-card-front">
|
||||||
<!-- Передняя сторона карточки -->
|
<!-- Передняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
variant="elevated">
|
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
||||||
<div class="justify-center">
|
<div class="justify-center">
|
||||||
<div>
|
<div>
|
||||||
<v-card class="vote-card-information">
|
<v-card class="vote-card-information" variant="flat">
|
||||||
<v-card-title>«ЛУЧШИЙ В ОТДЕЛЕ»</v-card-title>
|
|
||||||
<v-card-text
|
<v-card-text
|
||||||
class="justify-center align-center vote-card-information-title">
|
class="justify-center align-center vote-card-information-title">
|
||||||
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
||||||
@@ -26,12 +29,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else class="flip-card-front" @click="toggleFlip1">
|
<div v-else class="flip-card-front" @click="toggleFlip1">
|
||||||
<!-- Передняя сторона карточки -->
|
<!-- Передняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
variant="elevated">
|
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
||||||
<div class="justify-center">
|
<div class="justify-center">
|
||||||
<div>
|
<div>
|
||||||
<v-card class="vote-card-information">
|
<v-card class="vote-card-information" variant="flat">
|
||||||
<v-card-title>«ЛУЧШИЙ В ОТДЕЛЕ»</v-card-title>
|
|
||||||
|
|
||||||
<v-card-text class="justify-center align-center
|
<v-card-text class="justify-center align-center
|
||||||
vote-card-information-title">
|
vote-card-information-title">
|
||||||
@@ -52,9 +55,9 @@
|
|||||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
<!-- Передняя сторона карточки КОНЕЦ-->
|
||||||
<div class="flip-card-back">
|
<div class="flip-card-back">
|
||||||
<!-- Задняя сторона карточки -->
|
<!-- Задняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24" width="500" height="600">
|
<v-card class="justify-center elevation-24" width="500" height="510">
|
||||||
<v-card-title>
|
<v-card-title class="vote-title">
|
||||||
«МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ»
|
МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<vote-form :type_fetch="'bst'" />
|
<vote-form :type_fetch="'bst'" />
|
||||||
@@ -78,12 +81,12 @@
|
|||||||
<div class="flip-card-inner">
|
<div class="flip-card-inner">
|
||||||
<div v-if="voted_thn" class="flip-card-front">
|
<div v-if="voted_thn" class="flip-card-front">
|
||||||
<!-- Передняя сторона карточки -->
|
<!-- Передняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
variant="elevated">
|
<v-card-title class="vote-title">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
||||||
<div class="justify-center">
|
<div class="justify-center">
|
||||||
<div>
|
<div>
|
||||||
<v-card class="vote-card-information">
|
<v-card class="vote-card-information" variant="flat">
|
||||||
<v-card-title>«ХОЧУ СКАЗАТЬ СПАСИБО»</v-card-title>
|
|
||||||
<v-card-text
|
<v-card-text
|
||||||
class="justify-center align-center vote-card-information-title">
|
class="justify-center align-center vote-card-information-title">
|
||||||
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
||||||
@@ -97,13 +100,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else class="flip-card-front" @click="toggleFlip2">
|
<div v-else class="flip-card-front" @click="toggleFlip2">
|
||||||
<!-- Передняя сторона карточки -->
|
<!-- Передняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
variant="elevated">
|
<v-card-title class="vote-title ">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
||||||
<div class="justify-center">
|
<div class="justify-center">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<v-card class="vote-card-information">
|
<v-card class="vote-card-information" variant="flat">
|
||||||
<v-card-title>«ХОЧУ СКАЗАТЬ СПАСИБО»</v-card-title>
|
|
||||||
<v-card-text class="justify-center align-center
|
<v-card-text class="justify-center align-center
|
||||||
vote-card-information-title">
|
vote-card-information-title">
|
||||||
Выберите сотрудника <br>
|
Выберите сотрудника <br>
|
||||||
@@ -120,9 +123,9 @@
|
|||||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
<!-- Передняя сторона карточки КОНЕЦ-->
|
||||||
<!-- Задняя сторона карточки -->
|
<!-- Задняя сторона карточки -->
|
||||||
<div class="flip-card-back">
|
<div class="flip-card-back">
|
||||||
<v-card class="justify-center elevation-24" width="500" height="600" variant="elevated">
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
<v-card-title>
|
<v-card-title class="vote-title ">
|
||||||
«ХОЧУ СКАЗАТЬ СПАСИБО!»
|
ХОЧУ СКАЗАТЬ СПАСИБО
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<vote-form :type_fetch="'thn'" />
|
<vote-form :type_fetch="'thn'" />
|
||||||
@@ -286,7 +289,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.vote-card-container {
|
.vote-card-container {
|
||||||
height: 620px !important;
|
height: 600px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flip-card {}
|
.flip-card {}
|
||||||
@@ -345,7 +348,7 @@ export default {
|
|||||||
|
|
||||||
.vote-card-information {
|
.vote-card-information {
|
||||||
background-color: rgba(255, 255, 255, 0.7);
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
margin-top: 45%;
|
margin-top: 30%;
|
||||||
width: 460px;
|
width: 460px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
|
||||||
@@ -354,5 +357,16 @@ export default {
|
|||||||
.vote-card-information-title {
|
.vote-card-information-title {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-title {
|
||||||
|
font-size: 1.8em;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vote-main-title {
|
||||||
|
font-size: 2.3em;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user