Merge branch 'develop'
This commit is contained in:
commit
1c77e551db
9 files changed
+205
-269
No files matched your search
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.81",
|
"version": "0.0.82",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.81",
|
"version": "0.0.82",
|
||||||
"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.81",
|
"version": "0.0.82",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 281 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 MiB |
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<h3>ДО КОНЦА ГОЛОСОВАНИЯ ОСТАЛОСЬ:</h3>
|
<h6>ДО КОНЦА ГОЛОСОВАНИЯ ОСТАЛОСЬ:</h6>
|
||||||
<div class="card-count">{{ displayDays }} дней {{ displayHours }} часов {{ displayMinutes }} минут</div>
|
<div class="text-red text-h6">{{ displayDays }} дней {{ displayHours }} часов {{ displayMinutes }} минут</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
@@ -32,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, 14, 10, 10, 10);
|
const end = new Date(2025, 0, 13, 23, 59, 59);
|
||||||
const distance = end.getTime() - now.getTime();
|
const distance = end.getTime() - now.getTime();
|
||||||
|
|
||||||
if (distance < 0) {
|
if (distance < 0) {
|
||||||
|
|||||||
@@ -1,52 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row justify="center" align="center" class="pa-2">
|
<v-row justify="center" align="center" class="pa-2">
|
||||||
<v-col justify="center" align="center" class="flex-column">
|
|
||||||
|
|
||||||
<v-card width="700" height="820" class="elevation-12">
|
|
||||||
<v-card class="mb-2" color="teal-darken-1" elevation="0">
|
|
||||||
<!-- <v-card-title>Голосование</v-card-title> -->
|
|
||||||
<v-card-title color="teal-darken-1">«Мой коллега самый лучший»</v-card-title>
|
|
||||||
</v-card>
|
|
||||||
<v-card class="px-2">
|
|
||||||
<v-card-title class="bg-teal-darken-1">Процент проголосовавших</v-card-title>
|
|
||||||
<v-card-text class="text-h6 pa-1">
|
|
||||||
{{ perc_best }}%
|
|
||||||
</v-card-text>
|
|
||||||
|
|
||||||
</v-card>
|
|
||||||
|
|
||||||
<v-card class="mb-2">
|
|
||||||
<v-card-title class="bg-teal-darken-1">Лидер номинации</v-card-title>
|
|
||||||
</v-card>
|
|
||||||
<v-card class="scroll-leaders" elevation="0">
|
|
||||||
<v-card v-for="(employees, department) in max_bst" :key="department" elevation="0">
|
|
||||||
<v-card-title>{{ department }}</v-card-title>
|
|
||||||
<div v-for="employee in employees.slice(0,3)" :key="employee.name">
|
|
||||||
{{ employee.cand_name }} - {{ employee.total }}
|
|
||||||
</div>
|
|
||||||
</v-card>
|
|
||||||
</v-card>
|
|
||||||
<v-card color="teal-darken-1" class="ma-2">
|
|
||||||
<v-card-title>ФИО не участвовавших в голосовании</v-card-title>
|
|
||||||
</v-card>
|
|
||||||
<v-card elevation="0">
|
|
||||||
<v-card class="scroll-window" elevation="0">
|
|
||||||
<v-card v-for="[key, val] of Object.entries(notvotedbest)">
|
|
||||||
<v-card-title>{{ key }}</v-card-title>
|
|
||||||
<div v-for="item_fio in val">
|
|
||||||
{{ item_fio.fio }}
|
|
||||||
</div>
|
|
||||||
</v-card>
|
|
||||||
</v-card>
|
|
||||||
</v-card>
|
|
||||||
|
|
||||||
</v-card>
|
|
||||||
</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">
|
||||||
<v-card class="mb-2" color="teal-darken-1" elevation="0">
|
<v-card class="" color="teal-darken-1" elevation="0">
|
||||||
<!-- <v-card-title>Голосование</v-card-title> -->
|
<!-- <v-card-title>Голосование</v-card-title> -->
|
||||||
<v-card-title>«Хочу сказать Спасибо!»</v-card-title>
|
<v-card-title >«Лучший новогодний костюм!»</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card class="px-2">
|
<v-card class="px-2">
|
||||||
<v-card-title class="bg-teal-darken-1">Процент проголосовавших</v-card-title>
|
<v-card-title class="bg-teal-darken-1">Процент проголосовавших</v-card-title>
|
||||||
|
|||||||
@@ -1,47 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-form @submit="voteSend">
|
|
||||||
<v-card id="scroll-window-chekbox" height="300" elevation="0">
|
<v-form @submit="voteSend" ref="vot" >
|
||||||
|
<v-card id="scroll-window-chekbox" :height="heightel" elevation="0">
|
||||||
<!-- Форма голосования -->
|
<!-- Форма голосования -->
|
||||||
|
|
||||||
<v-virtual-scroll :items="persons.filter(e=>e.id_dict_department!=1)" :item-height="40">
|
<v-virtual-scroll :items="persons">
|
||||||
<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 hide-details="true" v-model="vote" :id="item.fio" :value="item.fio" :label="item.fio" required />
|
||||||
</template>
|
</template>
|
||||||
</v-virtual-scroll>
|
</v-virtual-scroll>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card-actions class="justify-center vote-button-back">
|
|
||||||
<v-dialog max-width="500" v-model="dialog">
|
<v-dialog max-width="500" v-model="dialog">
|
||||||
<template v-slot:activator>
|
<!-- <template v-slot:activator>
|
||||||
<v-btn variant="elevated" color="teal-darken-1"
|
|
||||||
@click="approveCandidate">Подтвердить выбор</v-btn>
|
</template> -->
|
||||||
</template>
|
<template v-slot:default>
|
||||||
<template v-slot:default>
|
<v-card class="justify-center align-center">
|
||||||
<v-card class="justify-center align-center">
|
<v-card-title>Вы подтверждаете выбор?</v-card-title>
|
||||||
<v-card-title>Вы подтверждаете выбор?</v-card-title>
|
<v-card-text>После подтверждения внесение измений станет невозможным.</v-card-text>
|
||||||
<v-card-text>После подтверждения внесение измений станет невозможным.</v-card-text>
|
<p>Выбранный кандидат</p>
|
||||||
<p>Выбранный кандидат</p>
|
<v-card-title v-if="approve_name">{{ approve_name }}</v-card-title>
|
||||||
<v-card-title v-if="approve_name">{{ approve_name }}</v-card-title>
|
<v-card-title v-else>Кандидат не выбран повторите голосование</v-card-title>
|
||||||
<v-card-title v-else>Кандидат не выбран повторите голосование</v-card-title>
|
<v-col class="d-flex flex-rows justify-center align-center" cols="12">
|
||||||
<v-col class="d-flex flex-rows justify-center align-center" cols="12">
|
<v-col cols="2">
|
||||||
<v-col cols="2">
|
<v-btn v-if="approve_name" variant="elevated" color="green-darken-1"
|
||||||
<v-btn v-if="approve_name" variant="elevated" color="green-darken-1"
|
@click="voteSend">ДА</v-btn>
|
||||||
@click="voteSend">ДА</v-btn>
|
<v-btn v-else variant="elevated" color="green-darken-1" @click="voteSend"
|
||||||
<v-btn v-else variant="elevated" color="green-darken-1" @click="voteSend"
|
disabled>ДА</v-btn>
|
||||||
disabled>ДА</v-btn>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="2">
|
|
||||||
<v-btn variant="elevated" color="red-darken-1"
|
|
||||||
@click="dialog = false">НЕТ</v-btn>
|
|
||||||
</v-col>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-card>
|
<v-col cols="2">
|
||||||
</template>
|
<v-btn variant="elevated" color="red-darken-1"
|
||||||
</v-dialog>
|
@click="dialog = false">НЕТ</v-btn>
|
||||||
</v-card-actions>
|
</v-col>
|
||||||
|
</v-col>
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
</v-dialog>
|
||||||
</v-form>
|
</v-form>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script scope>
|
<script scope>
|
||||||
import { ref } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { clearAxios, axiosApiInstance } from "@/utils/axios-api";
|
import { clearAxios, axiosApiInstance } from "@/utils/axios-api";
|
||||||
import { useAccountStore } from '@/store/AccountStore';
|
import { useAccountStore } from '@/store/AccountStore';
|
||||||
import Vote from "@/views/Vote.vue";
|
import Vote from "@/views/Vote.vue";
|
||||||
@@ -120,8 +121,11 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
// getVotesData();
|
// getVotesData();
|
||||||
|
const vot = ref(null)
|
||||||
|
const heightel = computed(()=>!!vot.value?vot.value.clientHeight:300)
|
||||||
return {
|
return {
|
||||||
|
vot,
|
||||||
|
heightel,
|
||||||
approveCandidate,
|
approveCandidate,
|
||||||
voteSend,
|
voteSend,
|
||||||
// vote_data,
|
// vote_data,
|
||||||
|
|||||||
@@ -331,11 +331,11 @@ export default {
|
|||||||
ico: "mdi-calendar",
|
ico: "mdi-calendar",
|
||||||
path: "/ical",
|
path: "/ical",
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// name: "Голосование",
|
name: "Голосование",
|
||||||
// ico: "mdi-vote",
|
ico: "mdi-vote",
|
||||||
// path: "/vote",
|
path: "/vote",
|
||||||
// },
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "Об инспекции",
|
name: "Об инспекции",
|
||||||
|
|||||||
+154
-181
@@ -1,101 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row justify="center" class="d-flex align-start h-100">
|
<v-row justify="center" class="d-flex align-start h-100" :style="{ backgroundImage: `url('${bgImage}')`, backgroundSize: 'cover' }">
|
||||||
<v-col cols="12" class="d-flex align-center justify-center vote-main-title pa-0 ma-0">
|
<v-col cols="12" class="d-flex align-center justify-center text-h5 py-3 ma-0">
|
||||||
<v-col cols="6" class="pb-0 mb-0">ВЫБИРАЕМ ЛУЧШИХ СОТРУДНИКОВ 2024</v-col>
|
<!-- <v-col class="pb-0 mb-0 text-center">ТЕКУЩИЕ ГОЛОСОВАНИЯ</v-col> -->
|
||||||
</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">
|
|
||||||
<div class="flip-card" :class="{ 'flipped': isFlipped1 }">
|
|
||||||
<div class="flip-card-inner">
|
|
||||||
<div v-if="!uservotedbest" class="flip-card-front">
|
|
||||||
<!-- Передняя сторона карточки -->
|
|
||||||
<v-card class="justify-center elevation-24" width="500" height="510" elevated>
|
|
||||||
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
|
||||||
<div class="justify-center">
|
|
||||||
<div>
|
|
||||||
<v-card class="vote-card-information" flat>
|
|
||||||
|
|
||||||
<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" width="500" height="510" elevated>
|
|
||||||
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
|
||||||
<div class="justify-center">
|
|
||||||
<div>
|
|
||||||
<v-card class="vote-card-information" variant="flat">
|
|
||||||
|
|
||||||
|
|
||||||
<v-card-text class="justify-center align-center
|
|
||||||
vote-card-information-title">
|
|
||||||
Выберите сотрудника,<br>
|
|
||||||
который, на Ваш взгляд,<br>
|
|
||||||
внес наибольший вклад в результат работы<br>
|
|
||||||
Отдела в 2024 году
|
|
||||||
</v-card-text>
|
|
||||||
|
|
||||||
</v-card>
|
|
||||||
</div>
|
|
||||||
<v-btn :height="100" variant="flat" type="button">
|
|
||||||
<v-img :width="100" cover src="@/assets/click3.gif"></v-img>
|
|
||||||
</v-btn>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Кнопка активации поворота КОНЕЦ-->
|
|
||||||
</v-card>
|
|
||||||
</div>
|
|
||||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
|
||||||
<div class="flip-card-back">
|
|
||||||
<!-- Задняя сторона карточки -->
|
|
||||||
<v-card class="justify-center elevation-24" width="500" height="510">
|
|
||||||
<v-card-title class="vote-title">
|
|
||||||
МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ
|
|
||||||
</v-card-title>
|
|
||||||
<v-card-text>
|
|
||||||
<vote-form :type_fetch="'best'" :persons="mydepartment" :myrealdep="myrealdep" @voted="toggleFlip1" />
|
|
||||||
</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 cols="6" justify="center" align="center">
|
<v-col cols="12" justify="center" align="center">
|
||||||
<div class="flip-card" :class="{ 'flipped': isFlipped2 }">
|
<div class="flip-card" :class="{ 'flipped': isFlipped2 }">
|
||||||
<div class="flip-card-inner">
|
<div class="flip-card-inner">
|
||||||
<div v-if="!uservotedthanks" class="flip-card-front">
|
<div v-if="!uservotedthanks" class="flip-card-front">
|
||||||
<!-- Передняя сторона карточки -->
|
<!-- Передняя сторона карточки -->
|
||||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||||
<v-card-title class="vote-title">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
<v-card-title class="text-h5 my-2">ЛУЧШИЙ НОВОГОДНИЙ КОСТЮМ</v-card-title>
|
||||||
<div class="justify-center">
|
<div class="justify-center">
|
||||||
<div>
|
<div>
|
||||||
<v-card class="vote-card-information" variant="flat">
|
<v-card class="vote-card-information" variant="flat">
|
||||||
|
|
||||||
<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>
|
||||||
<p>СПАСИБО!</p>
|
<p>СПАСИБО!</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-dialog >
|
||||||
|
<template v-slot:activator="{ props: activatorProps }">
|
||||||
|
|
||||||
|
<span class="text-h5">Проголосовало</span> <span
|
||||||
|
v-bind="admin_panel ? activatorProps : ''" class="text-green text-h4"
|
||||||
|
:class="{ 'cursor-pointer': admin_panel }">
|
||||||
|
{{
|
||||||
|
Math.round((voteresults.uservotedthanks.length * 100 / (allsorted.length + 1)).toFixed(2)) }}%</span>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-slot:default="{ isActive }">
|
||||||
|
<v-row justify="center" class="h-100 admin-vote">
|
||||||
|
<v-card width="1500" height="900">
|
||||||
|
<vote-admin :usersvotedbest="voteresults.usersvotedbest"
|
||||||
|
:uservotedthanks="voteresults.uservotedthanks"
|
||||||
|
:all_cod="allsorted" />
|
||||||
|
<v-row justify="center" align="center">
|
||||||
|
|
||||||
|
<v-btn color="teal-darken-1"
|
||||||
|
@click="isActive.value = false">ЗАКРЫТЬ</v-btn>
|
||||||
|
|
||||||
|
</v-row>
|
||||||
|
</v-card>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
</v-dialog>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Кнопка активации поворота КОНЕЦ-->
|
<!-- Кнопка активации поворота КОНЕЦ-->
|
||||||
@@ -103,27 +58,55 @@
|
|||||||
</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" width="500" height="510" variant="elevated">
|
<v-card
|
||||||
<v-card-title class="vote-title ">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
|
||||||
<div class="justify-center">
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<v-card class="vote-card-information" variant="flat">
|
|
||||||
|
|
||||||
<v-card-text class="justify-center align-center
|
class="elevation-24 d-flex align-сenter justify-space-between flex-column" width="500" height="510" variant="elevated" >
|
||||||
vote-card-information-title">
|
|
||||||
Выберите сотрудника <br>
|
<div class="">
|
||||||
(не из Вашего отдела),<br>
|
<div class="text-h5 my-2">ЛУЧШИЙ НОВОГОДНИЙ КОСТЮМ</div>
|
||||||
которому Вы лично готовы обьявить<br>
|
<div class="mt-4 ">
|
||||||
благодарность по итогам работы в 2024 году
|
<div class=" align-center font-weight-bold">
|
||||||
</v-card-text>
|
Выберите сотрудника,
|
||||||
</v-card>
|
костюм которого вам больше всего понравился
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="mt-4">
|
||||||
<v-btn :height="100" variant="flat" type="button">
|
<v-btn :height="100" variant="flat" type="button">
|
||||||
<v-img :width="100" cover src="@/assets/click3.gif"></v-img>
|
<v-img :width="100" cover src="@/assets/click3.gif"></v-img>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
</div>
|
||||||
|
<div align="center" class="">
|
||||||
|
<v-dialog >
|
||||||
|
<template v-slot:activator="{ props: activatorProps }">
|
||||||
|
|
||||||
|
<span class="text-h5">Проголосовало</span> <span
|
||||||
|
v-bind="admin_panel ? activatorProps : ''" class="text-green text-h4"
|
||||||
|
:class="{ 'cursor-pointer': admin_panel }">
|
||||||
|
{{
|
||||||
|
Math.round((voteresults.uservotedthanks.length * 100 / (allsorted.length + 1)).toFixed(2)) }}%</span>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<template v-slot:default="{ isActive }">
|
||||||
|
<v-row justify="center" class="h-100 admin-vote">
|
||||||
|
<v-card width="1500" height="900">
|
||||||
|
<vote-admin :usersvotedbest="voteresults.usersvotedbest"
|
||||||
|
:uservotedthanks="voteresults.uservotedthanks"
|
||||||
|
:all_cod="allsorted" />
|
||||||
|
<v-row justify="center" align="center">
|
||||||
|
|
||||||
|
<v-btn color="teal-darken-1"
|
||||||
|
@click="isActive.value = false">ЗАКРЫТЬ</v-btn>
|
||||||
|
|
||||||
|
</v-row>
|
||||||
|
</v-card>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
</v-dialog>
|
||||||
|
<div class="my-4"><count-down /></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Кнопка активации поворота КОНЕЦ-->
|
<!-- Кнопка активации поворота КОНЕЦ-->
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -131,18 +114,20 @@
|
|||||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
<!-- Передняя сторона карточки КОНЕЦ-->
|
||||||
<!-- Задняя сторона карточки -->
|
<!-- Задняя сторона карточки -->
|
||||||
<div class="flip-card-back">
|
<div class="flip-card-back">
|
||||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
<v-card class="d-flex align-сenter justify-space-between elevated-24 flex-column" width="500" height="510" variant="elevated">
|
||||||
<v-card-title class="vote-title ">
|
<div class="text-h5 my-2">ЛУЧШИЙ НОВОГОДНИЙ КОСТЮМ</div>
|
||||||
ХОЧУ СКАЗАТЬ СПАСИБО
|
<!-- <v-card-text class=""> -->
|
||||||
</v-card-title>
|
|
||||||
<v-card-text>
|
|
||||||
|
|
||||||
<vote-form :type_fetch="'thanks'" :persons="allsorted.filter(e=>e.department!=myrealdep.department)" :myrealdep="myrealdep" @voted="toggleFlip2" />
|
<vote-form class="flex-grow-1 " ref="voteform" :type_fetch="'thanks'"
|
||||||
</v-card-text>
|
:persons="allsorted"
|
||||||
|
:myrealdep="myrealdep" @voted="toggleFlip2" />
|
||||||
|
<!-- </v-card-text> -->
|
||||||
<!-- Кнопка активации поворота -->
|
<!-- Кнопка активации поворота -->
|
||||||
<v-card-actions class="justify-center vote-button-back">
|
<v-card-actions class="justify-center">
|
||||||
<v-btn @click="toggleFlip2" variant="elevated" color="teal-darken-1"
|
<v-btn @click="toggleFlip2" variant="elevated" color="red-darken-4"
|
||||||
type="button">назад</v-btn>
|
type="button">назад</v-btn>
|
||||||
|
<v-btn variant="elevated" color="teal-darken-1"
|
||||||
|
@click="approveCandidate">Подтвердить выбор</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
<!-- Кнопка активации поворота КОНЕЦ-->
|
<!-- Кнопка активации поворота КОНЕЦ-->
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -155,18 +140,18 @@
|
|||||||
<!-- <v-col cols="12" class="d-flex justify-center align-end ">
|
<!-- <v-col cols="12" class="d-flex justify-center align-end ">
|
||||||
<h1>ПРИНЯЛИ УЧАСТИЕ В ГОЛОСОВАНИИ</h1>
|
<h1>ПРИНЯЛИ УЧАСТИЕ В ГОЛОСОВАНИИ</h1>
|
||||||
</v-col> -->
|
</v-col> -->
|
||||||
<v-col cols="12" class="d-flex justify-center align-end pa-0">
|
<!-- <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-col v-if="admin_panel" justify="center" align="center" cols="6" class=" pa-0">
|
||||||
|
|
||||||
<v-dialog>
|
<v-dialog> -->
|
||||||
<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.filter(e=>e.department_user==mydepartment[0].department).length*100/(mydepartment.length+1)).toFixed(2))}}%
|
{{ Math.round((voteresults.usersvotedbest.filter(e=>e.department_user==mydepartment[0].department).length*100/(mydepartment.length+1)).toFixed(2))}}%
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template> -->
|
||||||
<template v-slot:default="{ isActive }">
|
<!-- <template v-slot:default="{ isActive }">
|
||||||
<v-row justify="center" class="h-100 admin-vote">
|
<v-row justify="center" class="h-100 admin-vote">
|
||||||
<v-card width="1500" height="900">
|
<v-card width="1500" height="900">
|
||||||
|
|
||||||
@@ -181,44 +166,22 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
</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.usersvotedbest.filter(e=>e.department_user==mydepartment[0].department).length )*100/(mydepartment.length+1)).toFixed(2)))}}%</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-dialog>
|
|
||||||
<template v-slot:activator="{ props: activatorProps }">
|
|
||||||
<v-btn v-bind="activatorProps " variant='plain'
|
|
||||||
class="procent_card_font pa-0" >
|
|
||||||
<span>{{ Math.round((voteresults.uservotedthanks.length*100/(allsorted.length+1)).toFixed(2))}}%</span>
|
|
||||||
</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 :usersvotedbest="voteresults.usersvotedbest" :uservotedthanks="voteresults.uservotedthanks" :all_cod="allsorted" />
|
|
||||||
<v-row justify="center" align="center">
|
|
||||||
|
|
||||||
<v-btn color="teal-darken-1"
|
<!-- <v-col v-else justify="center" align="center" cols="6" class="procent_card_font pa-0">
|
||||||
@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">
|
|
||||||
<span>{{ Math.round((voteresults.uservotedthanks.length*100/(allsorted.length+1)).toFixed(2))}}%</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">
|
||||||
<v-col justify="center" align="center" cols="6" class="vote-cards_cell ">
|
<v-col justify="center" align="center" cols="6" class="vote-cards_cell ">
|
||||||
<count-down />
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-col>
|
</v-col> -->
|
||||||
|
|
||||||
<!-- Голосование Спасибо КОНЕЦ-->
|
<!-- Голосование Спасибо КОНЕЦ-->
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -227,6 +190,7 @@
|
|||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { clearAxios, axiosApiInstance } from "@/utils/axios-api";
|
import { clearAxios, axiosApiInstance } from "@/utils/axios-api";
|
||||||
import VoteForm from '@/components/vote/VoteForm.vue';
|
import VoteForm from '@/components/vote/VoteForm.vue';
|
||||||
|
import bgImage from '@/assets/bg/bg.png';
|
||||||
|
|
||||||
import VoteAdmin from '@/components/vote/VoteAdmin.vue';
|
import VoteAdmin from '@/components/vote/VoteAdmin.vue';
|
||||||
import CountDown from '@/components/CountDown.vue';
|
import CountDown from '@/components/CountDown.vue';
|
||||||
@@ -245,42 +209,44 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const voted_best=ref([])
|
|
||||||
const full_list_pers=ref([])
|
const voteform=ref(null)
|
||||||
|
const voted_best = ref([])
|
||||||
|
const full_list_pers = ref([])
|
||||||
let votedListBst = ref([]);
|
let votedListBst = ref([]);
|
||||||
let votedListThn = ref([]);
|
let votedListThn = ref([]);
|
||||||
let voted_thn = ref(false);
|
let voted_thn = ref(false);
|
||||||
let voted_bst = ref(false);
|
let voted_bst = ref(false);
|
||||||
const myrealdep = ref({id_dict_department:0, id:0})
|
const myrealdep = ref({ id_dict_department: 0, id: 0 })
|
||||||
const uservoted=ref([true,true])
|
const uservoted = ref([true, true])
|
||||||
const allcod = ref([])
|
const allcod = ref([])
|
||||||
const isFlipped1 = ref(false);
|
const isFlipped1 = ref(false);
|
||||||
const isFlipped2 = ref(false);
|
const isFlipped2 = ref(false);
|
||||||
const voteresults=ref({usersvotedbest:[],uservotedthanks:[]} )
|
const voteresults = ref({ usersvotedbest: [], uservotedthanks: [] })
|
||||||
|
|
||||||
// const isVoted = () => {
|
// const isVoted = () => {
|
||||||
// clearAxios.get(`/api/vote/getthanks/`).then((data) => {
|
// clearAxios.get(`/api/vote/getthanks/`).then((data) => {
|
||||||
// votedListThn = data.data;
|
// votedListThn = data.data;
|
||||||
// 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) => {
|
||||||
// votedListBst = data.data;
|
// votedListBst = data.data;
|
||||||
// let finded_bst = votedListBst.find(({ voted_user }) => voted_user === account_login)
|
// let finded_bst = votedListBst.find(({ voted_user }) => voted_user === account_login)
|
||||||
// if (finded_bst.voted_user === account_login) {
|
// if (finded_bst.voted_user === account_login) {
|
||||||
// voted_bst.value = true;
|
// voted_bst.value = true;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
axiosApiInstance.get('/api/vote/getvoteinfo/').then((res)=>{
|
axiosApiInstance.get('/api/vote/getvoteinfo/').then((res) => {
|
||||||
allcod.value = res.data.allcod
|
allcod.value = res.data.allcod
|
||||||
// console.log(account_login.user);
|
// console.log(account_login.user);
|
||||||
myrealdep.value = allcod.value.find(e=>e.login === account_login.user.login)
|
myrealdep.value = allcod.value.find(e => e.login === account_login.user.login)
|
||||||
console.log(myrealdep.value);
|
console.log(myrealdep.value);
|
||||||
// uservoted.value = res.data.uservoted
|
// uservoted.value = res.data.uservoted
|
||||||
voteresults.value = res.data.voteresults
|
voteresults.value = res.data.voteresults
|
||||||
@@ -298,51 +264,58 @@ export default {
|
|||||||
isFlipped2.value = !isFlipped2.value;
|
isFlipped2.value = !isFlipped2.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['9966-00-134', '9966-00-141','9966-00-011','9966-00-125'].includes(account_login.user.login)) {
|
if (['9966-00-134', '9966-00-141', '9966-00-011', '9966-00-125'].includes(account_login.user.login)) {
|
||||||
admin_panel = true;
|
admin_panel.value = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
const allsorted = computed({
|
const allsorted = computed({
|
||||||
get(){
|
get() {
|
||||||
let all = allcod.value.filter(e=> e.id!=myrealdep.value.id)
|
let all = allcod.value.filter(e => e.id != myrealdep.value.id)
|
||||||
return all.sort((a,b)=>{if(b.fio>a.fio) return -1
|
return all.sort((a, b) => {
|
||||||
else if(b.fio<a.fio)return 1
|
if (b.fio > a.fio) return -1
|
||||||
return 0
|
else if (b.fio < a.fio) return 1
|
||||||
})
|
return 0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// isVoted();
|
// isVoted();
|
||||||
|
|
||||||
|
|
||||||
const uservotedthanks = computed({
|
const uservotedthanks = computed({
|
||||||
get(){
|
get() {
|
||||||
|
|
||||||
let ind = voteresults.value.uservotedthanks.findIndex(e=>e.voted_user===account_login.user.login)
|
let ind = voteresults.value.uservotedthanks.findIndex(e => e.voted_user === account_login.user.login)
|
||||||
|
|
||||||
if (ind>-1) return false
|
if (ind > -1) return false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const uservotedbest= computed({
|
const uservotedbest = computed({
|
||||||
get(){
|
get() {
|
||||||
|
|
||||||
let ind = voteresults.value.usersvotedbest.findIndex(e=>e.voted_user===account_login.user.login)
|
let ind = voteresults.value.usersvotedbest.findIndex(e => e.voted_user === account_login.user.login)
|
||||||
if (ind>-1) return false
|
if (ind > -1) return false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const mydepartment = computed({
|
const mydepartment = computed({
|
||||||
get(){
|
get() {
|
||||||
console.log(allcod.value);
|
console.log(allcod.value);
|
||||||
let ac= allcod.value.filter(e=> e.id_dict_department===myrealdep.value.id_dict_department && e.id!=myrealdep.value.id )
|
let ac = allcod.value.filter(e => e.id_dict_department === myrealdep.value.id_dict_department && e.id != myrealdep.value.id)
|
||||||
return ac.sort((a,b)=>{if(b.fio>a.fio) return -1
|
return ac.sort((a, b) => {
|
||||||
else if(b.fio<a.fio)return 1
|
if (b.fio > a.fio) return -1
|
||||||
return 0
|
else if (b.fio < a.fio) return 1
|
||||||
})
|
return 0
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const approveCandidate=()=>{
|
||||||
|
if (voteform.value!==null) voteform.value.approveCandidate()
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
|
approveCandidate,
|
||||||
|
voteform,
|
||||||
myrealdep,
|
myrealdep,
|
||||||
allsorted,
|
allsorted,
|
||||||
mydepartment,
|
mydepartment,
|
||||||
@@ -356,7 +329,8 @@ export default {
|
|||||||
voted_thn,
|
voted_thn,
|
||||||
uservotedthanks,
|
uservotedthanks,
|
||||||
uservotedbest,
|
uservotedbest,
|
||||||
voteresults
|
voteresults,
|
||||||
|
bgImage
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -444,5 +418,4 @@ export default {
|
|||||||
font-size: 2.3em;
|
font-size: 2.3em;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
}
|
}</style>
|
||||||
</style>
|
|
||||||
Reference in new issue
Block a user