Merge branch 'I'

This commit is contained in:
iriska-gri committed 2023-10-18 10:21:04 +03:00
commit 5e120417a9
35 files changed
+850 -296

No files matched your search

+29 -2
View File
@@ -1,12 +1,12 @@
{
"name": "front",
"version": "0.0.14",
"version": "0.0.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "front",
"version": "0.0.14",
"version": "0.0.15",
"dependencies": {
"@fullcalendar/core": "^6.1.8",
"@fullcalendar/daygrid": "^6.1.8",
@@ -19,10 +19,12 @@
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.3",
"axios": "^1.4.0",
"chart.js": "^4.4.0",
"date-fns": "^2.30.0",
"pinia": "^2.0.23",
"roboto-fontface": "*",
"vue": "^3.2.0",
"vue-chartjs": "^5.2.0",
"vue-jwt-decode": "^0.1.0",
"vue-router": "^4.0.0",
"vue-scrollto": "^2.20.0",
@@ -3139,6 +3141,11 @@
"integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==",
"dev": true
},
"node_modules/@kurkle/color": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
"integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw=="
},
"node_modules/@mdi/font": {
"version": "7.0.96",
"resolved": "https://registry.npmjs.org/@mdi/font/-/font-7.0.96.tgz",
@@ -6525,6 +6532,17 @@
"is-regex": "^1.0.3"
}
},
"node_modules/chart.js": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz",
"integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==",
"dependencies": {
"@kurkle/color": "^0.3.0"
},
"engines": {
"pnpm": ">=7"
}
},
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -12845,6 +12863,15 @@
"@vue/shared": "3.3.4"
}
},
"node_modules/vue-chartjs": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz",
"integrity": "sha512-d3zpKmGZr2OWHQ1xmxBcAn5ShTG917+/UCLaSpaCDDqT0U7DBsvFzTs69ZnHCgKoXT55GZDW8YEj9Av+dlONLA==",
"peerDependencies": {
"chart.js": "^4.1.1",
"vue": "^3.0.0-0 || ^2.7.0"
}
},
"node_modules/vue-component-type-helpers": {
"version": "1.8.8",
"resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-1.8.8.tgz",
+3 -1
View File
@@ -1,6 +1,6 @@
{
"name": "front",
"version": "0.0.14",
"version": "0.0.15",
"scripts": {
"dev": "vite",
"build": "vite build",
@@ -21,10 +21,12 @@
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.3",
"axios": "^1.4.0",
"chart.js": "^4.4.0",
"date-fns": "^2.30.0",
"pinia": "^2.0.23",
"roboto-fontface": "*",
"vue": "^3.2.0",
"vue-chartjs": "^5.2.0",
"vue-jwt-decode": "^0.1.0",
"vue-router": "^4.0.0",
"vue-scrollto": "^2.20.0",
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 KiB

+1 -8
View File
@@ -106,11 +106,6 @@ export default {
}
const logging=async()=>{
if (!v$.value.$error) {
await accountStore.logging(anon)
}
@@ -118,9 +113,7 @@ export default {
console.log(true);
}
}
onMounted(() => {
v$.value.$validate()
})
-13
View File
@@ -118,20 +118,7 @@ export default {
.then(data => {
for (let x in data.data) {
// if (x =="Отпуск") {
// data.data[x].map(e=>{
// let d = new Date(e.planned_date)
// calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
// }
// )
// }
if (x=="План-график") {
data.data[x].map(e=>{
+221
View File
@@ -0,0 +1,221 @@
<template>
<div class="flex-grow-1 flex-column overflow-auto">
<v-card
v-show="route.path=='/'"
:ref="i"
class="mx-auto"
:class="i>0?'mt-1':''"
v-for="(x, i) in newss.result" :key= i
>
<v-card-title class="py-1">
{{x.title}}
</v-card-title>
<v-img
:src="`${burl}${x.link}`"
height="164px"
cover
width="92%"
class="mx-auto"
/>
<v-list-item class="w-100">
<div class="justify-self-start mt-1">
<v-icon size="x-small" class="me-1" icon="mdi-account" ></v-icon>
<span class="text-caption me-2">{{splitname(x.author)}}</span>
</div>
<template v-slot:append>
<div class="justify-self-end">
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
<span class="me-1">·</span>
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==false).length}}</span>
<span class="me-1">·</span>
<v-icon size="x-small" class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"/>
<span class="pointer subheading">{{ x.comment.length }}</span>
</div>
</template>
</v-list-item>
<v-divider/>
<v-card-text class="pb-0">
{{limitText(x.text)}}
</v-card-text>
<div class="pt-1 pl-1 pb-2">
<v-btn
color="light-blue-darken-4"
variant="text"
:to='`/news?id=${x.id}`'
size="small"
append-icon="mdi-step-forward-2"
>
Подробнее
</v-btn>
</div>
</v-card>
</div>
</template>
<script>
import { ref, watch, onBeforeUpdate, onMounted } from 'vue'
import {useAccountStore} from '@/store/AccountStore'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
import myHelper from './UI/my-helper.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import { format } from 'date-fns'
import { useRoute } from 'vue-router'
const accountStore = useAccountStore()
export default {
components: { myHelper },
setup(){
const divs = ref([])
onBeforeUpdate(() => {
divs.value = []
})
const newss=ref([])
const dialogCommentShow = ref(false)
const burl = baseURL.slice(0,-1)
const textcomment = ref('')
const idnews = ref(0)
const page = ref(1)
const selecnews = ref(2)
const route = useRoute()
let str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`
if (route.path == '/news' && 'id' in route.query){
str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}&id=${route.query.id}`
}
getfromserver(str, newss)
const toggleIncrementLike = (news, scores) => {
axiosApiInstance.post(`api/navigation/news/`, {news: news, scores: scores}).then(result => {
newss.value.result[newss.value.result.findIndex(e=> e.id==news)].scores= result.data
})
}
const addComment = () => {
axiosApiInstance.post(`api/navigation/news/`, {news: idnews.value, text: textcomment.value}).then(result => {
dialogCommentShow.value=!dialogCommentShow.value
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
})
textcomment.value=""
}
const deletComment = (id, news) => {
axiosApiInstance.post(`api/navigation/news/`, {delid: id, news: news}).then(result => {
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
})
}
const pagelistNews =() => {
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`, newss)
}
watch(()=>accountStore.cod2user ,(newValue,oldValue)=>{
if(newValue){
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`,newss)
}
}, {deep:true})
watch(()=>selecnews ,(newValue,oldValue)=>{
if(newValue){
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${newValue.value}`, newss)
}
}, {deep:true})
const dateformat = (datas) => {
return format(new Date(datas), 'dd.MM.yyyy HH:mm')
}
const openComent = (news) => {
dialogCommentShow.value=!dialogCommentShow.value
idnews.value = news
}
const limitText=(text)=> {
const t = text.split(' ').slice(0, 25)
return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}`
}
const splitname = (name) => {
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
}
return {
newss,
burl,
limitText,
toggleIncrementLike,
dialogCommentShow,
accountStore,
dateformat,
splitname,
textcomment,
openComent,
addComment,
idnews,
deletComment,
pagelistNews,
divs,
page,
selecnews,
route
}
}
}
</script>
<style scoped>
.pagination {
display: flex;
}
.newsVH {
height: 90vh;
}
.bgchat {
background-color: #efe9f98a;
}
.bgchatnot {
background-color: #eef9efad;
}
/* .bgf {
background: url("@/assets/message.jpg") repeat-y;
} */
</style>
+139 -112
View File
@@ -1,30 +1,16 @@
<template>
<v-container class="py-0 newsVH px-0 bg-transparent overflow-auto">
<!-- <v-btn v-scroll-to="{element:'#g'}">
j
</v-btn> -->
<v-card
v-show="pages=='home'"
v-show="route.path=='/'"
:ref="i"
class="mx-auto"
:class="i>0?'mt-1':''"
v-for="(x, i) in newss" :key= i
v-for="(x, i) in newss.result" :key= i
>
<v-list-item class="w-100 pl-4 py-2 pt-3">
<template v-slot:prepend>
<v-avatar
size="35"
color="grey-darken-3"
:image="accountStore.user.photo"
></v-avatar>
</template>
<v-list-item-title class="text-body-2">{{x.author.fio}}</v-list-item-title>
<v-list-item-subtitle>Участник</v-list-item-subtitle>
</v-list-item>
<v-card-title class="pt-0 pb-1">
<v-card-title class="py-1">
{{x.title}}
</v-card-title>
<v-img
@@ -35,51 +21,61 @@
class="mx-auto"
/>
<v-list-item class="w-100">
<div class="justify-self-start mt-1">
<v-icon size="x-small" class="me-1" icon="mdi-account" ></v-icon>
<span class="text-caption me-2">{{splitname(x.author)}}</span>
</div>
<template v-slot:append>
<div class="justify-self-end">
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
<span class="me-1">·</span>
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==false).length}}</span>
<span class="me-1">·</span>
<v-icon size="x-small" class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"/>
<span @click="x.showComment=!x.showComment" class="pointer subheading">{{ x.comment.length }}</span>
<span class="pointer subheading">{{ x.comment.length }}</span>
</div>
</template>
</v-list-item>
<v-card-text class="py-0">
<v-divider/>
<v-card-text class="pb-0">
{{limitText(x.text)}}
</v-card-text>
<v-card-actions>
<v-btn
color="#3E8890"
<div class="pt-1 pl-1 pb-2">
<v-btn
color="light-blue-darken-4"
variant="text"
:to="'/news'"
:to='`/news?id=${x.id}`'
size="small"
append-icon="mdi-step-forward-2"
>
Подробнее
</v-btn>
</v-card-actions>
</div>
<!-- :to="'/news'" -->
</v-card>
<!-- <div ref="#g">hello</div> -->
<!-- ------------------------------ @click="scrollMeTo('porto')"---------------------------------------------------- -->
<div >
<v-card v-show="pages=='news'"
class="mx-auto rounded-0 gggggggggggggggggggggggggg"
<v-card v-show="route.path=='/news'"
class="mx-auto rounded-0"
:ref="el => { if (el) divs[i] = el }"
v-for="(x, i) in newss" :key=i
v-for="(x, i) in newss.result" :key=i
>
<v-list-item class="w-100 pl-4 py-2 pt-3">
<template v-slot:prepend>
@@ -89,7 +85,7 @@
:image=accountStore.user.photo></v-avatar>
</template>
<v-list-item-title>{{x.author.fio}} {{ i }}</v-list-item-title>
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
<v-list-item-subtitle>Участник</v-list-item-subtitle>
</v-list-item>
@@ -109,13 +105,10 @@
<template v-slot:append>
<div class="justify-self-end">
<!-- <v-btn v-scroll-to="{element:'#nh'}">
2
</v-btn> -->
<v-icon class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
<v-icon class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
<span class="me-1">·</span>
<v-icon class="me-1" icon="mdi-thumb-down-outline" @click="toggleIncrementLike(x.id, false)"/>
<v-icon class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
<span class="subheading me-2">{{x.scores.filter(e=> e.score==false).length}}</span>
<span class="me-1">·</span>
<v-icon class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"/>
@@ -143,15 +136,13 @@
class="d-flex flex-column pa-3"
>
<!-- :class="accountStore.user.login==y.author.login?'text-end mr-6':''" -->
<v-row
class="justify-space-between ma-0 align-center bgchat mr-7"
:class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'"
>
<v-col class="flex-grow-1 text-subtitle-2 pa-0 "
<v-col class="flex-grow-1 text-subtitle-2 pl-2 pa-0 "
>
{{ accountStore.user.login==y.author.login?'':splitname(y.author) }}
@@ -160,19 +151,13 @@
{{dateformat(y.cdate)}}
</v-col>
<v-col class="pa-0 text-end text-subtitle-2 ">
<v-col class="pa-0 pr-2 text-end text-subtitle-2 ">
{{ accountStore.user.login!=y.author.login?'':splitname(y.author) }}
</v-col>
</v-row>
<!-- <div style="text-align: center;">
<div style="display: inline-block; text-align: left;">
Centered
Content
</div>
</div> -->
<div class="text-subtitle-2">
@@ -182,8 +167,8 @@
<v-alert
color="#f9f9f9"
color="white"
rounded=0
:border="accountStore.user.login==y.author.login?'end':'start'"
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
elevation=0
@@ -216,12 +201,13 @@
</div>
</v-card>
<!-- <div id="nh">ss</div> -->
</div>
<v-row justify="center">
<v-dialog
v-model="dialogCommentShow"
@@ -261,35 +247,50 @@
</v-card>
</v-dialog>
</v-row>
</v-container>
</v-container>
<v-container v-show="route.path=='/news'">
<div class="pagination" >
<v-pagination
class="flex-grow-1"
v-model="page"
:length="newss.allnews"
prev-icon="mdi-menu-left"
next-icon="mdi-menu-right"
@click="pagelistNews"
></v-pagination>
<v-select
class="flex-grow-0 pt-2"
density="compact"
v-model="selecnews"
variant="outlined"
:items="['1', '2', '3', '4', '5', '6']"
>
</v-select>
</div>
</v-container>
</template>
<script>
import { ref, watch, onBeforeUpdate } from 'vue'
import { ref, watch, onBeforeUpdate, onMounted } from 'vue'
import {useAccountStore} from '@/store/AccountStore'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
import myHelper from './UI/my-helper.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import { format } from 'date-fns'
import { useRoute } from 'vue-router'
const accountStore = useAccountStore()
export default {
components: { myHelper },
props: {
pages: {
type: String,
default: 'home'
}
},
setup(props){
setup(){
const divs = ref([])
onBeforeUpdate(() => {
divs.value = []
@@ -299,40 +300,69 @@ export default {
const burl = baseURL.slice(0,-1)
const textcomment = ref('')
const idnews = ref(0)
const page = ref(1)
const selecnews = ref(2)
const route = useRoute()
let str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`
if (route.path == '/news' && 'id' in route.query){
str = `api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}&id=${route.query.id}`
}
getfromserver(str, newss)
const toggleIncrementLike = (news, scores) => {
axiosApiInstance.post(`api/navigation/news/`, {news: news, scores: scores}).then(result => {
newss.value[newss.value.findIndex(e=> e.id==news)].scores= result.data
// console.log(result.data, 'result.data-----------------')
newss.value.result[newss.value.result.findIndex(e=> e.id==news)].scores= result.data
})
}
const dateformat = (datas) => {
return format(new Date(datas), 'dd.MM.yyyy HH:mm')
}
const newses =() => {
}
const openComent = (news) => {
dialogCommentShow.value=!dialogCommentShow.value
idnews.value = news
}
const addComment = () => {
axiosApiInstance.post(`api/navigation/news/`, {news: idnews.value, text: textcomment.value}).then(result => {
dialogCommentShow.value=!dialogCommentShow.value
newss.value[newss.value.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
})
textcomment.value=""
}
const deletComment = (id, news) => {
axiosApiInstance.post(`api/navigation/news/`, {delid: id, news: news}).then(result => {
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
})
}
const pagelistNews =() => {
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`, newss)
}
watch(()=>accountStore.cod2user ,(newValue,oldValue)=>{
if(newValue){
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${selecnews.value}`,newss)
}
}, {deep:true})
watch(()=>selecnews ,(newValue,oldValue)=>{
if(newValue){
getfromserver(`api/navigation/news/?name=${route.path}&page=${page.value-1}&selected=${newValue.value}`, newss)
}
}, {deep:true})
const dateformat = (datas) => {
return format(new Date(datas), 'dd.MM.yyyy HH:mm')
}
const openComent = (news) => {
dialogCommentShow.value=!dialogCommentShow.value
idnews.value = news
}
const limitText=(text)=> {
const t = text.split(' ').slice(0, 25)
return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}`
@@ -342,24 +372,9 @@ export default {
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
}
getfromserver(`api/navigation/news/?name=${props.pages}`, newss)
watch(()=>accountStore.cod2user ,(newValue,oldValue)=>{
if(newValue){
getfromserver(`api/navigation/news/`,newss)
}
}, {deep:true})
const deletComment = (id, news) => {
axiosApiInstance.post(`api/navigation/news/`, {delid: id, news: news}).then(result => {
newss.value[newss.value.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
})
}
return {
@@ -376,18 +391,25 @@ export default {
addComment,
idnews,
deletComment,
newses,
divs
pagelistNews,
divs,
page,
selecnews,
route
}
}
}
</script>
<style>
<style scoped>
.pagination {
display: flex;
}
.newsVH {
height: 93vh;
height: 92vh;
}
.bgchat {
@@ -398,4 +420,9 @@ export default {
background-color: #eef9efad;
}
/* .bgf {
background: url("@/assets/message.jpg") repeat-y;
} */
</style>
+47 -107
View File
@@ -16,7 +16,7 @@
class="bg-transparent py"
density="compact"
:prepend-avatar="imageSrc"
title="Портал МиФНС по ЦОД № 2"
title="Портал МИ ФНС по ЦОД № 2"
variant="text"
:to="'/'" />
@@ -110,9 +110,15 @@
:to="x.path"
color="navigation">
<template v-slot:prepend>
<template v-slot:prepend>
<v-icon :icon="x.ico"/>
</template>
<v-tooltip
v-if="rail"
activator="parent"
location="top">
{{ x.name }}
</v-tooltip>
</template>
</v-list-item>
<v-list-group v-else
@@ -124,6 +130,13 @@
v-bind="props"
:title="x.name"
:prepend-icon="x.ico" />
<v-tooltip
v-if="rail"
activator="parent"
location="top"
>
{{ x.name }}
</v-tooltip>
</template>
<v-list-item v-for="(child, k) in x.submenu"
@@ -133,6 +146,13 @@
:title="!rail?child.name:menuTruncated(child.name)"
:to="child.path"
>
<v-tooltip
v-if="rail"
activator="parent"
location="top"
>
{{ child.name }}
</v-tooltip>
</v-list-item>
</v-list-group>
</template>
@@ -147,6 +167,12 @@
<template v-slot:prepend>
<v-icon
:icon="x.imagecode" />
<v-tooltip
v-if="rail"
activator="parent"
location="top">
{{ x.name }}
</v-tooltip>
</template>
</v-list-item>
</v-list>
@@ -187,105 +213,9 @@
</v-col>
</v-row>
</v-col>
<!-- <v-col class="pointer align-self-center flex-grow-0"
@click="rail = !rail">
<v-icon
size="20"
:icon="rail?'mdi-chevron-right':'mdi-chevron-left'"
/>
</v-col> -->
</v-row>
<!-- <div class="d-flex flex-column h-100">
<v-row>
<v-col>
<v-divider/>
<v-list
nav
density="compact">
<template v-for="(x, key) in navigations">
<v-list-item
v-if="!('submenu' in x)"
:key="x.key"
: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-col>
</v-row>
<v-row class="flex-grow-0 mb-1 text-caption font-weight-bold text-truncate">
<v-col>
<v-list>
<v-list-item >
<p class="pb-2">Посещений всего: {{ appStore.countvisitor.totalvisit }}</p>
<p class="pb-2">Посещений сегодня: {{ appStore.countvisitor.visittoday }}</p>
<p class="pb-2">Уникальных посещений: {{ appStore.countvisitor.uniqtoday }}</p>
</v-list-item>
</v-list>
</v-col>
</v-row>
</div> -->
</v-navigation-drawer>
<!-- <v-navigation-drawer
@@ -306,7 +236,7 @@
</v-navigation-drawer> -->
<v-main class="d-flex bg-main_theme">
<v-main v-if="accountStore.cod2user" class="d-flex bg-main_theme">
<router-view />
<!-- <div class="mystat d-flex flex-column">
<v-btn
@@ -328,6 +258,12 @@
</v-btn>
</div> -->
</v-main>
<v-main v-else class="d-flex justify-center align-center text-h3 bg-teal-lighten-2">
<div>
<p class="text-center">Добро пожаловать на портал МИ ФНС по ЦОД № 2</p>
<p class="mt-3 text-subtitle-1 text-center">Авторизуйтесь, для получения доступа к контенту портала</p>
</div>
</v-main>
<v-navigation-drawer v-if="accountStore.cod2user"
v-model="drawer_right"
rail permanent
@@ -357,7 +293,7 @@
<script>
import { ref, computed } from 'vue'
import { ref, computed, onMounted} from 'vue'
import uf from '@/utils/universal_functions'
import { useAccountStore } from '@/store/AccountStore'
import { useMainmenuStore } from '@/store/MainmenuStore'
@@ -402,7 +338,12 @@ export default {
{
name: 'Структура',
ico: 'mdi-source-branch',
path: "/structure"
submenu: [
{
name: 'ОКиБ',
path: "/okib"
},
]
},
{
name: 'Сотрудники',
@@ -446,18 +387,17 @@ export default {
}
]
const imageSrc = computed(() => {
return new URL(`@/assets/FNS-logo-xs.png`, import.meta.url).href;
})
const getcard = async () => {
menuGetUserDialog.value = true
}
}
onMounted(() => {
drawer.value = accountStore.cod2user ? true : false
})
return {
theme,
+29 -5
View File
@@ -14,54 +14,78 @@ const routes = [
title:"Портал МиФНС по ЦОД №2"
}
},
{
path: '/structure',
name: 'StructurePage',
component: () => import('@/views/StructurePage.vue'),
path: '/okib',
name: 'OKiBPage',
component: () => import('@/views/nested_view/o_OKiB.vue'),
meta:{
title:"Структура"
title:"Отдел кадров и безопасности"
}
},
{
path: '/providing',
name: 'ProvidingActivitiesPage',
component: () => import('@/views/ProvidingActivitiesPage.vue'),
meta:{
title:"Обеспечивающая деятельность"
}
},
{
path: '/faq',
name: 'FAQPage',
component: () => import('@/views/FAQPage.vue'),
meta:{
title:"Часто задаваемые вопросы"
}
},
{
path: '/feedback',
name: 'FeedbackPage',
component: () => import('@/views/FeedbackPage.vue'),
meta:{
title:"Обратная связь"
}
},
{
path: '/labor',
name: 'LaborProtection',
component: () => import('@/views/LaborProtection.vue'),
meta:{
title:"Безопасность"
}
},
{
path: '/securyty',
name: 'SecurityPage',
component: () => import('@/views/SecurityPage.vue'),
meta:{
title:"Охрана труда"
}
},
{
path: '/inspection',
name: 'AboutInspectionPage',
component: () => import('@/views/AboutInspectionPage.vue'),
meta:{
title:"Об инспекции"
}
},
{
path: '/portal',
name: 'AboutPortalPage',
component: () => import('@/views/AboutPortalPage.vue'),
meta:{
title:"О портале"
}
},
{
path: '/news',
name: 'AboutNewsPage',
component: () => import('@/views/NewsPage.vue'),
meta:{
title:"Лента новостей"
}
},
],
},
+1 -6
View File
@@ -38,17 +38,12 @@ export function checkremote(filecheck){
export default str;
export function pagecounter(){
console.log('Загружаю данные для циферок по количеству');
const router = useRouter()
const accountStore = useAccountStore()
const appStore = useAppStore()
+4 -1
View File
@@ -9,8 +9,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+67 -3
View File
@@ -5,10 +5,58 @@
<!-- </div> -->
<v-row>
<v-col
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
class="ma-3"
>
О портале
<v-table density="compact" class="mt-3">
<thead>
<tr>
<th class="text-left">
Страница
</th>
<th class="text-left">
Количество посещений
</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in visiting.pages"
:key="item.name"
>
<td>{{ item.page }}</td>
<td>{{ item.count__sum }}</td>
</tr>
</tbody>
</v-table>
<v-table density="compact" class="mt-3">
<thead>
<tr>
<th class="text-left">
Пользователь
</th>
<th class="text-left">
Страница
</th>
<th class="text-left">
Количество посещений
</th>
</tr>
</thead>
<tbody>
<tr
v-for="item in visiting.users"
:key="item.name"
>
<td>{{ item.user__username }}</td>
<td>{{ item.page }}</td>
<td>{{ item.count__sum }}</td>
</tr>
</tbody>
</v-table>
</v-col>
@@ -17,9 +65,25 @@
</template>
<script>
import { ref } from 'vue'
import {pagecounter} from '@/utils/universal_functions'
import {getfromserver} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
const visiting = ref({})
getfromserver(`api/watcher/counter/`, visiting)
return {
visiting
}
}
}
</script>
<style>
+4 -1
View File
@@ -9,8 +9,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+4 -1
View File
@@ -9,8 +9,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+9 -7
View File
@@ -108,13 +108,14 @@
</v-row>
</v-col>
<v-col class="d-flex flex-column justify-space-between px-0 py-2 pr-3 pb-0" lg=3>
<v-col class="d-flex flex-column pl-0 justify-space-between" lg=3>
<v-card
class="h-100 bg-transparent "
class="h-100 bg-transparent flex-column d-flex"
elevation="0"
>
<News-list :page="'home'" v-if="accountStore.cod2user"/>
<!-- <News-list-home/> -->
<News-list v-if="accountStore.cod2user"/>
@@ -132,7 +133,7 @@
</template>
<script>
import { ref, onMounted, computed } from 'vue'
import { ref, onMounted } from 'vue'
import {useAppStore} from '@/store/app'
import {useAccountStore} from '@/store/AccountStore'
import {pagecounter} from '@/utils/universal_functions'
@@ -141,7 +142,7 @@
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 {
@@ -149,7 +150,8 @@
NewsList,
CarouselList,
CarouselNumbers,
CalendarFull
CalendarFull,
NewsListHome
},
setup(){
+4 -1
View File
@@ -9,8 +9,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+6 -1
View File
@@ -5,7 +5,7 @@
lg="6"
>
<News-list
:pages="'news'"
/>
</v-col>
</v-row>
@@ -13,10 +13,15 @@
<script>
import NewsList from '@/components/news-list.vue'
import {pagecounter} from '@/utils/universal_functions'
export default {
components: {
NewsList
},
setup(){
pagecounter()
}
}
</script>
@@ -40,8 +40,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
const activates = [
{name: 'Комиссии', link: 'http://10.252.44.33/accounting6/SOTRYDNIKI.php#tab_committees'},
{name: 'Ответственность', link: 'http://10.252.44.33/accounting6/SOTRYDNIKI.php#tab_departments'},
+5 -1
View File
@@ -4,13 +4,17 @@
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
>
Безопасность
</v-col>
</v-row>
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+4 -1
View File
@@ -17,8 +17,11 @@
</template>
<script>
import {pagecounter} from '@/utils/universal_functions'
export default {
setup(){
pagecounter()
}
}
</script>
+37
View File
@@ -0,0 +1,37 @@
<template>
<v-row>
<v-col
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
>
<v-btn
@click="excelOp">
Excel
</v-btn>
</v-col>
</v-row>
</template>
<script>
import { ref } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
export default {
setup(){
const visiting = ref({})
const excelOp = () => {
getfromserver(`api/general_vacation/dailyroundup/`, visiting)
}
return {
visiting,
excelOp
}
}
}
</script>
<style>
</style>