Добавлены коментарии
This commit is contained in:
1 parent
fd9acb448e
commit
e944701a5c
4 files changed
+32
-23
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,20 +1,21 @@
|
|||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from .models import *
|
from .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:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row lg="12" class="mt-10 ml-13">
|
<v-row class="d-flex justify-center align-center h-100">
|
||||||
<v-col lg="5" no-gutters class="d-flex justify-end align-start">
|
<v-col lg="5">
|
||||||
<v-card :width="640" :height="600" :elevation="5">
|
<v-card :width="640" :height="630" :elevation="5">
|
||||||
<div style="width:640px;height:600px; ">
|
<div style="width:640px;height:630px; ">
|
||||||
<l-map :zoom="13" :min-zoom="13" :center="[55.83451, 37.40848]">
|
<l-map :zoom="13" :min-zoom="13" :center="[55.83451, 37.40848]">
|
||||||
<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-tile-layer>
|
||||||
<l-marker :lat-lng="[55.83451, 37.40848]" :icon="icon_cod"> </l-marker>
|
<l-marker :lat-lng="[55.83451, 37.40848]" :icon="icon_cod"> </l-marker>
|
||||||
@@ -17,13 +17,14 @@
|
|||||||
</div>
|
</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-col lg="6" class="d-flex flex-column justify-around h-75">
|
||||||
<v-card :elevation="5">
|
<v-row class="d-flex align-start">
|
||||||
|
<v-card :elevation="5" class="w-100 h-75">
|
||||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||||
Способ проезда
|
Способ проезда
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text class="pt-15">
|
<v-card-text>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item class="text-subtitle-2" v-for="(address_path, i) in address_pathes" :key="i">
|
<v-list-item class="text-subtitle-2" v-for="(address_path, i) in address_pathes" :key="i">
|
||||||
{{ address_path.path }}
|
{{ address_path.path }}
|
||||||
@@ -33,21 +34,22 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row lg="12">
|
<v-row>
|
||||||
<v-card :elevation="5" class="w-100 mb-2 mt-2">
|
<v-card :elevation="5" class="w-100">
|
||||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||||
Адрес
|
Адрес
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text class="text-h6 d-flex justify-center pt-10">
|
<v-card-text class="text-h6 d-flex justify-center align-center pa-3">
|
||||||
{{ address.building }}
|
{{ address.building }}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-text class="text-h6 d-flex justify-center">
|
<v-card-text class="text-h6 d-flex justify-center align-center pa-3">
|
||||||
<p>{{ address.phone }}</p>
|
<p>{{ address.phone }}</p>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -85,7 +87,7 @@ export default {
|
|||||||
}),
|
}),
|
||||||
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": "От станции метро «Волоколамская», 837 автобусом до остановки «Таксомоторный парк», или маршрутным такси № 441" },
|
||||||
@@ -93,6 +95,17 @@ export default {
|
|||||||
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 2, № 266 до остановки «пл. Трикотажная», автобусы № 88, №177 до остановки «17 Таксомоторный парк»" }
|
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 2, № 266 до остановки «пл. Трикотажная», автобусы № 88, №177 до остановки «17 Таксомоторный парк»" }
|
||||||
],
|
],
|
||||||
baseURL,
|
baseURL,
|
||||||
|
lmarkers: [
|
||||||
|
{ "latitude": [55.83451, 37.40848], "icon": "icon_cod" },
|
||||||
|
{ "latitude": [55.83309, 37.39933], "icon": "icon_mcd" },
|
||||||
|
{ "latitude": [55.83463, 37.38335], "icon": "icon_metro" },
|
||||||
|
{ "latitude": [55.83213, 37.38247], "icon": "icon_mcd" },
|
||||||
|
{ "latitude": [55.82741, 37.43715], "icon": "icon_metro" },
|
||||||
|
{ "latitude": [55.82705, 37.4411], "icon": "icon_mcd" },
|
||||||
|
{ "latitude": [55.8496, 37.43925], "icon": "icon_metro" },
|
||||||
|
{ "latitude": [55.8252, 37.3853], "icon": "icon_metro" },
|
||||||
|
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-card :elevation="3" :width="width" :height="height">
|
<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
|
<v-card-text class="nodrag nopan d-flex justify-center align-center
|
||||||
text-h6
|
text-h6
|
||||||
bg-teal-lighten-5 text-center text-teal-darken-4 h-50 pa-3">
|
bg-teal-lighten-5 text-center text-teal-darken-4 h-50 pa-3">
|
||||||
|
|||||||
Reference in new issue
Block a user