2
This commit is contained in:
1 parent
83246b9cbb
commit
ac735bfb9f
6 files changed
+15
-17
No files matched your search
@@ -85,7 +85,7 @@ class GetNotVoteBst(APIView):
|
|||||||
class GetVoteInfo(APIView):
|
class GetVoteInfo(APIView):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
print(request.user)
|
print(request.user)
|
||||||
allcod = DictEmplyeeR.objects.filter( ~Q(id_dict_department=1),id_dict_employee__deleted=0)
|
allcod = DictEmplyeeR.objects.filter( id_dict_employee__deleted=0)
|
||||||
|
|
||||||
# try:
|
# try:
|
||||||
realdep = allcod.get(id_dict_employee__login=request.user)
|
realdep = allcod.get(id_dict_employee__login=request.user)
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.76",
|
"version": "0.0.77",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.76",
|
"version": "0.0.77",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"-": "^0.0.1",
|
"-": "^0.0.1",
|
||||||
"@ckeditor/ckeditor5-build-classic": "^41.4.2",
|
"@ckeditor/ckeditor5-build-classic": "^41.4.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.76",
|
"version": "0.0.77",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row class="pa-2">
|
<v-row justify="center" align="center" class="pa-2">
|
||||||
<v-col cols="6" class=''>
|
<v-col justify="center" align="center" class="flex-column">
|
||||||
|
|
||||||
<v-col>
|
|
||||||
|
|
||||||
|
<v-card width="700" height="820" class="elevation-12">
|
||||||
<v-card class="mb-2" color="teal-darken-1" elevation="0">
|
<v-card class="mb-2" color="teal-darken-1" elevation="0">
|
||||||
<!-- <v-card-title>Голосование</v-card-title> -->
|
<!-- <v-card-title>Голосование</v-card-title> -->
|
||||||
<v-card-title color="teal-darken-1">«Мой коллега самый лучший»</v-card-title>
|
<v-card-title color="teal-darken-1">«Мой коллега самый лучший»</v-card-title>
|
||||||
@@ -27,7 +26,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
|
||||||
<v-card color="teal-darken-1" class="ma-2">
|
<v-card color="teal-darken-1" class="ma-2">
|
||||||
<v-card-title>ФИО не участвовавших в голосовании</v-card-title>
|
<v-card-title>ФИО не участвовавших в голосовании</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -42,7 +40,7 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col justify="center" align="center">
|
<v-col justify="center" align="center">
|
||||||
<v-card width="700" height="820" class="elevation-12">
|
<v-card width="700" height="820" class="elevation-12">
|
||||||
@@ -317,7 +315,7 @@ export default {
|
|||||||
|
|
||||||
.scroll-leaders {
|
.scroll-leaders {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
height: 95px;
|
height: 125px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-window {
|
.scroll-window {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<v-form @submit="voteSend">
|
<v-form @submit="voteSend">
|
||||||
<v-card id="scroll-window-chekbox" height="300" elevation="0">
|
<v-card id="scroll-window-chekbox" height="300" elevation="0">
|
||||||
<!-- Форма голосования -->
|
<!-- Форма голосования -->
|
||||||
|
|
||||||
<v-virtual-scroll :items="type_fetch=='best'?persons.filter(e=>e.post!='Начальник отдела'):persons" :item-height="40">
|
<v-virtual-scroll :items="persons.filter(e=>e.id_dict_department!=1)" :item-height="40">
|
||||||
<template v-slot:default="{ item }">
|
<template v-slot:default="{ item }">
|
||||||
<v-checkbox v-model="vote" :id="item.fio" :value="item.fio" :label="item.fio" required />
|
<v-checkbox v-model="vote" :id="item.fio" :value="item.fio" :label="item.fio" required />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
<template v-slot:activator="{ props: activatorProps }">
|
<template v-slot:activator="{ props: activatorProps }">
|
||||||
<v-btn v-bind="activatorProps " variant='plain'
|
<v-btn v-bind="activatorProps " variant='plain'
|
||||||
class="procent_card_font pa-0">
|
class="procent_card_font pa-0">
|
||||||
{{ Math.round(voteresults.usersvotedbest.length*100/(mydepartment.length+1))}}%
|
{{ Math.round((voteresults.usersvotedbest.length*100/(mydepartment.length+1)).toFixed(2))}}%
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:default="{ isActive }">
|
<template v-slot:default="{ isActive }">
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col v-else justify="center" align="center" cols="6" class="procent_card_font pa-0">
|
<v-col v-else justify="center" align="center" cols="6" class="procent_card_font pa-0">
|
||||||
|
|
||||||
<span>{{ (Math.round(voteresults.usersvotedbest.filter(e=>e.department_user==mydepartment[0].department).length )*100/(mydepartment.length+1))}}%</span>
|
<span>{{ (Math.round(((voteresults.usersvotedbest.filter(e=>e.department_user==mydepartment[0].department).length )*100/(mydepartment.length+1)).toFixed(2)))}}%</span>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col v-if="admin_panel" justify="center" align="center" cols="6" class=" pa-0">
|
<v-col v-if="admin_panel" justify="center" align="center" cols="6" class=" pa-0">
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
<template v-slot:activator="{ props: activatorProps }">
|
<template v-slot:activator="{ props: activatorProps }">
|
||||||
<v-btn v-bind="activatorProps " variant='plain'
|
<v-btn v-bind="activatorProps " variant='plain'
|
||||||
class="procent_card_font pa-0" >
|
class="procent_card_font pa-0" >
|
||||||
<span>{{ Math.round(voteresults.uservotedthanks.length*100/(allsorted.length+1))}}%</span>
|
<span>{{ Math.round((voteresults.uservotedthanks.length*100/(allsorted.length+1)).toFixed(2))}}%</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:default="{ isActive }">
|
<template v-slot:default="{ isActive }">
|
||||||
@@ -209,7 +209,7 @@
|
|||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col v-else justify="center" align="center" cols="6" class="procent_card_font pa-0">
|
<v-col v-else justify="center" align="center" cols="6" class="procent_card_font pa-0">
|
||||||
<span>{{ Math.round(voteresults.uservotedthanks.length*100/(allsorted.length+1))}}%</span>
|
<span>{{ Math.round((voteresults.uservotedthanks.length*100/(allsorted.length+1)).toFixed(2))}}%</span>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12" class="d-flex justify-center align-start pa-0">
|
<v-col cols="12" class="d-flex justify-center align-start pa-0">
|
||||||
|
|||||||
Reference in new issue
Block a user