Merge branch 'develop' into 38_calendar_back

This commit is contained in:
Nukeap committed 2024-04-23 07:32:26 +00:00
commit f37d46a4b7
6 files changed
+100 -149

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ class InspectionDirectionsSerializer(serializers.ModelSerializer):
class ChiefsDepsSerializer(serializers.ModelSerializer): class ChiefsDepsSerializer(serializers.ModelSerializer):
class Meta: class Meta:
model = DictEmployee model = DictEmployee
fields = [ "id","login","fio","post","room"] fields = [ "id","login","fio","post","room","familyname","email","tel","department"]
# Основной сериализатор структуры инспекции # Основной сериализатор структуры инспекции
+1 -1
View File
@@ -27,5 +27,5 @@ class GetInspectionDirections(ListAPIView):
class GetStructure(ListAPIView): class GetStructure(ListAPIView):
def get(self, request): def get(self, request):
queryset = DictEmployee.objects.filter(id_dict_position__order_position__lte = 2, deleted=0).order_by('id_dict_position__order_position') queryset = DictEmployee.objects.filter(id_dict_position__order_position__lte = 2, deleted=0).order_by('id_dict_position__order_position','familyname')
return Response(StructureSerializer(queryset, many=True).data) return Response(StructureSerializer(queryset, many=True).data)
@@ -6,7 +6,10 @@
<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 :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`" />
<l-marker v-for="marker in markers" :key="marker" :lat-lng="marker.coordinate" <l-marker v-for="marker in markers" :key="marker" :lat-lng="marker.coordinate"
:icon="icon(marker.icon)" /> :icon="icon(marker.icon)">
<l-tooltip>{{ marker.tooltip }}</l-tooltip>
</l-marker>
</l-map> </l-map>
</div> </div>
</v-card> </v-card>
@@ -14,39 +17,38 @@
<v-col lg="6" class="d-flex flex-column gap"> <v-col lg="6" class="d-flex flex-column gap">
<v-card :elevation="5">
<v-card-title class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
Адрес
</v-card-title>
<v-card-text class="text-subtitle-1 d-flex justify-center align-end">
{{ address.building }}
</v-card-text>
<v-card-text class="text-subtitle-1 d-flex justify-center align-center">
{{ address.phone }}
</v-card-text>
<v-card-title class=" d-flex justify-center">
Время работы
</v-card-title>
<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>
<v-card :elevation="5"> <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 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-subtitle-1"> <v-card-text class="text-subtitle-1">
<v-list> <v-list>
<v-list-item v-for="address_path in address_pathes"> <v-list-item v-for="address_path in address_pathes" class="pa-6">
{{ address_path.path }} <strong>{{ address_path.title_path }}</strong>{{ address_path.path }}
</v-list-item>
</v-list>
</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-item>
</v-list> </v-list>
</v-card-text> </v-card-text>
@@ -60,7 +62,7 @@
import { ref } from 'vue' 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, LTooltip } from "@vue-leaflet/vue-leaflet";
import { L, icon } from "leaflet" import { L, icon } from "leaflet"
export default { export default {
@@ -68,6 +70,7 @@ export default {
LMap, LMap,
LTileLayer, LTileLayer,
LMarker, LMarker,
LTooltip,
L, L,
icon icon
}, },
@@ -91,19 +94,26 @@ export default {
iconUrl: pathbuild(`mcd_d2`), iconUrl: pathbuild(`mcd_d2`),
iconSize: [32, 18], iconSize: [32, 18],
iconAnchor: [10, 20] iconAnchor: [10, 20]
},
icon_bus: {
iconUrl: pathbuild(`bus`),
iconSize: [25, 25],
iconAnchor: [10, 10]
} }
} }
const markers = ref([ const markers = ref([
{ coordinate: [55.83451, 37.40848], icon: icons.icon_cod }, { coordinate: [55.83451, 37.40848], icon: icons.icon_cod, tooltip: "МИ ФНС России по ЦОД №2" },
{ coordinate: [55.83309, 37.39933], icon: icons.icon_mcd }, { coordinate: [55.83309, 37.39933], icon: icons.icon_mcd, tooltip: "МЦД D2 пл.\"Трикотажная\"" },
{ coordinate: [55.83463, 37.38335], icon: icons.icon_metro }, { coordinate: [55.82741, 37.43715], icon: icons.icon_metro, tooltip: "ст.метро \"Тушинская\"" },
{ coordinate: [55.83213, 37.38247], icon: icons.icon_mcd }, { coordinate: [55.82705, 37.4411], icon: icons.icon_mcd, tooltip: "МЦД D2 пл. \"Тушинская\"" },
{ coordinate: [55.82741, 37.43715], icon: icons.icon_metro }, { coordinate: [55.8496, 37.43925], icon: icons.icon_metro, tooltip: "ст.метро \"Сходненская\"" },
{ coordinate: [55.82705, 37.4411], icon: icons.icon_mcd }, { coordinate: [55.83478, 37.41034], icon: icons.icon_bus, tooltip: "остановка \"Налоговый городок\"" },
{ coordinate: [55.8496, 37.43925], icon: icons.icon_metro }, { coordinate: [55.83319, 37.40128], icon: icons.icon_bus, tooltip: "остановка автобуса №368" },
{ coordinate: [55.8252, 37.3853], icon: icons.icon_metro } { coordinate: [55.82524, 37.43575], icon: icons.icon_bus, tooltip: "остановки автобусов: № 400, № 741, 741к, 856, 436, 575" },
{ coordinate: [55.8501, 37.43905], icon: icons.icon_bus, tooltip: "остановка автобуса №368" },
{ coordinate: [55.83132, 37.40340], icon: icons.icon_bus, tooltip: "остановка \"МЦД Трикотажная\"" },
]) ])
@@ -118,18 +128,17 @@ export default {
"phone": "Телефон: 8(495) 198-53-12" "phone": "Телефон: 8(495) 198-53-12"
}, },
address_pathes: [ address_pathes: [
{ "path": "От станции метро «Волоколамская», автобус 368, до остановки \"Налоговый городок\"" }, { "title_path": "От станции МЦД «Трикотажная»,", "path": " далее на автобусе 368, до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" },
{ "path": "От платформы МЦД «Волоколамская» проехать одну остановку до платформы МЦД «Трикотажная», далее на автобусе 368 до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" }, { "title_path": "От станции метро «Сходненская»,", "path": " 1-й вагон из центра, далее на автобусе № 368" },
{ "path": "От станции МЦД «Трикотажная», далее на автобусе 368, до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" }, { "title_path": "От станции МЦД «Тушинская»,", "path": " проехать одну остановку до станции МЦД «Трикотажная» и далее на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
{ "path": "От станции метро «Сходненская», 1-й вагон из центра, далее на автобусе № 368" }, { "title_path": "От станции метро «Тушинская»,", "path": " последний вагон из центра, автобусы № 400, № 741, 741к, 856, 436, 575 до остановки «пл. Трикотажная» или от станции МЦД «Тушинская» проехать одну остановку до станции МЦД «Трикотажная» и далее на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 400, № 741, 741к, 856, 436, 575 до остановки «пл. Трикотажная» или от станции МЦД «Тушинская» проехать одну остановку до станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
{ "path": "От станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
], ],
work_times: [ work_times: [
{ "day": "Понедельник-Четверг", "time": "09:00 - 18:00" }, { "day": "Понедельник - Четверг", "time": "09:00 - 18:00" },
{ "day": "Пятница", "time": "09:00 - 16:45" }, { "day": "Пятница", "time": "09:00 - 16:45" },
{ "day": "Суббота-Воскресенье", "time": "не работает" }, { "day": "Суббота - Воскресенье", "time": "Выходной" },
], ],
baseURL, baseURL,
@@ -2,21 +2,24 @@
<div> <div>
<v-row no-gutters class="gap h-100 flex-column"> <v-row no-gutters class="gap h-100 flex-column">
<v-col lg="3" class="flex-column w100"> <v-col lg="3" class="flex-column w100">
<structure-inspection-row :sText="'Руковдство'"> <structure-inspection-row :sText="'Руководство'">
<template v-slot:cardboss> <template v-slot:cardboss>
<v-col lg="3" v-for="x in structures" :key="x"> <v-col lg="3" class="flex-column d-flex align-center" v-for="structure in structures" :key="structure.id">
<v-card class="flex-column d-flex mr-1"> <v-card class="flex-column d-flex mr-1" :width="370" :elevation="10">
<v-card-text class="pa-0"> <v-card-text class="pa-0">
<v-col lg="12" class="minh pa-0">
<v-row no-gutters>
<v-col class="d-flex h-75 justify-center align-center font-weight-medium text-uppercase">
{{ structure.post }}
</v-col>
</v-row>
</v-col>
<v-row no-gutters> <v-row no-gutters>
<v-col lg="4" class="pa-1 w100 heightfoto"> <v-col lg="4" class="pa-1 heightfoto">
<v-img <v-img class="h-100" :src="checkremote(`${spravURL}${structure.login}.jpg`)" cover />
class="h-100"
:src="checkremote(`${spravURL}${x.login}.jpg`)"
cover
/>
</v-col> </v-col>
<v-col class="text-center align-self-center text-h6"> <v-col class="text-center align-self-center font-weight-medium">
{{ x.fio }} {{ structure.fio }}
</v-col> </v-col>
</v-row> </v-row>
</v-card-text> </v-card-text>
@@ -28,33 +31,20 @@
<v-col> <v-col>
<structure-inspection-row :sText="'Структурные подразделения'"> <structure-inspection-row :sText="'Структурные подразделения'">
<template v-slot:cardboss> <template v-slot:cardboss>
<v-col <v-col class="flex-column d-flex align-center" v-for="bosses in structures" :key="bosses">
class="flex-column" <div v-for="boss in bosses.deps" :key="boss.id">
v-for="bosses in structures" <v-card class="flex-column d-flex mb-1 mr-1 width-subdeps" :elevation="5">
: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-card-text class="pa-1 pt-3 px-3 flex-column">
<v-col lg="12" class=" minh pa-0"> <v-col lg="12" class=" minh pa-0">
<v-row no-gutters> <v-row no-gutters>
<v-col <v-col class="text-wrap text-center text-body-2 font-weight-medium text-uppercase ">
class="text-wrap text-center text-body-2 font-weight-medium text-uppercase" {{ boss.name }}
>
{{ x.name }}
</v-col> </v-col>
<v-col class="flex-grow-0"> <v-col class="flex-grow-0">
<v-tooltip location="top"> <v-tooltip location="top">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
<span v-bind="props"> <span v-bind="props">
<v-icon <v-icon size="large" color="green" icon="mdi-arrow-top-right" />
size="large"
color="green"
icon="mdi-arrow-top-right"
/>
</span> </span>
</template> </template>
<v-row> <v-row>
@@ -64,24 +54,9 @@
</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 w100 heightfoto"> <list-user :author="boss.chief_deps" />
<v-img
class="h-100"
:src="
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-row>
</v-card-text> </v-card-text>
</v-card> </v-card>
@@ -90,35 +65,6 @@
</template> </template>
</structure-inspection-row> </structure-inspection-row>
</v-col> </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> </v-row>
</div> </div>
</template> </template>
@@ -129,16 +75,17 @@ import { spravURL } from "@/utils/axios-api";
import { checkremote } from "@/utils/universal_functions"; import { checkremote } from "@/utils/universal_functions";
import { axiosApiInstance } from "@/utils/axios-api"; import { axiosApiInstance } from "@/utils/axios-api";
import StructureInspectionRow from "./StructureInspectionRow.vue"; import StructureInspectionRow from "./StructureInspectionRow.vue";
import ListUser from "../../UI/fiousercard/ListUser.vue";
export default { export default {
components: { StructureInspectionRow }, components: { StructureInspectionRow, ListUser },
setup() { setup() {
const structures = ref([]); const structures = ref([]);
const getStructure = () => { const getStructure = () => {
axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => { axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => {
structures.value = res.data; structures.value = res.data;
console.log(structures.value, "-----------"); console.log(structures.value)
}); });
}; };
@@ -166,16 +113,17 @@ export default {
padding: 10px; padding: 10px;
} }
/* .container {
text-align: center;
background: #fdd835;
} */
.minh { .minh {
min-height: 43px; min-height: 43px;
} }
.heightfoto { .heightfoto {
max-height: 156px; max-height: 140px;
min-height: 156px; min-height: 140px;
}
.width-subdeps {
width: 350px;
} }
</style> </style>
@@ -4,18 +4,15 @@
<span class="vertext text-button my-1 pb-13">{{ sText }}</span> <span class="vertext text-button my-1 pb-13">{{ sText }}</span>
</v-col> </v-col>
<v-col class="w100"> <v-col class="w100">
<v-row no-gutters class="text-center text-button py-2" v-if="sText=='Руковдство'"> <v-row no-gutters class="text-center text-button py-2" v-if="sText == 'Руководство'">
<v-col lg="3">Начальник инспекции</v-col> </v-row>
<v-col>Заместители начальника инспекции</v-col> <v-row no-gutters class="text-center text-button py-2" v-else>
</v-row> </v-row>
<v-row no-gutters class="text-center text-button py-2" v-else> <v-row no-gutters class="h-100">
<v-col> Координируемые структурные подразделения</v-col> <slot name="cardboss"></slot>
</v-row> </v-row>
<v-row no-gutters class="h-100"> </v-col>
<slot name="cardboss"></slot>
</v-row>
</v-col>
</v-row> </v-row>
</template> </template>
+2 -5
View File
@@ -1,6 +1,5 @@
<template> <template>
<v-row no-gutters class="flex-column"> <v-row no-gutters class="flex-column">
<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">
@@ -20,7 +19,8 @@
обработке обработке
данных №2 данных №2
</p> </p>
<p>создана 01.02.2018 года в соответствии с приказом ФНС России от 27.12.2017 <p>
создана 01.02.2018 года в соответствии с приказом ФНС России от 27.12.2017
№ММВ-7-4/1102 №ММВ-7-4/1102
</p> </p>
</v-card-text> </v-card-text>
@@ -208,10 +208,7 @@ export default {
</script> </script>
<style> <style>
.active-tab { .active-tab {
background-color: #E0F2F1; background-color: #E0F2F1;