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

243 lines
5.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<v-container fluid class="d-flex mx-0">
<v-row>
<v-col class="d-flex flex-column" lg=7>
<v-row class="flex-grow-0">
<v-col class="pr-0 pb-0">
<Carousel-list/>
</v-col>
</v-row>
<!-- <v-row>
<v-col class="pt-1 pr-0 pb-0 flex-col">
<Calendar-full
:initial="'listYear'"
:head=true
/>
</v-col>
</v-row> -->
<v-row>
<v-col class="pr-0 pt-0 flex-column">
<v-card class="h-100 bg-transparent pa-2 d-flex flex-column">
<v-row class="d-flex">
<v-col> <Calendar-full
/></v-col>
<v-col> <Calendar-full
:initial="'listYear'"
/>
</v-col>
</v-row>
<!-- {{appStore.countvisitor}} -->
</v-card>
</v-col>
<!-- </v-locale-provider> -->
<!-- </v-col> -->
<!-- <v-col>
<v-btn
@click="proba">
Button
</v-btn>
{{appStore.countvisitor.totalvisit}}
</v-col> -->
</v-row>
</v-col>
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
<v-row class="flex-grow-1 ma-0 mx-1">
<v-col class="pt-0">
<v-card class="h-100 flex-column">
<v-row v-for="x in stat" :key="x">
<v-col>
<v-card
class="ma-2 d-flex flex-column"
height="100"
elevation="0"
>
<v-card class="h-100 text-center g text-numeral bg-main_theme">
<v-card-title class="statstyle py-0 text-overline font-weight-bold bg-main_theme">
{{x.status}}
</v-card-title>
<v-card-text class="numstyle mt-2 py-0 font-weight-bold bg-main_theme">
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.num)' :duration='2'/>
</v-card-text>
</v-card>
<!-- </v-img> -->
</v-card>
</v-col>
<v-divider/>
</v-row>
</v-card>
</v-col>
</v-row>
<v-row class="flex-grow-0 ma-0 mx-1">
<v-col class="py-0">
<v-card class="h-100 flex-colmn"
>
<v-row class="ma-3">
<v-col
v-for="x in 6"
:key="x"
lg=6
class="pa-1"
>
<v-btn
prepend-icon="mdi-wikipedia"
block
variant="outlined"
class="ma-1"
>
Wiki
</v-btn>
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
</v-col>
<v-col class="d-flex flex-column pl-0 justify-space-between" lg=3>
<v-card
class="h-100 bg-transparent flex-column d-flex "
elevation="1"
>
<v-row>
<v-col cols="auto" class="pa-0">
<v-card height="93vh" class="overflow-auto ">
<News-list-home />
</v-card>
</v-col>
</v-row>
<!-- <div class="flex-grow-1 flex-column bg-red overflow-auto"> -->
<!-- <News-list-home/> -->
<!-- </div> -->
<!-- <News-list v-if="accountStore.cod2user"/> -->
</v-card>
</v-col>
</v-row>
</v-container>
</template>
<script>
import { ref, onMounted } from 'vue'
import {useAppStore} from '@/store/app'
import {useAccountStore} from '@/store/AccountStore'
import {pagecounter} from '@/utils/universal_functions'
import NewsList from '@/components/news-list.vue'
import CarouselList from '@/components/carousel-list.vue'
import CarouselNumbers from '@/components/carousel-numbers.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import CalendarFull from '@/components/UI/Calendar-full.vue'
import NewsListHome from '@/components/news-list-home.vue'
export default {
components: {
NewsList,
CarouselList,
CarouselNumbers,
CalendarFull,
NewsListHome
},
setup(){
const t_baseCriteria = ref([])
onMounted(() => {
proba()
})
const appStore = useAppStore()
pagecounter()
const model= null
const accountStore = useAccountStore()
const stat = [
{status:'В инспекции', num:'57', img: "/media/newsimage/default.jpg"},
{status:'Работают удаленно', num:'13', img: "/media/newsimage/numbers/vacation.jpg"},
{status:'В командировке', num:'3', img: "/media/newsimage/numbers/med.jpg"},
{status:'В отпусках', num:'45', img: "/media/newsimage/numbers/vacation.jpg"},
{status:'Болеют', num:'1', img: "/media/newsimage/numbers/med.jpg"},
]
// const onlines = [
// {status:'Всего', num: 1, img: "/media/newsimage/numbers/calendar.jpg"},
// {status:'Сегодня', num: 2, img: "/media/newsimage/numbers/sept.jpg"},
// {status:'Уникальных', num: 3, img: "/media/newsimage/numbers/uni.jpg"},
// ]
const onlines = ref([
{status:'Всего', num: appStore.countvisitor.totalvisit, img: "/media/newsimage/numbers/calendar.jpg"},
{status:'Сегодня', num: appStore.countvisitor.visittoday, img: "/media/newsimage/numbers/sept.jpg"},
{status:'Уникальных', num: appStore.countvisitor.uniqtoday, img: "/media/newsimage/numbers/uni.jpg"},
])
function proba(){
axiosApiInstance.get('api/feedback/feedbackdata/')
.then(data => {
t_baseCriteria.value = data.data.results
})
}
return {
accountStore,
stat,
model,
onlines,
appStore,
proba,
}
}
}
</script>
<style lang="scss">
.v-picker-title, .v-picker__header, .v-picker__actions {
display: none;
}
.pik {
height: 97%;
}
.hicard {
height: 40%!important;
overflow: auto;
}
.fg {
height: 240px;
overflow: auto;
}
</style>