This commit is contained in:
iriska-gri committed 2023-09-05 16:07:55 +03:00
commit 8c95bbf909
126 files changed
+16922

No files matched your search

+380
View File
@@ -0,0 +1,380 @@
<template>
<v-app>
<v-app-bar
:elevation="2"
density="compact"
color="teal-darken-4"
>
<v-app-bar-nav-icon
@click="drawer = !drawer"
>
<img
style="cursor:pointer"
:src="imageSrc"
/>
</v-app-bar-nav-icon>
<v-toolbar-title>
Портал МиФНС по ЦОД № 2
</v-toolbar-title>
<template v-slot:image>
<v-img
gradient="to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)"
/>
</template>
<template v-slot:append>
<template v-if="accountStore.cod2user">
<v-card
border
class="bg-transparent"
density="compact"
:prepend-avatar="accountStore.user.photo"
:title="accountStore.user.fio"
:subtitle="accountStore.user.post"
variant="text"
@click="getcard"
/>
<v-dialog
v-model="menuGetUserDialog"
persistent
width="600"
>
<Card-users
:menuGetUserDialog="menuGetUserDialog"
:loging="accountStore.user.login"
@menusClose="menuGetUserDialog=false"
/>
</v-dialog>
<v-tooltip location="bottom">
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
dark
to="/faq"
icon="mdi-comment-question-outline"
/>
</template>
<span>F.A.Q.</span>
</v-tooltip>
<v-dialog
v-model="LikeDialog"
persistent
width="800"
>
<template v-slot:activator="{ props }">
<v-btn
v-bind="props"
dark
icon="mdi-thumb-up-outline"
/>
</template>
<Card-like
:LikeDialog="LikeDialog"
@menusClose="LikeDialog=false"
/>
</v-dialog>
<v-btn
icon
@click="toggleTheme"
>
<v-icon
class="mr-1"
color="lampa"
>
mdi-lightbulb-outline
</v-icon>
</v-btn>
<v-btn dark icon="mdi-magnify"/>
<v-btn
dark
icon="mdi-account-multiple-outline"
@click="drawer_right=!drawer_right"
/>
<v-btn
dark
icon="mdi-logout"
@click="accountStore.logout"
/>
</template>
<template v-else>
<v-row justify="center">
<Auth-form/>
</v-row>
</template>
</template>
</v-app-bar>
<v-navigation-drawer v-model="drawer">
<v-divider/>
<v-list
nav
density="compact"
>
<template v-for="(x, key) in navigations">
<v-list-item
v-if="!('submenu' in x)"
:key="x.name"
:title="x.name"
:value="x.name"
:href="x.link"
:to="x.path"
color="navigation"
>
<template v-slot:prepend>
<v-icon
:icon="x.ico"
/>
</template>
</v-list-item>
<v-list-group
v-else
:key="key"
:value="x.name"
>
<template v-slot:activator="{ props }">
<v-list-item
v-bind="props"
:title="x.name"
:prepend-icon="x.ico"
/>
</template>
<v-list-item
v-for="(child, k) in x.submenu"
:href="child.link"
:key="k"
:value="child.name"
:title="child.name"
:to="child.path"
/>
</v-list-group>
</template>
</v-list>
<v-list
nav
density="compact"
>
<v-list-item v-for="x of mainmenuStore.portallinks"
:key="x.name"
:title="x.name"
:value="x.name"
:href="x.link"
color="teal-darken-4"
>
<template v-slot:prepend>
<v-icon
:icon="x.imagecode"
/>
</template>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-main class="d-flex bg-main_theme">
<router-view
/>
<div class="mystat d-flex flex-column">
<v-btn
class="mb-1"
prepend-icon="mdi-wikipedia"
size="small"
variant="outlined"
height="30"
>
Wiki
</v-btn>
<v-btn
height="30"
prepend-icon="mdi-apple-finder"
size="small"
variant="outlined"
>
МС
</v-btn>
</div>
</v-main>
<v-navigation-drawer
v-if="accountStore.cod2user"
v-model="drawer_right"
rail
permanent
location="right"
@click="rail = false"
>
<Online-users/>
<!-- <template v-slot:append>
<v-list lines="one">
<v-list-item
v-for="(val,key) in appStore.countvisitor"
:key="key"
:title="val"
></v-list-item>
</v-list> -->
<!-- </template> -->
</v-navigation-drawer>
</v-app>
</template>
<script>
import { ref,computed } from 'vue'
import uf from '@/utils/universal_functions'
import {useAccountStore} from '@/store/AccountStore'
import {useMainmenuStore} from '@/store/MainmenuStore'
import {useAppStore} from '@/store/app'
import { useTheme } from "vuetify";
import AuthForm from '@/components/UI/Auth-form.vue'
import OnlineUsers from '@/components/onlineUsers.vue'
import CardUsers from '@/components/cardUsers.vue'
import CardLike from '@/components/cardLike.vue'
export default {
components: { AuthForm, OnlineUsers, CardUsers, CardLike},
mixins:[uf],
setup(){
const appStore = useAppStore()
const theme = useTheme();
const mainmenuStore= useMainmenuStore()
const accountStore = useAccountStore()
const drawer = ref(true)
const drawer_right=ref(true)
const menuGetUserDialog=ref(false)
const LikeDialog=ref(false)
const toggleTheme = () => {
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
}
mainmenuStore.loadlinks()
const navigations = [
{
name: 'Главная',
ico: 'mdi-home',
path: "/home"
},
{
name: 'Структура',
ico: 'mdi-source-branch',
path: "/structure"
},
{
name: 'Сотрудники',
ico: 'mdi-account-multiple-outline',
submenu:[
{
name: 'Справочник',
link: 'http://10.252.44.33/accounting6/members.php'
},
]
},
{
name: 'Деятельность',
ico: 'mdi-bulletin-board',
submenu:[
{
name: 'Обеспечивающая',
path:"/providing"
}
]
},
{
name: 'Безопасность',
ico: 'mdi-routes',
path:"/securyty"
},
{
name: 'О портале',
ico: 'mdi-information-variant',
path:"/portal"
},
{
name: 'Об инспекции',
ico: 'mdi-city',
path:"/inspection"
}
]
const imageSrc=computed(()=> {
return new URL(`@/assets/FNS-logo-xs.png`, import.meta.url).href;
})
const getcard = async() => {
menuGetUserDialog.value = true
}
return {
theme,
mainmenuStore,
accountStore,
drawer,
drawer_right,
toggleTheme,
navigations,
imageSrc,
getcard,
menuGetUserDialog,
LikeDialog,
// userlinks,
appStore
}
}
}
</script>
<style lang="scss">
.mystat {
position: fixed;
right: 10px;
bottom: 10px;
z-index: 1005;
}
</style>