Merge branch 'fil_P-10' of https://sulaco.nodered.ru:5333/COD2/PORTAL_COD2 into fil_P-10
This commit is contained in:
commit
e315e2824a
19 files changed
+432
-565
No files matched your search
@@ -50,10 +50,10 @@ class GetVacancies(ListAPIView):
|
|||||||
|
|
||||||
class PostResponseVacancies(ListAPIView):
|
class PostResponseVacancies(ListAPIView):
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
|
||||||
a = ResponseVacancy.objects.create(**json.loads(request.data['data']), file = request.data['file'] if 'file' in request.data else None)
|
|
||||||
|
|
||||||
data = {'sendto':[a.vacancy.department.id_chief.lotus], 'subject': f'Отклик на вакансию {a.vacancy.name} от {a.fio}', 'body_text':f'Почта:{a.email} ----- Телефон: {a.tel} ---- Сопроводительное письмо: {a.text}'}
|
a = ResponseVacancy.objects.create(**json.loads(request.data['data']), file = request.data['file'] if 'file' in request.data else None)
|
||||||
|
okib = DictDepartment.objects.get(id=22)
|
||||||
|
data = {'sendto':[a.vacancy.department.id_chief.lotus, okib.id_chief.lotus], 'subject': f'Отклик на вакансию {a.vacancy.name} от {a.fio}', 'body_text':f'Почта:{a.email} ----- Телефон: {a.tel} ---- Сопроводительное письмо: {a.text}'}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
requests.post('http://10.252.44.13:8005/', data = data, files = [request.data['file']] if 'file' in request.data else [], timeout=2)
|
requests.post('http://10.252.44.13:8005/', data = data, files = [request.data['file']] if 'file' in request.data else [], timeout=2)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class MyTokenObtainPairSerializer(TokenObtainPairSerializer):
|
|||||||
token['user']=model_to_dict(user.userinfo)
|
token['user']=model_to_dict(user.userinfo)
|
||||||
token['user']['is_active']=user.is_active
|
token['user']['is_active']=user.is_active
|
||||||
token['user']['is_staff']=user.is_staff
|
token['user']['is_staff']=user.is_staff
|
||||||
|
token['user']['is_superuser']=user.is_superuser
|
||||||
# !ТУТ СДЕЛАТь ФОТО НАВЕРНОЕ
|
# !ТУТ СДЕЛАТь ФОТО НАВЕРНОЕ
|
||||||
# token['user']['last_login']= user.last_login
|
# token['user']['last_login']= user.last_login
|
||||||
# print(token)
|
# print(token)
|
||||||
|
|||||||
@@ -17,12 +17,17 @@ class getuserAPIView(APIView):
|
|||||||
Параметр: userlogin
|
Параметр: userlogin
|
||||||
Пример: GET /api/accounts/getuser/?userlogin=9966-00-107
|
Пример: GET /api/accounts/getuser/?userlogin=9966-00-107
|
||||||
Результат: Выдает все данные о пользователе
|
Результат: Выдает все данные о пользователе
|
||||||
|
Если дать дополнительный параметр fullinfo = True, то будет выдаваться информация с комиссиями и ответсвенностью
|
||||||
"""
|
"""
|
||||||
|
resp = None
|
||||||
|
fullinfo = request.query_params.get('fullinfo')
|
||||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||||
|
if(fullinfo is None or fullinfo == False ):
|
||||||
|
resp = InfoUserCardSerializer(queryset).data
|
||||||
|
|
||||||
|
else:
|
||||||
|
resp = CardUserSerializer(queryset).data
|
||||||
|
|
||||||
|
return Response(resp)
|
||||||
return Response(CardUserSerializer(queryset).data)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.utils.safestring import mark_safe
|
|
||||||
|
|
||||||
from .models import *
|
from .models import *
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
|
|
||||||
|
class ExclusionDatesAdmin(admin.ModelAdmin):
|
||||||
|
list_display=('exclusiondate',)
|
||||||
|
|
||||||
|
admin.site.register(ExclusionDates, ExclusionDatesAdmin)
|
||||||
@@ -2,7 +2,7 @@ from django.db import models
|
|||||||
from accounts.models import *
|
from accounts.models import *
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from enum import Enum
|
# from enum import Enum
|
||||||
from ckeditor_uploader.fields import RichTextUploadingField
|
from ckeditor_uploader.fields import RichTextUploadingField
|
||||||
|
|
||||||
class CalendarEventsName(models.Model):
|
class CalendarEventsName(models.Model):
|
||||||
@@ -10,18 +10,18 @@ class CalendarEventsName(models.Model):
|
|||||||
name=models.CharField(max_length=300, verbose_name='Название Календаря')
|
name=models.CharField(max_length=300, verbose_name='Название Календаря')
|
||||||
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор Календаря')
|
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор Календаря')
|
||||||
|
|
||||||
class EnumChoice(Enum):
|
# class EnumChoice(Enum):
|
||||||
@classmethod
|
# @classmethod
|
||||||
def get_choices(cls):
|
# def get_choices(cls):
|
||||||
return [(enum_.name, enum_.value) for enum_ in cls]
|
# return [(enum_.name, enum_.value) for enum_ in cls]
|
||||||
|
|
||||||
class FrequencyEvents(EnumChoice):
|
# class FrequencyEvents(EnumChoice):
|
||||||
default = "Без периода"
|
# default = "Без периода"
|
||||||
daily = "Ежедневно"
|
# daily = "Ежедневно"
|
||||||
weekly = "Еженедельно"
|
# weekly = "Еженедельно"
|
||||||
monthly = "Ежемесячно"
|
# monthly = "Ежемесячно"
|
||||||
annually = "Ежегодно"
|
# annually = "Ежегодно"
|
||||||
twice_a_year = "Два раза в год"
|
# twice_a_year = "Два раза в год"
|
||||||
|
|
||||||
class CalendarEvents(models.Model):
|
class CalendarEvents(models.Model):
|
||||||
""" Основные данные по событиям"""
|
""" Основные данные по событиям"""
|
||||||
@@ -55,6 +55,7 @@ class ParticipantsEvent(models.Model):
|
|||||||
participant = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Участник события')
|
participant = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Участник события')
|
||||||
event = models.ForeignKey(CalendarEvents, on_delete=models.PROTECT, related_name='get_calendar_events', verbose_name='Событие')
|
event = models.ForeignKey(CalendarEvents, on_delete=models.PROTECT, related_name='get_calendar_events', verbose_name='Событие')
|
||||||
|
|
||||||
|
# <<<<<<< HEAD
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Модели(Таблицы) для хранения календаря
|
# Модели(Таблицы) для хранения календаря
|
||||||
@@ -92,3 +93,16 @@ class TableEventParticipant(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# =======
|
||||||
|
class ExclusionDates(models.Model):
|
||||||
|
""" Таблица, которая содержит даты-исключения. То есть, все праздничные дни,
|
||||||
|
которые не попадают на выходные и все будни, которые праздничные """
|
||||||
|
exclusiondate = models.DateField(null=True, blank= True, verbose_name='Дата-исключение')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Дата-исключение"
|
||||||
|
verbose_name_plural = "Даты-исключение"
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.exclusiondate)
|
||||||
|
# >>>>>>> 96ceeb3252de4f48195eb5969f6b3d1d7affbe84
|
||||||
@@ -127,6 +127,7 @@ class CardUserSerializer(serializers.ModelSerializer):
|
|||||||
return Committee2Serializer(obj.user_committe2.all(), many=True).data
|
return Committee2Serializer(obj.user_committe2.all(), many=True).data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class InfoUserCardSerializer(serializers.ModelSerializer):
|
class InfoUserCardSerializer(serializers.ModelSerializer):
|
||||||
""" Собирает необходимую информацию о пользователе, содержит необходимые
|
""" Собирает необходимую информацию о пользователе, содержит необходимые
|
||||||
поля для отрисовки карточки информации о пользователе при клике на фамилию
|
поля для отрисовки карточки информации о пользователе при клике на фамилию
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
width="600"
|
width="600"
|
||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
>
|
>
|
||||||
<v-card height="480">
|
<v-card height="500">
|
||||||
<v-card-title class="pl-6">
|
<v-card-title class="pl-6">
|
||||||
Информация
|
Информация
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
<v-card-actions class="align-self-end pt-0">
|
<v-card-actions class="align-self-end py-0">
|
||||||
<v-btn
|
<v-btn
|
||||||
color="modal_btn"
|
color="modal_btn"
|
||||||
variant="text"
|
variant="text"
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="h-100">
|
||||||
|
<v-list-item
|
||||||
<v-list-item v-if="from_which=='dialog-search'" class="pl-4 h-100 text-left pa-2" @click="open=true">
|
v-if="from_which == 'dialog-search'"
|
||||||
|
class="pl-4 h-100 text-left pa-2"
|
||||||
|
@click="open = true"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-avatar
|
<v-avatar
|
||||||
color="grey-darken-3"
|
color="grey-darken-3"
|
||||||
@@ -16,10 +19,14 @@
|
|||||||
</v-list-item-subtitle>
|
</v-list-item-subtitle>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item v-if="from_which=='top-user'" class="h-100 text-left pa-0 pl-0 " @click="open=true">
|
<v-list-item
|
||||||
|
v-if="from_which == 'top-user'"
|
||||||
|
class="h-100 text-left pa-0 pl-0"
|
||||||
|
@click="open = true"
|
||||||
|
>
|
||||||
<v-chip
|
<v-chip
|
||||||
class="cursor-pointer pa-0"
|
class="cursor-pointer pa-0"
|
||||||
variant='text'
|
variant="text"
|
||||||
label
|
label
|
||||||
color="grey-darken-3"
|
color="grey-darken-3"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -31,14 +38,10 @@
|
|||||||
/>
|
/>
|
||||||
<span class="font-weight-medium text-grey-darken-3 myleft text-caption">
|
<span class="font-weight-medium text-grey-darken-3 myleft text-caption">
|
||||||
{{ splitname(author) }}
|
{{ splitname(author) }}
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</v-chip>
|
</v-chip>
|
||||||
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<v-img
|
<v-img
|
||||||
v-if="from_which == 'top_comment'"
|
v-if="from_which == 'top_comment'"
|
||||||
@click="open = true"
|
@click="open = true"
|
||||||
@@ -47,58 +50,47 @@
|
|||||||
:src="checkremote(`${spravURL}${author.login}.jpg`)"
|
:src="checkremote(`${spravURL}${author.login}.jpg`)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<info-user-card
|
<info-user-card
|
||||||
:author="author"
|
:author="author"
|
||||||
:opendialog = open
|
:opendialog="open"
|
||||||
@update:opendialog="open = $event"
|
@update:opendialog="open = $event"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref } from 'vue'
|
import { ref } from "vue";
|
||||||
import {checkremote} from '@/utils/universal_functions'
|
import { checkremote } from "@/utils/universal_functions";
|
||||||
import { spravURL } from '@/utils/axios-api'
|
import { spravURL } from "@/utils/axios-api";
|
||||||
import {splitname} from '@/utils/universal_functions'
|
import { splitname } from "@/utils/universal_functions";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "list-user",
|
name: "list-user",
|
||||||
props: {
|
props: {
|
||||||
author: {
|
author: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {},
|
||||||
},
|
},
|
||||||
|
|
||||||
from_which: {
|
from_which: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "dialog-search"
|
default: "dialog-search",
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
|
const open = ref(false);
|
||||||
const open = ref(false)
|
|
||||||
|
|
||||||
|
|
||||||
const style_item_title = () => {
|
const style_item_title = () => {
|
||||||
if (props.from_which == "top-user") {
|
if (props.from_which == "top-user") {
|
||||||
return "text-body-1 font-weight-medium"
|
return "text-body-1 font-weight-medium";
|
||||||
}
|
} else return "text-body-1 font-weight-medium pt-2";
|
||||||
else
|
};
|
||||||
return "text-body-1 font-weight-medium pt-2"
|
|
||||||
}
|
|
||||||
|
|
||||||
const style_item_subtitle = () => {
|
const style_item_subtitle = () => {
|
||||||
if (props.from_which == "top-user") {
|
if (props.from_which == "top-user") {
|
||||||
return "text-caption"
|
return "text-caption";
|
||||||
}
|
} else return "pb-2";
|
||||||
else
|
};
|
||||||
return "pb-2"
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
open,
|
open,
|
||||||
@@ -106,12 +98,10 @@ export default {
|
|||||||
spravURL,
|
spravURL,
|
||||||
style_item_title,
|
style_item_title,
|
||||||
style_item_subtitle,
|
style_item_subtitle,
|
||||||
splitname
|
splitname,
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -44,7 +44,6 @@
|
|||||||
<v-card-text class="text-center text-body-2">
|
<v-card-text class="text-center text-body-2">
|
||||||
<p>
|
<p>
|
||||||
Государственный советник Российской Федерации 2 класса
|
Государственный советник Российской Федерации 2 класса
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
v-for="structure in structures"
|
v-for="structure in structures"
|
||||||
:key="structure.id"
|
:key="structure.id"
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-row no-gutters class="flex-grow-0">
|
<v-row no-gutters class="flex-grow-0">
|
||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row no-gutters class="mb-2 mt-1 justify-center d-flex mx-1">
|
<v-row no-gutters class="mb-2 mt-1 justify-center d-flex mx-1">
|
||||||
@@ -34,16 +33,21 @@
|
|||||||
class="d-flex py-3 justify-center align-center font-weight-medium text-uppercase"
|
class="d-flex py-3 justify-center align-center font-weight-medium text-uppercase"
|
||||||
>
|
>
|
||||||
{{ structure.post }}
|
{{ structure.post }}
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col lg="4" class="pa-1 heightfoto">
|
<v-col lg="4" class="pa-1 heightfoto">
|
||||||
<v-img
|
|
||||||
|
<list-user :author="structure" :from_which="'top_comment'" />
|
||||||
|
<!-- <v-img
|
||||||
class="h-100"
|
class="h-100"
|
||||||
:src="checkremote(`${spravURL}${structure.login}.jpg`)"
|
:src="
|
||||||
|
checkremote(`${spravURL}${structure.login}.jpg`)
|
||||||
|
"
|
||||||
cover
|
cover
|
||||||
/>
|
/> -->
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col
|
<v-col
|
||||||
class="text-center align-self-center font-weight-medium"
|
class="text-center align-self-center font-weight-medium"
|
||||||
@@ -52,13 +56,14 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card> </v-row>
|
</v-card>
|
||||||
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<!-- :class="mdAndDown ? 'flex-column gap' : ''" -->
|
<!-- :class="mdAndDown ? 'flex-column gap' : ''" -->
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row no-gutters :class="lgAndDown ? '' : 'gap h-0 overflow-auto'">
|
<v-row no-gutters :class="lgAndDown ? '' : 'gap h-0 overflow-auto'">
|
||||||
<v-col lg=12 >
|
<v-col lg="12">
|
||||||
<v-row
|
<v-row
|
||||||
no-gutters
|
no-gutters
|
||||||
class="gap mb-1"
|
class="gap mb-1"
|
||||||
@@ -101,21 +106,14 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col> </v-row>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
<!-- -->
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -145,7 +143,7 @@ export default {
|
|||||||
spravURL,
|
spravURL,
|
||||||
mdAndDown,
|
mdAndDown,
|
||||||
lgAndDown,
|
lgAndDown,
|
||||||
smAndDown
|
smAndDown,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<v-row no-gutters>
|
||||||
|
<v-col class="flex-grow-0 d-flex flex-column"
|
||||||
|
><v-card class="h-100 rounded-0 d-flex flex-colmn" width="250">
|
||||||
|
<v-row no-gutters class="flex-column">
|
||||||
|
<v-col class="flex-grow-0">
|
||||||
|
<v-btn></v-btn>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="w100" lg="3">
|
||||||
|
<v-locale-provider locale="ru">
|
||||||
|
<v-date-picker
|
||||||
|
ref="cal"
|
||||||
|
v-model="selectdate"
|
||||||
|
color="btn_text"
|
||||||
|
class="rounded-0 minCal"
|
||||||
|
max-width="250"
|
||||||
|
hide-header
|
||||||
|
show-adjacent-months
|
||||||
|
>
|
||||||
|
<v-btn @click="refpuk"> </v-btn>
|
||||||
|
</v-date-picker>
|
||||||
|
</v-locale-provider>
|
||||||
|
</v-col>
|
||||||
|
<v-col></v-col>
|
||||||
|
</v-row>
|
||||||
|
<!-- <v-date-picker show-adjacent-months></v-date-picker> -->
|
||||||
|
</v-card></v-col
|
||||||
|
>
|
||||||
|
<v-col class="bg-green">
|
||||||
|
<v-btn @click="drawer_right = !drawer_right">
|
||||||
|
{{ drawer_right }}
|
||||||
|
</v-btn>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<div>
|
<v-navigation-drawer
|
||||||
|
v-model="drawer_right"
|
||||||
|
floating
|
||||||
|
permanent
|
||||||
|
location="right"
|
||||||
|
rail-width="400"
|
||||||
|
rail
|
||||||
|
>
|
||||||
|
</v-navigation-drawer>
|
||||||
|
</v-row>
|
||||||
|
<!-- <div>
|
||||||
<v-btn @click="f_feedbackdata"> ical</v-btn>
|
<v-btn @click="f_feedbackdata"> ical</v-btn>
|
||||||
|
|
||||||
<v-file-input
|
<v-file-input
|
||||||
@@ -15,32 +57,55 @@
|
|||||||
accept=".ics"
|
accept=".ics"
|
||||||
@input="handleFilesUpload"
|
@input="handleFilesUpload"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { axiosApiInstance } from "@/utils/axios-api";
|
import { axiosApiInstance } from "@/utils/axios-api";
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed, onMounted } from "vue";
|
||||||
|
|
||||||
import ical from "ical.js";
|
import ical from "ical.js";
|
||||||
|
import { useWeekendsStore } from '@/store/WeekendsStore'
|
||||||
|
|
||||||
// const burl = baseURL.slice(0, -1);
|
// const burl = baseURL.slice(0, -1);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
const week= useWeekendsStore()
|
||||||
|
const drawer_right = ref(false);
|
||||||
|
const cal = ref(null)
|
||||||
const participant = ref("");
|
const participant = ref("");
|
||||||
const calendar = ref("");
|
const calendar = ref("");
|
||||||
const calendarEvents = ref([]);
|
const calendarEvents = ref([]);
|
||||||
|
const selectdate = ref(new Date())
|
||||||
|
const hol = ['2024-05-09', '2024-05-11']
|
||||||
|
|
||||||
|
const addWeekend = () => {
|
||||||
|
console.log(week);
|
||||||
|
}
|
||||||
|
|
||||||
|
addWeekend()
|
||||||
|
onMounted(()=>{
|
||||||
|
|
||||||
|
cal.value.$el.querySelectorAll(".v-date-picker-month__day").forEach((e)=>{
|
||||||
|
if (hol.includes(e.getAttribute("data-v-date"))) {
|
||||||
|
e.querySelectorAll("span").forEach(n=>{n.classList.add("text-red")})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
function f_feedbackdata() {
|
function f_feedbackdata() {
|
||||||
|
|
||||||
axiosApiInstance
|
axiosApiInstance
|
||||||
.post(`api/calendar_of_events/calendarEvents/`, {
|
.post(`api/calendar_of_events/calendarEvents/`, {
|
||||||
participants: participant.value,
|
participants: participant.value,
|
||||||
calendar: calendar.value }).then((data) => {
|
calendar: calendar.value,
|
||||||
console.log(data, "datas");
|
|
||||||
})
|
})
|
||||||
|
.then((data) => {
|
||||||
|
console.log(data, "datas");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleFilesUpload = (event) => {
|
const handleFilesUpload = (event) => {
|
||||||
@@ -57,8 +122,6 @@ function f_feedbackdata() {
|
|||||||
reader.onload = (event) => {
|
reader.onload = (event) => {
|
||||||
parseICS(event.target.result);
|
parseICS(event.target.result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
const parseICS = (text) => {
|
const parseICS = (text) => {
|
||||||
const jcalData = ical.parse(text);
|
const jcalData = ical.parse(text);
|
||||||
@@ -83,23 +146,38 @@ function f_feedbackdata() {
|
|||||||
place: event.location,
|
place: event.location,
|
||||||
// attendees: attendees, ? Такая же история 0 в базе нет
|
// attendees: attendees, ? Такая же история 0 в базе нет
|
||||||
cdate: new Date(event.component.jCal[1][6][3]),
|
cdate: new Date(event.component.jCal[1][6][3]),
|
||||||
content: ''
|
content: "",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
participant.value = name;
|
participant.value = name;
|
||||||
calendar.value = calendarEvents;
|
calendar.value = calendarEvents;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
handleFilesUpload,
|
handleFilesUpload,
|
||||||
calendarEvents,
|
calendarEvents,
|
||||||
f_feedbackdata
|
f_feedbackdata,
|
||||||
|
drawer_right,
|
||||||
|
selectdate,
|
||||||
|
cal
|
||||||
|
};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style>
|
||||||
|
.minCal .v-date-picker-month__day {
|
||||||
|
height: 31px;
|
||||||
|
width: 31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.minCal .v-btn--icon.v-btn--density-default {
|
||||||
|
width: calc(var(--v-btn-height) + 12px);
|
||||||
|
height: calc(var(--v-btn-height) + 6px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.minCal .v-btn__content {
|
||||||
|
font-weight: 410;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<v-btn @click="useICalReader"> ical</v-btn>
|
<v-btn @click="useICalReader"> ical</v-btn>
|
||||||
<my-helper :pretext="events" />
|
<!-- <my-helper :pretext="events" /> -->
|
||||||
<v-sheet
|
<v-sheet
|
||||||
class="d-flex"
|
class="d-flex"
|
||||||
height="54"
|
height="54"
|
||||||
|
|||||||
@@ -126,8 +126,13 @@
|
|||||||
><v-col>
|
><v-col>
|
||||||
<v-list nav density="compact">
|
<v-list nav density="compact">
|
||||||
<template v-for="(x, key) in navigations">
|
<template v-for="(x, key) in navigations">
|
||||||
|
<!-- v-if="!('submenu' in x) || (x.path== '/portal' && accountStore.user.is_staff)" -->
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-if="!('submenu' in x)"
|
v-if="
|
||||||
|
(x.path == '/portal'
|
||||||
|
? accountStore.user.is_superuser
|
||||||
|
: true) && !('submenu' in x)
|
||||||
|
"
|
||||||
:key="x.key"
|
:key="x.key"
|
||||||
:title="x.name"
|
:title="x.name"
|
||||||
:value="x.name"
|
:value="x.name"
|
||||||
@@ -137,6 +142,7 @@
|
|||||||
:target="x.link ? '_blank' : ''"
|
:target="x.link ? '_blank' : ''"
|
||||||
color="navigation"
|
color="navigation"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- Чтобы сделать неактивным раздел безопасность, не забыть прописать путь до него в disabled для показа -->
|
<!-- Чтобы сделать неактивным раздел безопасность, не забыть прописать путь до него в disabled для показа -->
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-icon :icon="x.ico" />
|
<v-icon :icon="x.ico" />
|
||||||
@@ -147,7 +153,7 @@
|
|||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-group
|
<v-list-group
|
||||||
v-else
|
v-if="x.path != '/portal' && 'submenu' in x"
|
||||||
:class="rail ? 'railmenu' : ''"
|
:class="rail ? 'railmenu' : ''"
|
||||||
:key="key"
|
:key="key"
|
||||||
:value="x.name"
|
:value="x.name"
|
||||||
@@ -266,7 +272,6 @@
|
|||||||
permanent
|
permanent
|
||||||
location="right"
|
location="right"
|
||||||
@click="rail = false"
|
@click="rail = false"
|
||||||
|
|
||||||
>
|
>
|
||||||
<Online-users />
|
<Online-users />
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
@@ -372,6 +377,11 @@ export default {
|
|||||||
// ]
|
// ]
|
||||||
|
|
||||||
const navigations = ref([
|
const navigations = ref([
|
||||||
|
{
|
||||||
|
name: "Новости",
|
||||||
|
ico: "mdi-newspaper",
|
||||||
|
path: "/news",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Структура",
|
name: "Структура",
|
||||||
ico: "mdi-source-branch",
|
ico: "mdi-source-branch",
|
||||||
@@ -407,15 +417,11 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// ],
|
// ],
|
||||||
// },
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "Новости",
|
name: "Календарь",
|
||||||
ico: "mdi-newspaper",
|
ico: "mdi-calendar",
|
||||||
path: "/news",
|
path: "/ical",
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "О портале",
|
|
||||||
ico: "mdi-information-variant",
|
|
||||||
path: "/portal",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -423,10 +429,11 @@ export default {
|
|||||||
ico: "mdi-city",
|
ico: "mdi-city",
|
||||||
path: "/inspection",
|
path: "/inspection",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "ical",
|
name: "О портале",
|
||||||
ico: "mdi-calendar",
|
ico: "mdi-information-variant",
|
||||||
path: "/ical",
|
path: "/portal",
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
@@ -451,7 +458,7 @@ export default {
|
|||||||
if (!item.path.startsWith("/")) {
|
if (!item.path.startsWith("/")) {
|
||||||
item.path = "/" + item.path;
|
item.path = "/" + item.path;
|
||||||
}
|
}
|
||||||
item.path="/safety"+item.path
|
item.path = "/safety" + item.path;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.data.length > 0) {
|
if (response.data.length > 0) {
|
||||||
@@ -460,7 +467,7 @@ export default {
|
|||||||
ico: "mdi-security",
|
ico: "mdi-security",
|
||||||
submenu: response.data,
|
submenu: response.data,
|
||||||
};
|
};
|
||||||
navigations.value.splice(5, 0, safetyMenu);
|
navigations.value.splice(4, 0, safetyMenu);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,153 +1,173 @@
|
|||||||
// Composables
|
// Composables
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from "vue-router";
|
||||||
|
import { useAccountStore } from "@/store/AccountStore";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
component: () => import('@/layouts/default/DefaultPortal.vue'),
|
component: () => import("@/layouts/default/DefaultPortal.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title:"Вход"
|
title: "Вход",
|
||||||
},
|
},
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
name: 'HomePage',
|
name: "HomePage",
|
||||||
component: () => import('@/views/HomePage.vue'),
|
component: () => import("@/views/HomePage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Портал МИ ФНС России по ЦОД №2",
|
title: "Портал МИ ФНС России по ЦОД №2",
|
||||||
ico: "mdi-arrow-top-right"
|
ico: "mdi-arrow-top-right",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/okib',
|
path: "/okib",
|
||||||
name: 'OKiBPage',
|
name: "OKiBPage",
|
||||||
component: () => import('@/views/nested_view/o_OKiB.vue'),
|
component: () => import("@/views/nested_view/o_OKiB.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Отдел кадров и безопасности",
|
title: "Отдел кадров и безопасности",
|
||||||
ico: "mdi-comment-account-outline"
|
ico: "mdi-comment-account-outline",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/providing',
|
path: "/providing",
|
||||||
name: 'ProvidingActivitiesPage',
|
name: "ProvidingActivitiesPage",
|
||||||
component: () => import('@/views/ProvidingActivitiesPage.vue'),
|
component: () => import("@/views/ProvidingActivitiesPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Обеспечивающая деятельность",
|
title: "Обеспечивающая деятельность",
|
||||||
ico: "mdi-bulletin-board"
|
ico: "mdi-bulletin-board",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/faq',
|
path: "/faq",
|
||||||
name: 'FAQPage',
|
name: "FAQPage",
|
||||||
component: () => import('@/views/FAQPage.vue'),
|
component: () => import("@/views/FAQPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Часто задаваемые вопросы",
|
title: "Часто задаваемые вопросы",
|
||||||
ico: "mdi-comment-question-outline"
|
ico: "mdi-comment-question-outline",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/feedback',
|
path: "/feedback",
|
||||||
name: 'FeedbackPage',
|
name: "FeedbackPage",
|
||||||
component: () => import('@/views/FeedbackPage.vue'),
|
component: () => import("@/views/FeedbackPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Обратная связь",
|
title: "Обратная связь",
|
||||||
ico: "mdi-thumb-up-outline"
|
ico: "mdi-thumb-up-outline",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/labor',
|
path: "/labor",
|
||||||
name: 'LaborProtection',
|
name: "LaborProtection",
|
||||||
component: () => import('@/views/LaborProtection.vue'),
|
component: () => import("@/views/LaborProtection.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Охрана труда",
|
title: "Охрана труда",
|
||||||
ico: "mdi-pharmacy"
|
ico: "mdi-pharmacy",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/securyty',
|
path: "/securyty",
|
||||||
name: 'SecurityPage',
|
name: "SecurityPage",
|
||||||
component: () => import('@/views/SecurityPage.vue'),
|
component: () => import("@/views/SecurityPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Безопасность",
|
title: "Безопасность",
|
||||||
ico: "mdi-security"
|
ico: "mdi-security",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/safety/:chapter',
|
path: "/safety/:chapter",
|
||||||
component: () => import('@/views/safety/ChaptersSafety.vue'),
|
component: () => import("@/views/safety/ChaptersSafety.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Разделы безопасности",
|
title: "Разделы безопасности",
|
||||||
ico: "mdi-fire-extinguisher",
|
ico: "mdi-fire-extinguisher",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/inspection',
|
path: "/inspection",
|
||||||
name: 'AboutInspectionPage',
|
name: "AboutInspectionPage",
|
||||||
component: () => import('@/views/AboutInspectionPage.vue'),
|
component: () => import("@/views/AboutInspectionPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Об инспекции",
|
title: "Об инспекции",
|
||||||
ico: "mdi-city"
|
ico: "mdi-city",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/portal',
|
path: "/portal",
|
||||||
name: 'AboutPortalPage',
|
name: "AboutPortalPage",
|
||||||
component: () => import('@/views/AboutPortalPage.vue'),
|
component: () => import("@/views/AboutPortalPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "О портале",
|
title: "О портале",
|
||||||
ico: "mdi-information-variant"
|
ico: "mdi-information-variant",
|
||||||
}
|
requiresAuth: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/news',
|
path: "/news",
|
||||||
name: 'AboutNewsPage',
|
name: "AboutNewsPage",
|
||||||
component: () => import('@/views/NewsPage.vue'),
|
component: () => import("@/views/NewsPage.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Лента новостей",
|
title: "Лента новостей",
|
||||||
ico: "mdi-newspaper"
|
ico: "mdi-newspaper",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/newsfull',
|
path: "/newsfull",
|
||||||
name: 'FullNewsPage',
|
name: "FullNewsPage",
|
||||||
component: () => import('@/components/news-full.vue'),
|
component: () => import("@/components/news-full.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Одна новость",
|
title: "Одна новость",
|
||||||
ico: "mdi-newspaper"
|
ico: "mdi-newspaper",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/fnshol',
|
path: "/fnshol",
|
||||||
name: 'FnsHol.vue',
|
name: "FnsHol.vue",
|
||||||
component: () => import('@/views/FnsHol.vue'),
|
component: () => import("@/views/FnsHol.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "К празднику",
|
title: "К празднику",
|
||||||
ico: "mdi-city"
|
ico: "mdi-city",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/ical',
|
path: "/ical",
|
||||||
name: 'Calendar',
|
name: "Calendar",
|
||||||
component: () => import('@/components/calendar_of_events/load-ical.vue'),
|
component: () =>
|
||||||
|
import("@/components/calendar_of_events/load-ical.vue"),
|
||||||
meta: {
|
meta: {
|
||||||
title: "Для работы над календарем",
|
title: "Для работы над календарем",
|
||||||
ico: "mdi-account"
|
ico: "mdi-account",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(process.env.BASE_URL),
|
history: createWebHistory(process.env.BASE_URL),
|
||||||
routes,
|
routes,
|
||||||
})
|
});
|
||||||
router.beforeEach((to,from, next)=>{
|
|
||||||
document.title = to.meta.title;
|
|
||||||
next()
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
||||||
|
function isSuperuser() {
|
||||||
|
const accountStore = useAccountStore();
|
||||||
|
|
||||||
|
if (accountStore.user.is_superuser === false) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
router.beforeEach((to, from, next) => {
|
||||||
|
if (to.meta.requiresAuth && isSuperuser()) {
|
||||||
|
document.title = to.meta.title;
|
||||||
|
next("/");
|
||||||
|
} else {
|
||||||
|
document.title = to.meta.title;
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// Utilities
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
export const useWeekendsStore = defineStore('weekends', () => {
|
||||||
|
|
||||||
|
const week = ref({ '2024': {'05': '09'} })
|
||||||
|
|
||||||
|
|
||||||
|
return { week }
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-row no-gutters class="flex-column h-100 gap pa-1">
|
|
||||||
<v-col class="w100 h-100 flex-grow-0">
|
|
||||||
<v-card>
|
|
||||||
<v-tabs
|
|
||||||
v-model="tab"
|
|
||||||
bg-color="bg_tab"
|
|
||||||
slider-color="slider_tab"
|
|
||||||
selected-class="isActiveTab"
|
|
||||||
:grow="true"
|
|
||||||
>
|
|
||||||
<v-tab value="mainInfo">Основная информация</v-tab>
|
|
||||||
<v-tab value="document">Документация</v-tab>
|
|
||||||
<v-tab value="testings">Тестирование</v-tab>
|
|
||||||
</v-tabs>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
<v-col class="w100 h-100">
|
|
||||||
<v-window v-model="tab" class="h-100">
|
|
||||||
<v-window-item no-gutters class="gap h-100" value="mainInfo">
|
|
||||||
<MainInfoSafety
|
|
||||||
:formainpage="safetyData.mainpage_file"
|
|
||||||
></MainInfoSafety>
|
|
||||||
</v-window-item>
|
|
||||||
<v-window-item value="document" class="h-100">
|
|
||||||
<v-row no-gutters class="gap h-100">
|
|
||||||
<v-col lg="6">
|
|
||||||
<v-card class="h-100 flex-column d-flex gap">
|
|
||||||
<v-row class="ma-0 overflow-auto pb-1">
|
|
||||||
<v-card
|
|
||||||
class="overflow-y-auto flex-grow-1 flex-shrink-1 h-100"
|
|
||||||
>
|
|
||||||
<v-card-title>{{ safetyData.name }}</v-card-title>
|
|
||||||
<v-expansion-panels multiple flat>
|
|
||||||
<v-expansion-panel
|
|
||||||
elevation="0"
|
|
||||||
v-for="category in safetyData.categories"
|
|
||||||
:key="category.id"
|
|
||||||
class="py-0"
|
|
||||||
>
|
|
||||||
<v-expansion-panel-title class="font-weight-medium">{{
|
|
||||||
category.category__name
|
|
||||||
}}</v-expansion-panel-title>
|
|
||||||
<v-expansion-panel-text>
|
|
||||||
<div
|
|
||||||
v-for="file in category.files"
|
|
||||||
:key="file.id"
|
|
||||||
class="overflow-y-auto d-flex justify-space-between"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="openPDF(file.url), (loading = true)"
|
|
||||||
>
|
|
||||||
{{ file.name }}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<v-btn
|
|
||||||
variant="text"
|
|
||||||
icon="mdi-file-pdf-box"
|
|
||||||
color="red"
|
|
||||||
@click="openPDF(file.url), (loading = true)"
|
|
||||||
></v-btn>
|
|
||||||
<v-btn
|
|
||||||
variant="text"
|
|
||||||
icon="mdi-file-download-outline"
|
|
||||||
color="green"
|
|
||||||
@click="
|
|
||||||
downloadItem(burl + file.url, file.name)
|
|
||||||
"
|
|
||||||
></v-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</v-expansion-panel-text>
|
|
||||||
</v-expansion-panel>
|
|
||||||
</v-expansion-panels>
|
|
||||||
</v-card>
|
|
||||||
</v-row>
|
|
||||||
<v-row class="ma-0 overflow-auto bg-yellow">
|
|
||||||
<v-card class="overflow-y-auto flex-grow-1 h-100">
|
|
||||||
<v-card-title>{{ responsibilityData.name }}</v-card-title>
|
|
||||||
<v-container
|
|
||||||
v-for="file in responsibilityData.files"
|
|
||||||
:fluid="true"
|
|
||||||
class="py-0"
|
|
||||||
>
|
|
||||||
<v-card-actions :key="file.id">
|
|
||||||
<v-card-text
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="
|
|
||||||
openPDF(checkNameFiles(file)), (loading = true)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
get_name(
|
|
||||||
decodeURI(file.file_name.replace(/\.[^/.]+$/, ""))
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</v-card-text>
|
|
||||||
<v-btn
|
|
||||||
icon="mdi-file-pdf-box"
|
|
||||||
color="red"
|
|
||||||
@click="
|
|
||||||
openPDF(checkNameFiles(file)), (loading = true)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</v-btn>
|
|
||||||
<v-btn
|
|
||||||
icon="mdi-file-download-outline"
|
|
||||||
color="green"
|
|
||||||
@click="
|
|
||||||
downloadItem(
|
|
||||||
burl + checkNameFiles(file),
|
|
||||||
get_name(decodeURI(file.file_name))
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-container>
|
|
||||||
</v-card>
|
|
||||||
</v-row>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
<v-col>
|
|
||||||
<v-card class="h-100 flex-column d-flex gap">
|
|
||||||
<v-row class="ma-0 overflow-auto h-0">
|
|
||||||
<v-card
|
|
||||||
v-show="showFile"
|
|
||||||
class="mr-2 flex-grow-1 flex-shrink-1 h-100 pa-2 overflow-auto"
|
|
||||||
>
|
|
||||||
<v-container v-if="loading">
|
|
||||||
<v-progress-linear
|
|
||||||
:rounded="5"
|
|
||||||
indeterminate
|
|
||||||
color="teal"
|
|
||||||
>
|
|
||||||
</v-progress-linear>
|
|
||||||
</v-container>
|
|
||||||
<VuePdfEmbed
|
|
||||||
:source="pdfSource"
|
|
||||||
width="720"
|
|
||||||
@rendered="loading = false"
|
|
||||||
/>
|
|
||||||
</v-card>
|
|
||||||
</v-row>
|
|
||||||
<v-card-actions v-show="showFile">
|
|
||||||
<v-btn position="sticky" block @click="showFile = false"
|
|
||||||
>Закрыть</v-btn
|
|
||||||
>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-window-item>
|
|
||||||
<v-window-item value="testings" no-gutters class="gap h-100">
|
|
||||||
</v-window-item>
|
|
||||||
</v-window>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, onBeforeMount } from "vue";
|
|
||||||
import { pagecounter } from "@/utils/universal_functions";
|
|
||||||
import { axiosApiInstance, baseURL } from "@/utils/axios-api";
|
|
||||||
import { saveAs } from "file-saver";
|
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
|
|
||||||
import VuePdfEmbed from "vue-pdf-embed";
|
|
||||||
import TestSafety from "./TestSafety.vue";
|
|
||||||
import MainInfoSafety from "./MainInfoSafety.vue";
|
|
||||||
|
|
||||||
pagecounter();
|
|
||||||
|
|
||||||
const safetyData = ref({});
|
|
||||||
const responsibilityData = ref();
|
|
||||||
const showMore = ref(false);
|
|
||||||
const showFile = ref(true);
|
|
||||||
let pdfSource = ref("");
|
|
||||||
const loading = ref(false);
|
|
||||||
const tab = ref("");
|
|
||||||
const burl = baseURL.slice(0, -1);
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
// Вынес запрос в отдельную функцию, чтобы избежать дублирования одного и того же запроса на сервер.
|
|
||||||
function getSafety() {
|
|
||||||
axiosApiInstance
|
|
||||||
.get(`api/safety/?chapter=${route.params.chapter}`)
|
|
||||||
.then((result) => {
|
|
||||||
safetyData.value = result.data;
|
|
||||||
loading.value = true;
|
|
||||||
// pdfSource.value = burl + safetyData.value.categories[0].files[0].url
|
|
||||||
console.log(safetyData.value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onBeforeMount(() => getSafety());
|
|
||||||
|
|
||||||
const downloadItem = (url, fileName) => {
|
|
||||||
axiosApiInstance.get(url, { responseType: "blob" }).then((response) => {
|
|
||||||
saveAs(response.data, fileName);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
function openPDF(url) {
|
|
||||||
pdfSource.value = burl + url;
|
|
||||||
showFile.value = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_name(namestr) {
|
|
||||||
let arr = namestr.split("/");
|
|
||||||
return arr[arr.length - 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
// function checkNameFiles(obj) {
|
|
||||||
// if (obj.file_name.includes('/media/comitee_files/')) {
|
|
||||||
// return obj.file_name
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// return spravURLBase + `files/committee1_docs/${obj.id_committee1}/${get_name(obj.file_name)}`
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.isActiveTab {
|
|
||||||
background-color: #e0f2f1;
|
|
||||||
color: #004d40;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
<v-window-item class="gap h-100" value="document">
|
<v-window-item class="gap h-100" value="document">
|
||||||
<documentation-safety :docSections = "safetyData" />
|
<documentation-safety :docSections = "safetyData" />
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item class="gap h-100" value="testings">
|
<!-- <v-window-item class="gap h-100" value="testings">
|
||||||
<TestSafety></TestSafety>
|
<TestSafety></TestSafety>
|
||||||
</v-window-item>
|
</v-window-item> -->
|
||||||
</template>
|
</template>
|
||||||
</pattern-tabs>
|
</pattern-tabs>
|
||||||
</template>
|
</template>
|
||||||
@@ -49,8 +49,6 @@ export default {
|
|||||||
.then((result) => {
|
.then((result) => {
|
||||||
safetyData.value = result.data;
|
safetyData.value = result.data;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
// pdfSource.value = burl + safetyData.value.categories[0].files[0].url
|
|
||||||
console.log(safetyData.value, "-------------------------------");
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getSafety()
|
getSafety()
|
||||||
@@ -63,7 +61,7 @@ export default {
|
|||||||
tabs_items: [
|
tabs_items: [
|
||||||
{ title: "Основная информация", value: "mainInfo" },
|
{ title: "Основная информация", value: "mainInfo" },
|
||||||
{ title: "Документация", value: "document" },
|
{ title: "Документация", value: "document" },
|
||||||
{ title: "Тестирование", value: "testings" },
|
// { title: "Тестирование", value: "testings" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,65 +3,9 @@
|
|||||||
<v-col class="d-flex">
|
<v-col class="d-flex">
|
||||||
<v-row no-gutters class="flex-column gap">
|
<v-row no-gutters class="flex-column gap">
|
||||||
<v-col lg="6" class="w100 d-flex flex-column">
|
<v-col lg="6" class="w100 d-flex flex-column">
|
||||||
<v-card class="h-100 w-100 d-flex flex-column pb-1 rounded-0">
|
|
||||||
<v-card-title>
|
|
||||||
<span class="text-h4 text-wrap"> Комиссии </span>
|
|
||||||
</v-card-title>
|
|
||||||
|
|
||||||
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
|
|
||||||
<v-col
|
|
||||||
class="flex-grow-0"
|
|
||||||
v-for="(comm, key) in docSections.type_comm"
|
|
||||||
:key="key"
|
|
||||||
>
|
|
||||||
<v-card-subtitle class="text-wrap">
|
|
||||||
<span class="text-subtitle-1 text-wrap">
|
|
||||||
{{ comm.comm.name }}
|
|
||||||
</span>
|
|
||||||
</v-card-subtitle>
|
|
||||||
|
|
||||||
<v-list :lines="false" density="compact" nav>
|
|
||||||
<v-row
|
|
||||||
no-gutters
|
|
||||||
v-for="file in comm.comm.comitee_files"
|
|
||||||
:key="file.id"
|
|
||||||
>
|
|
||||||
<v-col>
|
|
||||||
<v-list-item
|
|
||||||
:active="filId == file.id"
|
|
||||||
color="primary"
|
|
||||||
density="compact"
|
|
||||||
@click="
|
|
||||||
openPDF(file)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<span class="text-body-2 text-wrap">
|
|
||||||
{{
|
|
||||||
get_name(
|
|
||||||
decodeURI(file.file_name.replace(/\.[^/.]+$/, ""))
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</v-list-item></v-col
|
|
||||||
>
|
|
||||||
<v-col class="flex-grow-0 align-self-center">
|
|
||||||
<v-icon
|
|
||||||
icon="mdi-file-download-outline"
|
|
||||||
@click="
|
|
||||||
downloadItem(file)
|
|
||||||
"
|
|
||||||
/></v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-list>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col class="w100 d-flex flex-column">
|
|
||||||
<v-card class="h-100 w-100 d-flex flex-column rounded-0">
|
<v-card class="h-100 w-100 d-flex flex-column rounded-0">
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<span class="text-h4 text-wrap"> Ответсвенности </span>
|
<span class="text-h6 text-wrap"> Ответственность </span>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|
||||||
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
|
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
|
||||||
@@ -87,25 +31,62 @@
|
|||||||
:active="filId == file.id"
|
:active="filId == file.id"
|
||||||
color="primary"
|
color="primary"
|
||||||
density="compact"
|
density="compact"
|
||||||
@click="
|
@click="openPDF(file)">
|
||||||
openPDF(file)
|
<span class="text-body-2 text-wrap">
|
||||||
"
|
{{ get_name(decodeURI(file.file_name.replace(/\.[^/.]+$/, ""))) }}
|
||||||
|
</span>
|
||||||
|
</v-list-item>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="flex-grow-0 align-self-center">
|
||||||
|
<v-icon
|
||||||
|
icon="mdi-file-download-outline"
|
||||||
|
@click="downloadItem(file)"
|
||||||
|
/></v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-list>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col class="w100 d-flex flex-column">
|
||||||
|
<v-card class="h-100 w-100 d-flex flex-column pb-1 rounded-0">
|
||||||
|
<v-card-title>
|
||||||
|
<span class="text-h6 text-wrap"> Комиссии </span>
|
||||||
|
</v-card-title>
|
||||||
|
|
||||||
|
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
|
||||||
|
<v-col
|
||||||
|
class="flex-grow-0"
|
||||||
|
v-for="(comm, key) in docSections.type_comm"
|
||||||
|
:key="key">
|
||||||
|
<v-card-subtitle class="text-wrap">
|
||||||
|
<span class="text-subtitle-1 text-wrap">
|
||||||
|
{{ comm.comm.name }}
|
||||||
|
</span>
|
||||||
|
</v-card-subtitle>
|
||||||
|
|
||||||
|
<v-list :lines="false" density="compact" nav>
|
||||||
|
<v-row
|
||||||
|
no-gutters
|
||||||
|
v-for="file in comm.comm.comitee_files"
|
||||||
|
:key="file.id">
|
||||||
|
<v-col>
|
||||||
|
<v-list-item
|
||||||
|
:active="filId == file.id"
|
||||||
|
color="primary"
|
||||||
|
density="compact"
|
||||||
|
@click="openPDF(file)"
|
||||||
>
|
>
|
||||||
<span class="text-body-2 text-wrap">
|
<span class="text-body-2 text-wrap">
|
||||||
{{
|
{{ get_name(decodeURI(file.file_name.replace(/\.[^/.]+$/, ""))) }}
|
||||||
get_name(
|
|
||||||
decodeURI(file.file_name.replace(/\.[^/.]+$/, ""))
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
</v-list-item></v-col
|
</v-list-item></v-col
|
||||||
>
|
>
|
||||||
<v-col class="flex-grow-0 align-self-center">
|
<v-col class="flex-grow-0 align-self-center">
|
||||||
<v-icon
|
<v-icon
|
||||||
icon="mdi-file-download-outline"
|
icon="mdi-file-download-outline"
|
||||||
@click="
|
@click="downloadItem(file)"
|
||||||
downloadItem(file)
|
|
||||||
"
|
|
||||||
/></v-col>
|
/></v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-list>
|
</v-list>
|
||||||
@@ -117,28 +98,21 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
|
|
||||||
<v-card class="flex-column h-100 d-flex rounded-0">
|
<v-card class="flex-column h-100 d-flex rounded-0">
|
||||||
<v-row no-gutters class="h-0 overflow-auto">
|
<v-row no-gutters class="h-0 overflow-auto">
|
||||||
<v-col class="d-flex flex-column "
|
<v-col class="d-flex flex-column "
|
||||||
:class="!loading?'align-center align-self-center':''">
|
:class="!loading?'align-center align-self-center':''">
|
||||||
|
|
||||||
<v-container v-if="loading">
|
<v-container v-if="loading">
|
||||||
<v-progress-linear :rounded="5" indeterminate color="teal" />
|
<v-progress-linear :rounded="5" indeterminate color="teal" />
|
||||||
</v-container>
|
</v-container>
|
||||||
|
|
||||||
|
|
||||||
<VuePdfEmbed
|
<VuePdfEmbed
|
||||||
|
|
||||||
v-show="showFile"
|
v-show="showFile"
|
||||||
:source="pdfSource"
|
:source="pdfSource"
|
||||||
width="720"
|
width="720"
|
||||||
@rendered="loading = false"
|
@rendered="loading = false"
|
||||||
@loading-failed="handlePdfError"
|
@loading-failed="handlePdfError"/>
|
||||||
/>
|
|
||||||
<v-card-text v-show="!showFile" >
|
<v-card-text v-show="!showFile" >
|
||||||
<span class="text-h5 text-grey"
|
<span class="text-h5 text-grey">
|
||||||
>
|
|
||||||
{{ err }}
|
{{ err }}
|
||||||
</span>
|
</span>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
@@ -160,7 +134,6 @@ import { ref, computed } from "vue";
|
|||||||
import { axiosApiInstance, baseURL, spravURLBase } from "@/utils/axios-api";
|
import { axiosApiInstance, baseURL, spravURLBase } from "@/utils/axios-api";
|
||||||
import { saveAs } from "file-saver";
|
import { saveAs } from "file-saver";
|
||||||
import VuePdfEmbed from "vue-pdf-embed";
|
import VuePdfEmbed from "vue-pdf-embed";
|
||||||
import { triggerRef } from "vue";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -195,19 +168,13 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openPDF = (file) => {
|
const openPDF = (file) => {
|
||||||
console.log(file, "fil");
|
|
||||||
|
|
||||||
|
|
||||||
let source =development.value ? burl + file.file_name : spravURLBase + `files/${file.typeoffile == 'comm' ? 'committee1_docs' : 'order_responsibility_docs'}/${file.parent}/${get_name(file.file_name)}`
|
let source =development.value ? burl + file.file_name : spravURLBase + `files/${file.typeoffile == 'comm' ? 'committee1_docs' : 'order_responsibility_docs'}/${file.parent}/${get_name(file.file_name)}`
|
||||||
if(source!=pdfSource.value){
|
if(source!=pdfSource.value){
|
||||||
loading.value = true
|
loading.value = true
|
||||||
pdfSource.value = source
|
pdfSource.value = source
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
showFile.value = true;
|
showFile.value = true;
|
||||||
filId.value = file.id;
|
filId.value = file.id;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const development = computed({
|
const development = computed({
|
||||||
@@ -215,7 +182,6 @@ export default {
|
|||||||
return process.env.NODE_ENV == "development" ? true : false;
|
return process.env.NODE_ENV == "development" ? true : false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// process.env.NODE_ENV == "development" ? true : false;
|
|
||||||
|
|
||||||
const get_name = (namestr) => {
|
const get_name = (namestr) => {
|
||||||
let arr = namestr.split("/");
|
let arr = namestr.split("/");
|
||||||
@@ -232,37 +198,21 @@ export default {
|
|||||||
showFile.value=false
|
showFile.value=false
|
||||||
err.value = "Файл не найден";
|
err.value = "Файл не найден";
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
||||||
// if (error.status === 404) {
|
|
||||||
// console.error('PDF file not found');
|
|
||||||
// // Дополнительная логика или обработка ошибки 404 здесь
|
|
||||||
// } else {
|
|
||||||
// console.error('An error occurred while loading the PDF:', error);
|
|
||||||
// }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const firstFile = () => {
|
const firstFile = () => {
|
||||||
|
|
||||||
let files = []
|
let files = []
|
||||||
props.docSections.type_comm.forEach(el => {
|
props.docSections.type_comm.forEach(el => {
|
||||||
// console.log(el);
|
|
||||||
files.push(...el.comm.comitee_files)
|
files.push(...el.comm.comitee_files)
|
||||||
});
|
});
|
||||||
|
|
||||||
props.docSections.type_resp.forEach(el => {
|
props.docSections.type_resp.forEach(el => {
|
||||||
files.push(...el.resp.get_resp_files)
|
files.push(...el.resp.get_resp_files)
|
||||||
});
|
});
|
||||||
|
pdfSource.value =
|
||||||
|
development.value ? burl + files[0].file_name : spravURLBase + `files/${files[0].typeoffile == 'comm' ? 'committee1_docs' : 'order_responsibility_docs'}/${files[0].parent}/${get_name(files[0].file_name)}`
|
||||||
|
|
||||||
pdfSource.value =development.value ? burl + files[0].file_name : spravURLBase + `files/${files[0].typeoffile == 'comm' ? 'committee1_docs' : 'order_responsibility_docs'}/${files[0].parent}/${get_name(files[0].file_name)}`
|
|
||||||
|
|
||||||
// = source
|
|
||||||
|
|
||||||
// pdfSource.value =
|
|
||||||
// burl + files[0].file_name;
|
|
||||||
filId.value = files[0].id;
|
filId.value = files[0].id;
|
||||||
console.log(pdfSource.value, "-------------------------------");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
firstFile();
|
firstFile();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row no-gutters class="h-100">
|
<v-row no-gutters class="h-100">
|
||||||
<v-col cols="9" class="flex-column">
|
<v-col cols="8" class="flex-column">
|
||||||
<v-row no-gutters class="h-100 justify-center">
|
<v-row no-gutters class="h-100 justify-center">
|
||||||
<v-col
|
<v-col
|
||||||
lg="6"
|
lg="6"
|
||||||
@@ -24,66 +24,73 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="3" class="d-flex flex-column h-100">
|
<v-col class="d-flex flex-column h-100">
|
||||||
<v-row no-gutters class="h-0 overflow-auto">
|
<v-row no-gutters class="h-0 overflow-auto">
|
||||||
<v-col>
|
<v-col>
|
||||||
|
|
||||||
|
<div class="text-h6 d-flex justify-center">Ответственность</div>
|
||||||
|
|
||||||
<v-col class="v-col-auto">
|
<v-col class="v-col-auto">
|
||||||
<div class="text-h6 d-flex justify-center">Ответственные</div>
|
<div
|
||||||
</v-col>
|
v-if="responsibility != undefined && responsibility.length > 0"
|
||||||
<v-col class="v-col-auto">
|
>
|
||||||
<div v-if="responsibility != undefined && responsibility.length > 0" >
|
<v-expansion-panels variant="accordion">
|
||||||
<v-expansion-panels>
|
|
||||||
<v-expansion-panel v-for="item in responsibility">
|
<v-expansion-panel v-for="item in responsibility">
|
||||||
<v-expansion-panel-title class="font-weight-medium">
|
<v-expansion-panel-title>
|
||||||
{{ item.resp.sphere_of_responsibility }}
|
{{ item.resp.sphere_of_responsibility }}
|
||||||
</v-expansion-panel-title>
|
</v-expansion-panel-title>
|
||||||
<v-expansion-panel-text>
|
<v-expansion-panel-text>
|
||||||
<list-user
|
<list-user
|
||||||
v-for="user in item.resp.employee"
|
v-for="user in item.resp.employee"
|
||||||
:key=user
|
:key="user"
|
||||||
:author="user">
|
:author="user"
|
||||||
|
>
|
||||||
</list-user>
|
</list-user>
|
||||||
</v-expansion-panel-text>
|
</v-expansion-panel-text>
|
||||||
</v-expansion-panel>
|
</v-expansion-panel>
|
||||||
</v-expansion-panels>
|
</v-expansion-panels>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="text-caption text-grey d-flex justify-center">Данные по ответственным отсутствуют</div>
|
<div class="text-caption text-grey d-flex justify-center">
|
||||||
|
Данные по ответственным отсутствуют
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="v-col-auto">
|
|
||||||
<div class="text-h6 d-flex justify-center">Комиссии</div>
|
<div class="text-h6 d-flex justify-center">Комиссии</div>
|
||||||
</v-col>
|
|
||||||
<v-col class="v-col-auto">
|
<v-col class="v-col-auto">
|
||||||
<div v-if="commitee != undefined && commitee.length > 0">
|
<div v-if="commitee != undefined && commitee.length > 0">
|
||||||
<v-expansion-panels >
|
<v-expansion-panels variant="accordion">
|
||||||
<v-expansion-panel v-for="item in commitee">
|
<v-expansion-panel v-for="item in commitee" :key="item">
|
||||||
<v-expansion-panel-title class="font-weight-medium">
|
<v-expansion-panel-title>
|
||||||
{{ item.comm.name }}
|
{{ item.comm.name }}
|
||||||
</v-expansion-panel-title>
|
</v-expansion-panel-title>
|
||||||
<v-expansion-panel-text>
|
<v-expansion-panel-text class="d-block">
|
||||||
|
<div v-if="item.comm.com_members.length > 0">
|
||||||
<list-user
|
<list-user
|
||||||
|
class="text-subtitle-1"
|
||||||
v-for="user in item.comm.com_members"
|
v-for="user in item.comm.com_members"
|
||||||
:key=user
|
:key="user"
|
||||||
:author="user">
|
:author="user"
|
||||||
|
>
|
||||||
</list-user>
|
</list-user>
|
||||||
|
</div>
|
||||||
|
<v-card-subtitle class="text-center" v-else
|
||||||
|
>Участников нет
|
||||||
|
</v-card-subtitle>
|
||||||
</v-expansion-panel-text>
|
</v-expansion-panel-text>
|
||||||
</v-expansion-panel>
|
</v-expansion-panel>
|
||||||
</v-expansion-panels>
|
</v-expansion-panels>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="text-caption text-grey d-flex justify-center">Данные по комиссиям отсутствуют</div>
|
<div class="text-caption text-grey d-flex justify-center">
|
||||||
|
Данные по комиссиям отсутствуют
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<!-- <div class=" overflow-y-auto h-100 bg-orange">
|
|
||||||
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
@@ -95,24 +102,32 @@
|
|||||||
density="compact"
|
density="compact"
|
||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
@click="openFirstPlan = false">
|
@click="openFirstPlan = false"
|
||||||
|
>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn class="d-flex align-center" icon='mdi-file-download-outline' color="green"
|
<v-btn
|
||||||
@click="downloadFile(urlschema)">
|
class="d-flex align-center"
|
||||||
|
icon="mdi-file-download-outline"
|
||||||
|
color="green"
|
||||||
|
@click="downloadFile(urlschema)"
|
||||||
|
>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|
||||||
<VuePdfEmbed v-if="urlschema.endsWith('.pdf')"
|
<VuePdfEmbed
|
||||||
|
v-if="urlschema.endsWith('.pdf')"
|
||||||
:source="urlschema"
|
:source="urlschema"
|
||||||
width="500"
|
width="500"
|
||||||
@click="openFirstPlan = false"/>
|
@click="openFirstPlan = false"
|
||||||
|
/>
|
||||||
<v-img
|
<v-img
|
||||||
v-else
|
v-else
|
||||||
:src="urlschema"
|
:src="urlschema"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
height="100%"
|
height="100%"
|
||||||
width="100%"
|
width="100%"
|
||||||
@click="openFirstPlan = false">
|
@click="openFirstPlan = false"
|
||||||
|
>
|
||||||
</v-img>
|
</v-img>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|||||||
Reference in new issue
Block a user