Files
PORTAL_COD2/src/front/src/views/AboutInspectionPage.vue
T

219 lines
9.7 KiB
Vue

<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="teal-darken-1" slider-color="teal-lighten-3" selected-class="active-tab"
:grow="true">
<v-tab v-for="tabitem in tabs_items" :value="tabitem.value">{{ tabitem.title }}</v-tab>
</v-tabs>
</v-card>
</v-col>
<v-col>
<v-window v-model="tab" class="h-100">
<v-window-item value="mainInfo">
<v-row no-gutters>
<v-col lg="3">
<v-card class="ml-2 mb-2 mt-1">
<v-card-text class="text-h6 text-center">
<p>Работа МИ ФНС России по ЦОД №2 </p>
<p> координируется заместителем руководителя ФНС России</p>
<p>Будариным Андреем Владимировичем</p>
</v-card-text>
</v-card>
</v-col>
<v-col lg="9">
<v-card class="ml-3 mt-1 mr-1 pa-5">
<v-card-text class="text-h6 text-center">
<p>Межрегиональная инспекция Федеральной налоговой службы</p>
<p>по централизованной обработке данных №2</p>
<p> создана 01.02.2018 года.</p>
</v-card-text>
</v-card>
</v-col>
</v-row>
<v-row no-gutters>
<v-col lg="3">
<v-col class="ml-1 pa-1">
<v-card>
<v-card-title class="text-h6 text-uppercase text-center"> Начальник
инспекции</v-card-title>
<v-divider></v-divider>
<div class="w-100 d-flex justify-center">
<v-avatar rounded="0" size="200">
<v-img :src="checkremote(`${spravURL}${userlinks.login}.jpg`)"></v-img>
</v-avatar>
</div>
<v-card-title class="text-h6 text-center">{{ userlinks.fio }}</v-card-title>
<v-card-text class="text-center">
<p>{{ bossRank }}</p>
</v-card-text>
</v-card>
</v-col>
<v-col class="ma-1 pa-1">
<v-card>
<v-card-title class="text-h6 text-center text-uppercase">
Штатная численность
</v-card-title>
<v-card-subtitle class="text-center">по состоянию на
{{ new Date(getstatesize.date_created).toLocaleDateString("ru-RU") }}
</v-card-subtitle>
<v-card-text class="text-h2 text-center ma-4">
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='getstatesize.statesize'
:duration='2' />
</v-card-text>
<v-divider></v-divider>
<v-card-title class="text-h6 text-center text-uppercase">
Фактическая численность
</v-card-title>
<v-card-subtitle class="text-center">по состоянию на
{{ new Date(getfactsize.date_created).toLocaleDateString("ru-RU") }}
</v-card-subtitle>
<v-card-text class="text-h2 text-center ma-4">
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='getfactsize.factsize'
:duration='2' />
</v-card-text>
</v-card>
</v-col>
</v-col>
<v-col lg="9">
<v-card class="ml-3 mr-1 mt-1">
<v-card-title class=" text-h6 text-uppercase text-center">
Основные направления деятельности инспекции
</v-card-title>
<v-divider></v-divider>
<v-row no-gutters class="d-flex justify-center">
<v-col v-for="direction in directionworks" :key="direction.id" lg="12">
<v-card class="ma-3 d-flex" :elevation="3" :height="100">
<v-col class="d-flex align-center justify-center">
<v-avatar class="mt-1 ml-1 pa-0 elevation-10 text-teal-darken-4"
color="teal-lighten-5">
<v-icon :icon="direction.icon_name"></v-icon>
</v-avatar>
</v-col>
<v-col lg="11" class="d-flex align-center justify-start text-h6">
{{ direction.direction_title }}
</v-col>
</v-card>
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
</v-window-item>
<v-window-item no-gutters class="gap h-100" value="structureInspection">
<structure-inspection />
</v-window-item>
<v-window-item no-gutters class="gap h-100" value="openVacancies">
<h1>Открытые вакансии</h1>
</v-window-item>
<v-window-item no-gutters class="gap h-100" value="contactInfo">
<contact-info />
</v-window-item>
</v-window>
</v-col>
</v-row>
</template>
<script>
import { ref } from 'vue'
import { axiosApiInstance } from '@/utils/axios-api'
import { checkremote } from '@/utils/universal_functions'
import { spravURL, baseURL } from '@/utils/axios-api'
import StructureInspection from '@/components/about_inspection/structure/StructureInspection.vue';
import ContactInfo from '@/components/about_inspection/contacts/ContactInfo.vue';
import { pagecounter } from '@/utils/universal_functions'
export default {
components: {
StructureInspection,
ContactInfo,
},
setup() {
const userlinks = ref([])
const getfactsize = ref({ 'factsize': 0, 'date_created': new Date() })
const getstatesize = ref({ 'statesize': 0, 'date_created': new Date() })
const directionworks = ref([])
const infouser = () => {
axiosApiInstance.get('api/accounts/getuser/?userlogin=9966-00-001').then(res => {
userlinks.value = res.data
})
}
const getFactSize = () => {
axiosApiInstance.get('api/about_inspection/getfactsize/').then(res => {
getfactsize.value = res.data
})
}
const getStateSize = () => {
axiosApiInstance.get('api/about_inspection/getstatesize/').then(res => {
getstatesize.value = res.data
})
}
const getInspectionDirections = () => {
axiosApiInstance.get('api/about_inspection/getinspectiondirections/').then(res => {
directionworks.value = res.data
console.log(directionworks.value)
})
}
getInspectionDirections()
getStateSize()
getFactSize()
infouser()
pagecounter()
return {
directionworks,
getstatesize,
getfactsize,
spravURL,
baseURL,
checkremote,
userlinks,
tab: ref(null),
date_now: new Date().toLocaleDateString("ru-RU"),
bossRank: "Государственный советник Российской Федерации 2 класса",
tabs_items: [{ "title": "Общая информация", "value": "mainInfo" },
{ "title": "Структура инспекции", "value": "structureInspection" },
{ "title": "Открытые вакансии", "value": "openVacancies" },
{ "title": "Контактная информация", "value": "contactInfo" }],
}
}
}
</script>
<style>
.active-tab {
background-color: #E0F2F1;
color: #004D40;
}
</style>