Merge pull request '22_about_inspection' (#93) from 22_about_inspection into develop
Reviewed-on: http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2/pulls/93 Reviewed-by: iriska <iriska190391@mail.ru> Reviewed-by: Nukeap <kuroedovo@narod.ru> Reviewed-by: lexxik753 <lexx@a.com>
This commit is contained in:
commit
11ed5ba139
10 files changed
+365
-311
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
# Create your models here.
|
|
||||||
|
|
||||||
|
|
||||||
|
# Модель Штатная численность
|
||||||
class StateSize(models.Model):
|
class StateSize(models.Model):
|
||||||
statesize = models.IntegerField( verbose_name="Штатная численность")
|
statesize = models.IntegerField( verbose_name="Штатная численность")
|
||||||
date_created = models.DateField(verbose_name="Дата создания")
|
date_created = models.DateField(verbose_name="Дата создания")
|
||||||
@@ -11,7 +11,7 @@ class StateSize(models.Model):
|
|||||||
verbose_name_plural = "Штатная численность"
|
verbose_name_plural = "Штатная численность"
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self.statesize)
|
return str(self.statesize)
|
||||||
|
#Модель Фактическая численность
|
||||||
class FactSize(models.Model):
|
class FactSize(models.Model):
|
||||||
factsize = models.IntegerField( verbose_name="Фактическая численность")
|
factsize = models.IntegerField( verbose_name="Фактическая численность")
|
||||||
date_created = models.DateField(verbose_name="Дата создания")
|
date_created = models.DateField(verbose_name="Дата создания")
|
||||||
@@ -22,7 +22,7 @@ class FactSize(models.Model):
|
|||||||
return str(self.factsize)
|
return str(self.factsize)
|
||||||
|
|
||||||
|
|
||||||
|
# Модель Направление деятельности инспекции
|
||||||
class InspectionDirections(models.Model):
|
class InspectionDirections(models.Model):
|
||||||
direction_title = models.CharField(max_length=255, verbose_name="Направление деятельности инспекции")
|
direction_title = models.CharField(max_length=255, verbose_name="Направление деятельности инспекции")
|
||||||
icon_name = models.CharField(max_length=100, verbose_name="Название иконки", default="none" ,blank=True)
|
icon_name = models.CharField(max_length=100, verbose_name="Название иконки", default="none" ,blank=True)
|
||||||
|
|||||||
@@ -1,22 +1,54 @@
|
|||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from .models import *
|
from .models import *
|
||||||
|
from userauth.models import *
|
||||||
|
|
||||||
|
# Сериализатор модели StateSize (Штатная численность)
|
||||||
class StateSizeSerializer(serializers.ModelSerializer):
|
class StateSizeSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = StateSize
|
model = StateSize
|
||||||
fields ='__all__'
|
fields ='__all__'
|
||||||
|
|
||||||
|
# Сериализатор модели FactSize (Фактическая численность)
|
||||||
class FactSizeSerializer(serializers.ModelSerializer):
|
class FactSizeSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = FactSize
|
model = FactSize
|
||||||
fields ='__all__'
|
fields ='__all__'
|
||||||
|
|
||||||
|
# Сериализатор модели InspectionDirections (Направление деятельности инспекции)
|
||||||
class InspectionDirectionsSerializer(serializers.ModelSerializer):
|
class InspectionDirectionsSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = InspectionDirections
|
model = InspectionDirections
|
||||||
fields =['id', 'direction_title', 'icon_name',]
|
fields =['id', 'direction_title', 'icon_name',]
|
||||||
|
|
||||||
|
|
||||||
|
# Сериализаторы структуры инспекции
|
||||||
|
class ChiefsDepsSerializer(serializers.ModelSerializer):
|
||||||
|
class Meta:
|
||||||
|
model = DictEmployee
|
||||||
|
fields = [ "id","login","fio","post","room"]
|
||||||
|
|
||||||
|
|
||||||
|
# Основной сериализатор структуры инспекции
|
||||||
|
class StructureSerializer(ChiefsDepsSerializer):
|
||||||
|
deps = serializers.SerializerMethodField('get_deps',)
|
||||||
|
class Meta:
|
||||||
|
model = DictEmployee
|
||||||
|
fields = '__all__'
|
||||||
|
|
||||||
|
|
||||||
|
def get_deps(self, obj):
|
||||||
|
return DepsSerializer(obj.deps_curator.filter(deleted=0).all(), many=True).data
|
||||||
|
|
||||||
|
|
||||||
|
class DepsSerializer(serializers.ModelSerializer):
|
||||||
|
chief_deps =serializers.SerializerMethodField('get_chief_deps')
|
||||||
|
class Meta:
|
||||||
|
model = DictDepartment
|
||||||
|
fields = '__all__'
|
||||||
|
|
||||||
|
def get_chief_deps(self, obj):
|
||||||
|
return ChiefsDepsSerializer(obj.id_chief).data
|
||||||
|
|
||||||
@@ -7,4 +7,5 @@ urlpatterns = [
|
|||||||
path('getfactsize/', GetFactSize.as_view(), name='getfactsize'),
|
path('getfactsize/', GetFactSize.as_view(), name='getfactsize'),
|
||||||
path('getstatesize/', GetStateSize.as_view(), name='getstatesize'),
|
path('getstatesize/', GetStateSize.as_view(), name='getstatesize'),
|
||||||
path('getinspectiondirections/', GetInspectionDirections.as_view(), name='getinspectiondirections'),
|
path('getinspectiondirections/', GetInspectionDirections.as_view(), name='getinspectiondirections'),
|
||||||
|
path('getstructure/', GetStructure.as_view(), name='getstructure'),
|
||||||
]
|
]
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
from rest_framework.generics import ListAPIView
|
from rest_framework.generics import ListAPIView
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from userauth.models import DictEmployee
|
from userauth.models import DictEmployee, DictPosition
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from .models import *
|
from .models import *
|
||||||
from .serializers import *
|
from .serializers import *
|
||||||
@@ -24,3 +24,8 @@ class GetInspectionDirections(ListAPIView):
|
|||||||
serializer_class = InspectionDirectionsSerializer
|
serializer_class = InspectionDirectionsSerializer
|
||||||
# отключает вывод информации о пагинации(count,previous,next, results)
|
# отключает вывод информации о пагинации(count,previous,next, results)
|
||||||
paginator = None
|
paginator = None
|
||||||
|
|
||||||
|
class GetStructure(ListAPIView):
|
||||||
|
def get(self, request):
|
||||||
|
queryset = DictEmployee.objects.filter(id_dict_position__order_position__lte = 2, deleted=0).order_by('id_dict_position__order_position')
|
||||||
|
return Response(StructureSerializer(queryset, many=True).data)
|
||||||
@@ -109,7 +109,7 @@ class DictCompetencesType(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class DictDepartment(models.Model):
|
class DictDepartment(models.Model):
|
||||||
id_curator = models.ForeignKey('DictEmployee', models.DO_NOTHING, db_column='id_curator', blank=True, null=True, db_comment='╚─ ъєЁрЄюЁр юЄфхыр')
|
id_curator = models.ForeignKey('DictEmployee', models.DO_NOTHING, db_column='id_curator', blank=True, null=True, db_comment='╚─ ъєЁрЄюЁр юЄфхыр', related_name='deps_curator')
|
||||||
id_chief = models.ForeignKey('DictEmployee', models.DO_NOTHING, db_column='id_chief', related_name='dictdepartment_id_chief_set', blank=True, null=True, db_comment='╚─ эрўры№эшър юЄфхыр')
|
id_chief = models.ForeignKey('DictEmployee', models.DO_NOTHING, db_column='id_chief', related_name='dictdepartment_id_chief_set', blank=True, null=True, db_comment='╚─ эрўры№эшър юЄфхыр')
|
||||||
name = models.CharField(max_length=500, db_comment='═рчтрэшх юЄфхыр')
|
name = models.CharField(max_length=500, db_comment='═рчтрэшх юЄфхыр')
|
||||||
deleted = models.IntegerField(db_comment='╠рЁъх єфрыхэш чряшёш')
|
deleted = models.IntegerField(db_comment='╠рЁъх єфрыхэш чряшёш')
|
||||||
@@ -127,7 +127,7 @@ class DictDepartment(models.Model):
|
|||||||
class DictEmployee(models.Model):
|
class DictEmployee(models.Model):
|
||||||
id = models.PositiveIntegerField(primary_key=True, db_comment='╥рсхы№э√щ эюьхЁ')
|
id = models.PositiveIntegerField(primary_key=True, db_comment='╥рсхы№э√щ эюьхЁ')
|
||||||
id_dict_department = models.ForeignKey(DictDepartment, models.DO_NOTHING, db_column='id_dict_department', db_comment='╚─ юЄфхыр, т ъюЄюЁюь ЁрсюЄрхЄ ёюЄЁєфэшъ')
|
id_dict_department = models.ForeignKey(DictDepartment, models.DO_NOTHING, db_column='id_dict_department', db_comment='╚─ юЄфхыр, т ъюЄюЁюь ЁрсюЄрхЄ ёюЄЁєфэшъ')
|
||||||
id_dict_position = models.ForeignKey('DictPosition', models.DO_NOTHING, db_column='id_dict_position', db_comment='╚─ чрэшьрхьющ фюыцэюёЄш')
|
id_dict_position = models.ForeignKey('DictPosition', models.DO_NOTHING, db_column='id_dict_position', db_comment='╚─ чрэшьрхьющ фюыцэюёЄш', related_name='ord_position')
|
||||||
login = models.CharField(max_length=100, blank=True, null=True, db_comment='ыюушэ(sAMAccountName)')
|
login = models.CharField(max_length=100, blank=True, null=True, db_comment='ыюушэ(sAMAccountName)')
|
||||||
password = models.CharField(max_length=100, blank=True, null=True, db_comment='╧рЁюы№ фы тїюфр эр яюЁЄры')
|
password = models.CharField(max_length=100, blank=True, null=True, db_comment='╧рЁюы№ фы тїюфр эр яюЁЄры')
|
||||||
fio = models.CharField(db_column='FIO', max_length=300, blank=True, null=True, db_comment='╘╚╬(cn)') # Field name made lowercase.
|
fio = models.CharField(db_column='FIO', max_length=300, blank=True, null=True, db_comment='╘╚╬(cn)') # Field name made lowercase.
|
||||||
|
|||||||
@@ -1,56 +1,68 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row lg="12" class="mt-10 ml-13">
|
<v-row class="ma-1">
|
||||||
<v-col lg="5" no-gutters class="d-flex justify-end align-start">
|
<v-col lg="6" class="d-flex justify-center align-start">
|
||||||
|
<v-card :elevation="5">
|
||||||
<v-card :width="640" :height="600" :elevation="5">
|
<div style="width:915px;height:823px; ">
|
||||||
|
|
||||||
|
|
||||||
<l-map :zoom="13" :min-zoom="13" :center="markers[0].coordinate">
|
<l-map :zoom="13" :min-zoom="13" :center="markers[0].coordinate">
|
||||||
<l-tile-layer :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`"></l-tile-layer>
|
<l-tile-layer :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`" />
|
||||||
<l-marker v-for="x in markers" :key="x" :lat-lng="x.coordinate" :icon="icon(x.icon)"> </l-marker>
|
<l-marker v-for="marker in markers" :key="marker" :lat-lng="marker.coordinate"
|
||||||
|
:icon="icon(marker.icon)" />
|
||||||
</l-map>
|
</l-map>
|
||||||
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg="6" no-gutters class="d-flex flex-column ml-16">
|
|
||||||
<v-row lg="12" class="pt-3">
|
|
||||||
<v-card :elevation="5">
|
|
||||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
|
||||||
Способ проезда
|
|
||||||
</v-card-title>
|
|
||||||
<v-card-text class="pt-15">
|
|
||||||
<v-list>
|
|
||||||
<v-list-item class="text-subtitle-2" v-for="(address_path, i) in address_pathes" :key="i">
|
|
||||||
{{ address_path.path }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</v-card-text>
|
|
||||||
</v-card>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<v-row lg="12">
|
<v-col lg="6" class="d-flex flex-column gap">
|
||||||
<v-card :elevation="5" class="w-100 mb-2 mt-2">
|
|
||||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
<v-card :elevation="5">
|
||||||
Адрес
|
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||||
</v-card-title>
|
Способ проезда
|
||||||
<v-card-text class="text-h6 d-flex justify-center pt-10">
|
</v-card-title>
|
||||||
{{ address.building }}
|
<v-card-text class="text-subtitle-1">
|
||||||
</v-card-text>
|
<v-list>
|
||||||
<v-card-text class="text-h6 d-flex justify-center">
|
<v-list-item v-for="address_path in address_pathes">
|
||||||
<p>{{ address.phone }}</p>
|
{{ address_path.path }}
|
||||||
</v-card-text>
|
</v-list-item>
|
||||||
</v-card>
|
</v-list>
|
||||||
</v-row>
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
<v-card :elevation="5" class="h-50">
|
||||||
|
<v-card-title class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||||
|
Адрес
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text class="text-h6 d-flex justify-center align-end pa-4">
|
||||||
|
{{ address.building }}
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-text class="text-h6 d-flex justify-center align-center">
|
||||||
|
<p>{{ address.phone }}</p>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-title class=" d-flex justify-center">
|
||||||
|
Время работы
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text class="text-subtitle-1">
|
||||||
|
<v-list>
|
||||||
|
<v-list-item v-for="work_time in work_times">
|
||||||
|
<v-row class="d-flex justify-center">
|
||||||
|
<v-col lg="4">{{ work_time.day }}</v-col>
|
||||||
|
<v-col lg="3">{{ work_time.time }}</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { ref } from 'vue'
|
||||||
import { baseURL } from '@/utils/axios-api'
|
import { baseURL } from '@/utils/axios-api'
|
||||||
import "leaflet/dist/leaflet.css";
|
import "leaflet/dist/leaflet.css";
|
||||||
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
|
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
|
||||||
import { L, icon } from "leaflet"
|
import { L, icon } from "leaflet"
|
||||||
import { ref } from 'vue'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
LMap,
|
LMap,
|
||||||
@@ -60,56 +72,67 @@ export default {
|
|||||||
icon
|
icon
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const pathbuild=(icon)=>{
|
|
||||||
|
const pathbuild = (icon) => {
|
||||||
return `${baseURL}media/map_icons/${icon}.png`
|
return `${baseURL}media/map_icons/${icon}.png`
|
||||||
}
|
}
|
||||||
const icons = {
|
const icons = {
|
||||||
icon_cod:{
|
icon_cod: {
|
||||||
iconUrl: pathbuild(`fns`),
|
iconUrl: pathbuild(`fns`),
|
||||||
iconSize: [30, 30],
|
iconSize: [30, 30],
|
||||||
iconAnchor: [16, 40]
|
iconAnchor: [16, 40]
|
||||||
},
|
|
||||||
icon_metro:{
|
|
||||||
iconUrl: pathbuild(`mos_metro`),
|
|
||||||
iconSize: [30, 25],
|
|
||||||
iconAnchor: [10, 20]
|
|
||||||
},
|
},
|
||||||
icon_mcd :{
|
icon_metro: {
|
||||||
|
iconUrl: pathbuild(`mos_metro`),
|
||||||
|
iconSize: [30, 25],
|
||||||
|
iconAnchor: [10, 20]
|
||||||
|
},
|
||||||
|
icon_mcd: {
|
||||||
iconUrl: pathbuild(`mcd_d2`),
|
iconUrl: pathbuild(`mcd_d2`),
|
||||||
iconSize: [32, 18],
|
iconSize: [32, 18],
|
||||||
iconAnchor: [10, 20]
|
iconAnchor: [10, 20]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const markers= ref([{
|
const markers = ref([
|
||||||
coordinate:[55.83451, 37.40848],icon:icons.icon_cod},
|
{ coordinate: [55.83451, 37.40848], icon: icons.icon_cod },
|
||||||
{coordinate:[55.83309, 37.39933],icon:icons.icon_mcd },
|
{ coordinate: [55.83309, 37.39933], icon: icons.icon_mcd },
|
||||||
{coordinate:[55.83463, 37.38335],icon:icons.icon_metro },
|
{ coordinate: [55.83463, 37.38335], icon: icons.icon_metro },
|
||||||
{coordinate:[55.83213, 37.38247],icon:icons.icon_mcd },
|
{ coordinate: [55.83213, 37.38247], icon: icons.icon_mcd },
|
||||||
{coordinate:[55.82741, 37.43715],icon:icons.icon_metro },
|
{ coordinate: [55.82741, 37.43715], icon: icons.icon_metro },
|
||||||
{coordinate:[55.82705, 37.4411], icon:icons.icon_mcd},
|
{ coordinate: [55.82705, 37.4411], icon: icons.icon_mcd },
|
||||||
{coordinate:[55.8496, 37.43925], icon:icons.icon_metro },
|
{ coordinate: [55.8496, 37.43925], icon: icons.icon_metro },
|
||||||
{coordinate:[55.8252, 37.3853], icon:icons.icon_metro }
|
{ coordinate: [55.8252, 37.3853], icon: icons.icon_metro }
|
||||||
|
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
markers,
|
icons,
|
||||||
|
markers,
|
||||||
|
icon,
|
||||||
|
|
||||||
address: {
|
address: {
|
||||||
"building": "125373, Москва, Походный проезд, двл.3, стр 1",
|
"building": "125373, Москва, Походный проезд, двл.3, стр 1",
|
||||||
"phone": "Телефон: 8(495) 198-53-12"
|
"phone": "Телефон: 8(495) 198-53-12"
|
||||||
},
|
},
|
||||||
address_pathes: [
|
address_pathes: [
|
||||||
{ "path": "От станции метро «Волоколамская», 837 автобусом до остановки «Таксомоторный парк», или маршрутным такси № 441" },
|
{ "path": "От станции метро «Волоколамская», автобус 368, до остановки \"Налоговый городок\"" },
|
||||||
{ "path": "От станции метро «Сходненская», 1-й вагон из центра, маршрутное такси № 368, последний вагон из центра, автобусы № 678, № 199" },
|
{ "path": "От платформы МЦД «Волоколамская» проехать одну остановку до платформы МЦД «Трикотажная», далее на автобусе 368 до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" },
|
||||||
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 2, № 266 до остановки «пл. Трикотажная», автобусы № 88, №177 до остановки «17 Таксомоторный парк»" }
|
{ "path": "От станции МЦД «Трикотажная», далее на автобусе 368, до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" },
|
||||||
|
{ "path": "От станции метро «Сходненская», 1-й вагон из центра, далее на автобусе № 368" },
|
||||||
|
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 400, № 741, 741к, 856, 436, 575 до остановки «пл. Трикотажная» или от станции МЦД «Тушинская» проехать одну остановку до станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
|
||||||
|
{ "path": "От станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
|
||||||
|
],
|
||||||
|
|
||||||
|
work_times: [
|
||||||
|
{ "day": "Понедельник-Четверг", "time": "09:00 - 18:00" },
|
||||||
|
{ "day": "Пятница", "time": "09:00 - 16:45" },
|
||||||
|
{ "day": "Суббота-Воскресенье", "time": "не работает" },
|
||||||
],
|
],
|
||||||
baseURL,
|
baseURL,
|
||||||
icon
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-card :elevation="3" :width="width" :height="height">
|
|
||||||
|
|
||||||
<!-- <Handle type="source" :position="Position.Right" />
|
|
||||||
<Handle type="target" :position="Position.Left" />
|
|
||||||
<Handle type="source" :position="Position.Top" />
|
|
||||||
<Handle type="target" :position="Position.Bottom" /> -->
|
|
||||||
<v-card-text class="nodrag nopan d-flex justify-center align-center
|
|
||||||
text-h6
|
|
||||||
bg-teal-lighten-5 text-center text-teal-darken-4 h-50 pa-3">
|
|
||||||
<p class="pa-5">{{ label }}</p>
|
|
||||||
</v-card-text>
|
|
||||||
<v-card-text class=" text-center text-h6 d-flex justify-center align-center pa-3">
|
|
||||||
<p>{{ data }}</p>
|
|
||||||
</v-card-text>
|
|
||||||
</v-card>
|
|
||||||
</template>
|
|
||||||
<script setup>
|
|
||||||
import { Position, Handle } from '@vue-flow/core'
|
|
||||||
import "@vue-flow/core/dist/style.css"
|
|
||||||
|
|
||||||
// props were passed from the slot using `v-bind="customNodeProps"`
|
|
||||||
const props = defineProps(['label', 'data', 'width', 'height'])
|
|
||||||
</script>
|
|
||||||
@@ -1,206 +1,177 @@
|
|||||||
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VueFlow :nodes="nodes" :edges="edges" :class="{ dark }" class="basicflow" :default-viewport="{ zoom: 1 }" :min-zoom="1"
|
<div>
|
||||||
:max-zoom="1" fit-view-on-init>
|
<v-row no-gutters class="gap h-100 flex-column">
|
||||||
<template #node-boss="bossNodeProps">
|
<v-col lg="3" class="flex-column w100">
|
||||||
<BossNode :width="500" :height="100" v-bind="bossNodeProps" />
|
<structure-inspection-row :sText="'Руковдство'">
|
||||||
</template>
|
<template v-slot:cardboss>
|
||||||
<template #node-middleboss="bossNodeProps">
|
<v-col lg="3" v-for="x in structures" :key="x">
|
||||||
<BossNode :width="230" :height="170" v-bind="bossNodeProps" />
|
<v-card class="flex-column d-flex mr-1">
|
||||||
</template>
|
<v-card-text class="pa-0">
|
||||||
<template #node-deps="bossNodeProps">
|
<v-row no-gutters>
|
||||||
<BossNode :width="250" :height="180" v-bind="bossNodeProps" />
|
<v-col lg="4" class="pa-1 w100">
|
||||||
</template>
|
<v-img
|
||||||
|
class="h-100"
|
||||||
|
:src="checkremote(`${spravURL}${x.login}.jpg`)"
|
||||||
|
cover
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="text-center align-self-center text-h6">
|
||||||
|
{{ x.fio }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
</template>
|
||||||
|
</structure-inspection-row>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<structure-inspection-row :sText="'Структурные подразделения'">
|
||||||
|
<template v-slot:cardboss>
|
||||||
|
<v-col
|
||||||
|
class="flex-column"
|
||||||
|
v-for="bosses in structures"
|
||||||
|
:key="bosses"
|
||||||
|
>
|
||||||
|
<div v-for="x in bosses.deps" :key="x">
|
||||||
|
<!-- <v-col class="text-wrap text-center">
|
||||||
|
{{x.name}}
|
||||||
|
</v-col> -->
|
||||||
|
<v-card class="flex-column d-flex mb-1 mr-1">
|
||||||
|
<v-card-text class="pa-1 pt-3 px-3 flex-column">
|
||||||
|
<v-col lg="12" class=" minh pa-0">
|
||||||
|
<v-row no-gutters>
|
||||||
|
<v-col
|
||||||
|
class="text-wrap text-center text-body-2 font-weight-medium text-uppercase"
|
||||||
|
>
|
||||||
|
{{ x.name }}
|
||||||
|
</v-col>
|
||||||
|
<v-col class="flex-grow-0">
|
||||||
|
<v-tooltip location="top">
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<span v-bind="props">
|
||||||
|
<v-icon
|
||||||
|
size="large"
|
||||||
|
color="green"
|
||||||
|
icon="mdi-arrow-top-right"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<v-row>
|
||||||
|
<v-col> Перейти на страницу отдела </v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-tooltip>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
<Background bgColor="#ffff" />
|
<v-row no-gutters>
|
||||||
<Controls position="top-right">
|
<v-col lg="4" class="pa-1 w100">
|
||||||
<ControlButton title="Reset Transform" @click="resetTransform">
|
<v-img
|
||||||
</ControlButton>
|
class="h-100"
|
||||||
</Controls>
|
:src="
|
||||||
</VueFlow>
|
checkremote(`${spravURL}${x.chief_deps.login}.jpg`)
|
||||||
|
"
|
||||||
|
cover
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="text-center align-self-center text-h6 px-3">
|
||||||
|
<!-- <v-card-subtitle>
|
||||||
|
{{x.name}}
|
||||||
|
<my-helper :pretext="x" />
|
||||||
|
</v-card-subtitle> -->
|
||||||
|
{{ x.chief_deps.fio }}
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</div>
|
||||||
|
</v-col>
|
||||||
|
</template>
|
||||||
|
</structure-inspection-row>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<!-- <v-col lg="3" v-for="structure in structures" :key="structure">
|
||||||
|
|
||||||
|
<v-card class="ma-2">
|
||||||
|
<v-card-item class="bg-teal-lighten-5 text-teal-darken-4 text-h6">
|
||||||
|
{{ structure.post }}
|
||||||
|
</v-card-item>
|
||||||
|
<v-avatar rounded="0" size="90">
|
||||||
|
<v-img :src="checkremote(`${spravURL}${structure.login}.jpg`)"></v-img>
|
||||||
|
</v-avatar>
|
||||||
|
<v-card-item>{{ structure.fio }}</v-card-item>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
<v-card class="ma-2" v-for="dep in structure.deps">
|
||||||
|
<v-card-item class=" bg-teal-lighten-5 text-teal-darken-4 text-h6 deps-title">
|
||||||
|
{{ dep.name }}
|
||||||
|
</v-card-item>
|
||||||
|
<v-avatar rounded="0" size="70">
|
||||||
|
<v-img :src="checkremote(`${spravURL}${structure.login}.jpg`)"></v-img>
|
||||||
|
</v-avatar>
|
||||||
|
<v-card-item>
|
||||||
|
{{ dep.chief_deps.post }}
|
||||||
|
</v-card-item>
|
||||||
|
<v-card-item>
|
||||||
|
{{ dep.chief_deps.fio }}
|
||||||
|
</v-card-item>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</v-col> -->
|
||||||
|
</v-row>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref } from 'vue'
|
import { ref } from "vue";
|
||||||
import { VueFlow, useVueFlow, Position } from '@vue-flow/core'
|
import { spravURL } from "@/utils/axios-api";
|
||||||
import { ControlButton, Controls } from '@vue-flow/controls'
|
import { checkremote } from "@/utils/universal_functions";
|
||||||
import { Background } from '@vue-flow/background'
|
import { axiosApiInstance } from "@/utils/axios-api";
|
||||||
import "@vue-flow/core/dist/style.css"
|
import StructureInspectionRow from "./StructureInspectionRow.vue";
|
||||||
import "@vue-flow/core/dist/theme-default.css"
|
|
||||||
import BossNode from './BossNode.vue'
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: { StructureInspectionRow },
|
||||||
VueFlow,
|
setup() {
|
||||||
useVueFlow,
|
const structures = ref([]);
|
||||||
Position,
|
|
||||||
ControlButton,
|
|
||||||
Controls,
|
|
||||||
Background,
|
|
||||||
BossNode
|
|
||||||
},
|
|
||||||
|
|
||||||
setup() {
|
const getStructure = () => {
|
||||||
const dark = ref(false)
|
axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => {
|
||||||
|
structures.value = res.data;
|
||||||
const { onPaneReady, onConnect, addEdges, setViewport } = useVueFlow()
|
console.log(structures.value, "-----------");
|
||||||
|
});
|
||||||
function resetTransform() {
|
};
|
||||||
setViewport({ x: 0, y: 0, zoom: 1 })
|
|
||||||
}
|
|
||||||
|
|
||||||
onConnect((connection) => {
|
|
||||||
addEdges(connection)
|
|
||||||
})
|
|
||||||
|
|
||||||
onPaneReady(({ fitView }) => {
|
|
||||||
fitView()
|
|
||||||
})
|
|
||||||
|
|
||||||
resetTransform()
|
|
||||||
return {
|
|
||||||
dark,
|
|
||||||
nodes: ref([
|
|
||||||
{
|
|
||||||
id: '1',
|
|
||||||
type: 'boss',
|
|
||||||
label: 'Руководитель МИ ФНС России по ЦОД №2',
|
|
||||||
data: 'Борис Борисович Толоко ',
|
|
||||||
position: { x: 180, y: 50 },
|
|
||||||
sourcePosition: Position.Right,
|
|
||||||
targetPosition: Position.Bottom,
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '2',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Заместитель начальника',
|
|
||||||
data: 'Андреева Наталья Владимировна',
|
|
||||||
position: { x: 140, y: 280 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Заместитель начальника',
|
|
||||||
data: 'Ахкубеков Мухамат Алиевич',
|
|
||||||
position: { x: 680, y: 280 },
|
|
||||||
sourcePosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '4',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Заместитель начальника',
|
|
||||||
data: 'Послухаев Артем Николаевич',
|
|
||||||
position: { x: 1220, y: 280 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '5',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Общий отдел',
|
|
||||||
data: ' Начальник Золина Татьяна Евгеньевна ',
|
|
||||||
position: { x: 792, y: 15 },
|
|
||||||
targetPosition: Position.Left,
|
|
||||||
sourcePosition: Position.Right,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '6',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Отдел кадров и безопасности',
|
|
||||||
data: 'Начальник Фролова Ирина Николаевна',
|
|
||||||
position: { x: 1030, y: 15 },
|
|
||||||
targetPosition: Position.Left,
|
|
||||||
sourcePosition: Position.Right,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '7',
|
|
||||||
type: 'middleboss',
|
|
||||||
label: 'Отдел управления качеством данных',
|
|
||||||
data: ' Начальник Гончаров Церен Викторович',
|
|
||||||
position: { x: 1268, y: 15 },
|
|
||||||
targetPosition: Position.Left,
|
|
||||||
sourcePosition: Position.Right,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '8',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел по сопровождению интернет-сервисов',
|
|
||||||
data: ' Начальник Лосева Екатерина Владимировна',
|
|
||||||
position: { x: 1080, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
id: '9',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел внедрения технологических процессов',
|
|
||||||
data: ' Начальник Туркова Мария Николаевна',
|
|
||||||
position: { x: 1340, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '10',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел контроля технологических процессов',
|
|
||||||
data: ' Начальник Михайлов Виктор Валентинович',
|
|
||||||
position: { x: 800, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '11',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел ведения ведомственной модели данных',
|
|
||||||
data: ' Начальник Щедрин Владимир Дмитриевич',
|
|
||||||
position: { x: 540, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '12',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел развития личного кабинеита налогоплательщика физического лица',
|
|
||||||
data: 'И.О.начальника Романова Марина Александровна',
|
|
||||||
position: { x: 0, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '13',
|
|
||||||
type: 'deps',
|
|
||||||
label: 'Отдел обработки обращений граждан',
|
|
||||||
data: 'Начальник Ванюшкина Наталья Николаевна',
|
|
||||||
position: { x: 260, y: 500 },
|
|
||||||
targetPosition: Position.Top,
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
]),
|
|
||||||
|
|
||||||
edges: ref([
|
|
||||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
|
||||||
// { id: 'e5-6', type: 'step', source: '5', target: '6' },
|
|
||||||
// { id: 'e6-7', type: 'step', source: '6', target: '7' },
|
|
||||||
// { id: 'e1-2', type: 'step', source: '1', target: '2' },
|
|
||||||
// { id: 'e1-3', type: 'step', source: '1', target: '3' },
|
|
||||||
//{ id: 'e1-4', type: 'step', source: '1', target: '4' },
|
|
||||||
// { id: 'e1-4', type: 'step', source: '1', target: '4' },
|
|
||||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
|
||||||
// { id: 'e1-7', type: 'step', source: '1', target: '7' },
|
|
||||||
// { id: 'e4-9', source: '4', target: '8' },
|
|
||||||
// { id: 'e4-10', source: '4', target: '9' },
|
|
||||||
// { id: 'e3-11', source: '3', target: '10' },
|
|
||||||
// { id: 'e3-12', source: '3', target: '11' },
|
|
||||||
// { id: 'e2-13', source: '2', target: '12' },
|
|
||||||
// { id: 'e2-14', source: '2', target: '13' },
|
|
||||||
])
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
getStructure();
|
||||||
|
return {
|
||||||
|
structures,
|
||||||
|
checkremote,
|
||||||
|
spravURL,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style>
|
||||||
|
.deps-title {
|
||||||
|
height: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rotate-text {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page_block {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .container {
|
||||||
|
text-align: center;
|
||||||
|
background: #fdd835;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.minh {
|
||||||
|
min-height: 43px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<v-row no-gutters class="h-100">
|
||||||
|
<v-col class="align-self-center flex-grow-0">
|
||||||
|
<span class="vertext text-button my-1 pb-13">{{ sText }}</span>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col class="w100">
|
||||||
|
<v-row no-gutters class="text-center text-button py-2" v-if="sText=='Руковдство'">
|
||||||
|
<v-col lg="3">Начальник инспекции</v-col>
|
||||||
|
<v-col>Заместители начальника инспекции</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row no-gutters class="text-center text-button py-2" v-else>
|
||||||
|
<v-col> Координируемые структурные подразделения</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row no-gutters class="h-100">
|
||||||
|
<slot name="cardboss"></slot>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { spravURL } from "@/utils/axios-api";
|
||||||
|
import { checkremote } from "@/utils/universal_functions";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
sText: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
checkremote,
|
||||||
|
spravURL,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.vertext {
|
||||||
|
writing-mode: vertical-rl;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row no-gutters class="flex-column h-100 gap pa-1">
|
<v-row no-gutters class="flex-column">
|
||||||
<v-col class="w100 h-100 flex-grow-0">
|
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-tabs v-model="tab" bg-color="teal-darken-1" slider-color="teal-lighten-3" selected-class="active-tab"
|
<v-tabs v-model="tab" bg-color="teal-darken-1" slider-color="teal-lighten-3" selected-class="active-tab"
|
||||||
:grow="true">
|
:grow="true">
|
||||||
<v-tab v-for="tabitem in tabs_items" :value="tabitem.value">{{ tabitem.title }}</v-tab>
|
<v-tab v-for="tabitem in tabs_items" :value="tabitem.value">{{ tabitem.title }}</v-tab>
|
||||||
</v-tabs>
|
</v-tabs>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-window v-model="tab" class="h-100">
|
<v-window v-model="tab" class="h-100">
|
||||||
<v-window-item value="mainInfo">
|
<v-window-item value="mainInfo">
|
||||||
<v-row no-gutters>
|
<v-row>
|
||||||
<v-col lg="3">
|
<v-col lg="3">
|
||||||
<v-card class="ml-2 mb-2 mt-1">
|
<v-card class="ml-2 mb-2 mt-1">
|
||||||
<v-card-text class="text-h6 text-center">
|
<v-card-text class="text-h6 text-center">
|
||||||
@@ -110,13 +110,13 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item no-gutters class="gap h-100" value="structureInspection">
|
<v-window-item no-gutters class="gap flex-column h-100" value="structureInspection">
|
||||||
<structure-inspection />
|
<structure-inspection />
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item no-gutters class="gap h-100" value="openVacancies">
|
<v-window-item no-gutters class="gap h-100" value="openVacancies">
|
||||||
<h1>Открытые вакансии</h1>
|
<h1>Открытые вакансии</h1>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item no-gutters class="gap h-100" value="contactInfo">
|
<v-window-item class="gap h-100" value="contactInfo">
|
||||||
<contact-info />
|
<contact-info />
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
</v-window>
|
</v-window>
|
||||||
|
|||||||
Reference in new issue
Block a user