Files
PORTAL_COD2/src/front/src/views/HomePage.vue
T
2023-12-08 13:35:13 +03:00

184 lines
3.7 KiB
Vue

<template>
<v-container fluid class="d-flex mx-0 ">
<v-row>
<v-col
class="d-flex flex-column"
lg=7
md=12
cols=12
>
<v-row class="flex-grow-0">
<v-col class="pr-0 pb-0">
<Carousel-list/>
</v-col>
</v-row>
<v-row style="height:250px">
<v-col class="d-flex flex-column pr-0 pt-3" >
<event-calendar/>
</v-col>
</v-row>
</v-col>
<v-col class="d-flex flex-column">
<v-row>
<v-col class="d-flex flex-column">
<v-row>
<v-col
cols="4"
class="pb-0"
>
<digital-letna/>
</v-col>
<v-col class="pb-0 pl-0 d-flex flex-column">
<v-card class="h-100 d-flex flex-column">
<v-row class="d-flex h-0 overflow-auto">
<v-col>
<News-list-home />
</v-col>
</v-row>
</v-card>
</v-col>
</v-row>
</v-col>
</v-row>
<v-row class="flex-grow-0">
<v-col>
<v-card class=" flex-colmn">
<v-btn-toggle
v-model="toggle"
divided
variant="outlined"
>
<v-tooltip
v-for="x in favorit"
:key="x"
:text="x.page"
location="top"
>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
:icon="x.ico"
:to="x.fullPath"
/>
</template>
</v-tooltip>
</v-btn-toggle>
</v-card>
</v-col>
</v-row>
</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 CarouselList from '@/components/carousel-list.vue'
import CarouselNumbers from '@/components/carousel-numbers.vue'
import CalendarFull from '@/components/UI/Calendar-full.vue'
import NewsListHome from '@/components/news-list-home.vue'
import LoadRound from '@/components/load-round.vue'
import DigitalLetna from '@/components/digital-letna.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import EventCalendar from '@/components/UI/event-calendar.vue'
export default {
components: {
CarouselList,
CarouselNumbers,
CalendarFull,
NewsListHome,
LoadRound,
DigitalLetna,
EventCalendar
},
setup(){
const appStore = useAppStore()
const favorit = ref([])
const toggle = ref(null)
pagecounter()
const accountStore = useAccountStore()
onMounted(() => {
favoritLinks()
console.log(accountStore.user.is_staff, '=1==1=1=1=1=1=1=1=1=1==1==1=1=1=1=1');
})
const favoritLinks = () => {
axiosApiInstance.get(`api/watcher/selectedlinks/`)
.then(data => {
favorit.value = data.data
})
}
return {
accountStore,
appStore,
favoritLinks,
favorit,
toggle
}
}
}
</script>
<style lang="scss">
.v-picker-title, .v-picker__header, .v-picker__actions {
display: none;
}
.pik {
height: 84vh;
/*height: 85.3vh;*/
// height: 98.6%;
}
.hicard {
height: 40%!important;
overflow: auto;
}
.fg {
height: 240px;
overflow: auto;
}
.fixed-bar {
position: sticky;
position: -webkit-sticky; /* for Safari */
top: 0em;
z-index: 2;
}
</style>