From af1f9f752c25ac54e0e87dde686a9b39643d484f Mon Sep 17 00:00:00 2001 From: Andrei Filippov Date: Tue, 29 Oct 2024 16:38:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BD=D0=B5=D0=BB=D0=B8=20=D0=B8=D0=BD=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D0=BE=20=D0=B3?= =?UTF-8?q?=D0=BE=D0=BB=D1=81=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8E=20=D1=81?= =?UTF-8?q?=D0=BA=D0=B0=D0=B6=D0=B8=20=D1=81=D0=BF=D0=B0=D1=81=D0=B8=D0=B1?= =?UTF-8?q?=D0=BE=20=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/back/vote/urls.py | 2 + src/back/vote/views.py | 16 +++ src/front/src/components/vote/VoteAdmin.vue | 108 ++++++++++++++++---- src/front/src/views/Vote.vue | 1 - 4 files changed, 106 insertions(+), 21 deletions(-) diff --git a/src/back/vote/urls.py b/src/back/vote/urls.py index 73afc3d30..2ccb7d85d 100644 --- a/src/back/vote/urls.py +++ b/src/back/vote/urls.py @@ -9,4 +9,6 @@ urlpatterns = [ path('getthanks/', GetThanks.as_view(), name=''), path('setbest/', SetBest.as_view(), name=''), path('getbest/', GetBest.as_view(), name=''), + path('getnotvotethn/', GetNotVoteThn.as_view()), + path('getnotvotebst/', GetNotVoteBst.as_view()), ] diff --git a/src/back/vote/views.py b/src/back/vote/views.py index 50b5d9860..158ce2547 100644 --- a/src/back/vote/views.py +++ b/src/back/vote/views.py @@ -66,3 +66,19 @@ class GetBest(APIView): count_bests = BestVote.objects.values( 'cand_name').annotate(total=Count('id')) return Response(count_bests) + + +class GetNotVoteThn(APIView): + def get(self, request): + list_thn_users = ThanksVote.objects.values('voted_user') + list_emp = DictEmployee.objects.filter( + deleted=0).exclude(login__in=list_thn_users) + return Response(GetEmpSerializer(list_emp, many=True).data) + + +class GetNotVoteBst(APIView): + def get(self, request): + list_bst_users = BestVote.objects.values('voted_user') + list_emp_bst = DictEmployee.objects.filter( + deleted=0).exclude(login__in=list_bst_users) + return Response(GetEmpSerializer(list_emp_bst, many=True).data) diff --git a/src/front/src/components/vote/VoteAdmin.vue b/src/front/src/components/vote/VoteAdmin.vue index d85e73d94..a1f5629d9 100644 --- a/src/front/src/components/vote/VoteAdmin.vue +++ b/src/front/src/components/vote/VoteAdmin.vue @@ -14,14 +14,6 @@ 88 - - ФИО не участвовавших в голосовании - - - - ФИО - - Лидер номинации @@ -30,6 +22,20 @@ ФИО + + ФИО не участвовавших в голосовании + + + + + {{ key }} +
+ {{ item_fio.fio }} +
+
+
+
+ @@ -43,35 +49,97 @@ - 88 - - - - ФИО не участвовавших в голосовании - - - - ФИО + Лидер номинации - - ФИО - +
+ {{ leader }} +
+ + ФИО не участвовавших в голосовании + + + + {{ key }} +
+ {{ item_fio.fio }} +
+
+
+
\ No newline at end of file diff --git a/src/front/src/views/Vote.vue b/src/front/src/views/Vote.vue index e103fe3a6..a7eeb92fe 100644 --- a/src/front/src/views/Vote.vue +++ b/src/front/src/views/Vote.vue @@ -161,7 +161,6 @@ export default { if (account_login == '9966-00-011') { admin_panel = true; - console.log(admin_panel); } return {