Merge branch 'feature/create_app' into razrab

This commit is contained in:
iriska-gri committed 2023-10-20 12:55:41 +03:00
commit fc67ef1891
12 files changed
+133 -187

No files matched your search

+2 -2
View File
@@ -49,14 +49,14 @@
<v-card-actions> <v-card-actions>
<v-spacer/> <v-spacer/>
<v-btn <v-btn
color="modalBtn" color="modal_btn"
variant="text" variant="text"
@click="menuAuthDialog = false" @click="menuAuthDialog = false"
> >
Отмена Отмена
</v-btn> </v-btn>
<v-btn <v-btn
color="modalBtn" color="modal_btn"
variant="text" variant="text"
@click="logging" @click="logging"
> >
+3 -3
View File
@@ -31,7 +31,7 @@
hover hover
half-increments half-increments
color="yellow-darken-3" color="stars"
/> />
</v-col> </v-col>
<v-divider/> <v-divider/>
@@ -56,13 +56,13 @@
</small> </small>
<v-spacer/> <v-spacer/>
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
text="Закрыть" text="Закрыть"
@click="menusCloses" @click="menusCloses"
/> />
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
:text="feedbackdata.nowcomment.id==null?'Отправить':'Обновить'" :text="feedbackdata.nowcomment.id==null?'Отправить':'Обновить'"
@click="feedSend" @click="feedSend"
+1 -1
View File
@@ -64,7 +64,7 @@
<v-card-actions class="align-self-end pt-0"> <v-card-actions class="align-self-end pt-0">
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
@click="menusCloses" @click="menusCloses"
> >
+9 -18
View File
@@ -1,15 +1,12 @@
<template> <template>
<div> <div>
<v-card <v-card
:ref="i" :ref="i"
class="mx-auto px-3 pt-3" class="mx-auto px-3 pt-3"
:class="i>0?'mt-1':''" :class="i>0?'mt-1':''"
v-for="(x, i) in newss.result" :key= i v-for="(x, i) in newss.result" :key= i
> >
<v-card-title class="py-1"> <v-card-title class="py-1">
{{x.title}} {{x.title}}
</v-card-title> </v-card-title>
@@ -40,28 +37,22 @@
</template> </template>
</v-list-item> </v-list-item>
<v-divider/> <v-divider/>
<v-card-text class="pb-0"> <v-card-text class="pb-0">
{{limitText(x.text)}} {{limitText(x.text)}}
</v-card-text> </v-card-text>
<div class="pt-1 pl-1 pb-2"> <div class="pt-1 pl-1 pb-2">
<v-btn <v-btn
color="light-blue-darken-4" color="more_details_btn"
variant="text" variant="text"
:to='`/news?id=${x.id}`' :to='`/news?id=${x.id}`'
size="small" size="small"
append-icon="mdi-step-forward-2"
append-icon="mdi-step-forward-2" >
Подробнее
> </v-btn>
Подробнее
</v-btn>
</div> </div>
</v-card> </v-card>
</div> </div>
</template> </template>
+48 -46
View File
@@ -3,23 +3,21 @@
<div class="d-flex flex-column py-3"> <div class="d-flex flex-column py-3">
<v-row> <v-row>
<v-col class="bg-red overflow-auto pa-0"> <v-col class="bg-red overflow-auto pa-0">
<v-card <v-card
class=" rounded-0" class=" rounded-0"
v-for="(x, i) in newss.result" :key=i>
v-for="(x, i) in newss.result" :key=i
>
<v-list-item class="w-100 pl-4 py-2 pt-3"> <v-list-item class="w-100 pl-4 py-2 pt-3">
<template v-slot:prepend> <template v-slot:prepend>
<v-avatar <v-avatar
color="loading_avatar"
:image=accountStore.user.photo>
</v-avatar>
</template>
color="grey-darken-3" <v-list-item-title>{{x.author.fio}}</v-list-item-title>
:image=accountStore.user.photo></v-avatar> <v-list-item-subtitle>Участник {{route.path}} {{route.query}}</v-list-item-subtitle>
</template>
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
<v-list-item-subtitle>Участник {{route.path}} {{route.query}}</v-list-item-subtitle>
</v-list-item> </v-list-item>
<v-card-title class="pt-0 pb-1"> <v-card-title class="pt-0 pb-1">
@@ -91,24 +89,18 @@
</v-row> </v-row>
<div class="text-subtitle-2"> <div class="text-subtitle-2">
</div> </div>
<v-row> <v-row>
<v-col class="pr-0"> <v-col class="pr-0">
<v-alert <v-alert
color="bg_comments"
rounded=0
color="white" :border="accountStore.user.login==y.author.login?'end':'start'"
rounded=0 :border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
:border="accountStore.user.login==y.author.login?'end':'start'" elevation=0>
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'" {{ y.text }}
elevation=0 </v-alert>
>
{{ y.text }}
</v-alert>
</v-col> </v-col>
<v-col class="flex-grow-0 d-flex pa-0 align-center" <v-col class="flex-grow-0 d-flex pa-0 align-center"
:class="accountStore.user.login==y.author.login?'pa-0':'pa-5'" :class="accountStore.user.login==y.author.login?'pa-0':'pa-5'"
@@ -118,21 +110,15 @@
variant="text" variant="text"
size="small" size="small"
icon='mdi-delete' icon='mdi-delete'
color="blue-grey-darken-1" color="delete_btn"
@click="deletComment(y.id, x.id)" @click="deletComment(y.id, x.id)"
/> />
</v-col> </v-col>
</v-row> </v-row>
</div>
</div>
</div> </div>
</v-expand-transition> </v-expand-transition>
</div>
</div>
@@ -160,14 +146,14 @@
<v-card-actions> <v-card-actions>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
@click="dialogCommentShow = false" @click="dialogCommentShow = false"
> >
Отмена Отмена
</v-btn> </v-btn>
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
@click="addComment" @click="addComment"
> >
@@ -179,8 +165,8 @@
</v-row> </v-row>
</v-col> </v-col>
</v-row> </v-row>
<v-row class="flex-grow-0" v-show="route.path=='/news' && !('id' in route.query)"> <!-- <v-row class="d-flex flex-grow-0 mt-6" v-show="route.path=='/news' && !('id' in route.query)">
<v-col class="py-0 text-center "> <v-col class="py-0">
<v-pagination <v-pagination
class="flex-grow-1" class="flex-grow-1"
v-model="page" v-model="page"
@@ -190,17 +176,36 @@
@click="pagelistNews" @click="pagelistNews"
/> />
</v-col> </v-col>
<v-col class="flex-grow-0 pr-0 py-0" lg=1> <v-col class="pr-0 py-0">
<v-select <v-select
class=" pt-2" class="flex-grow-2"
density="compact" density="compact"
v-model="selecnews" v-model="selecnews"
variant="outlined" variant="outlined"
:items="['1', '2', '3', '4', '5', '6']" :items="['1', '2', '3', '4', '5', '6']"
/> />
</v-col> </v-col>
</v-row> </v-row> -->
<v-container>
<v-row class="d-flex mt-6" v-show="route.path=='/news' && !('id' in route.query)">
<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>
</v-row>
</v-container>
</div> </div>
@@ -550,9 +555,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
.pagination {
display: flex;
}
.newsVH { .newsVH {
height: 92vh; height: 92vh;
} }
+25 -64
View File
@@ -46,22 +46,14 @@
<div class="pt-1 pl-1 pb-2"> <div class="pt-1 pl-1 pb-2">
<v-btn <v-btn
color="light-blue-darken-4" color="light-blue-darken-4"
variant="text" variant="text"
:to='`/news?id=${x.id}`' :to='`/news?id=${x.id}`'
size="small" size="small"
append-icon="mdi-step-forward-2">
append-icon="mdi-step-forward-2" Подробнее
</v-btn>
>
Подробнее
</v-btn>
</div> </div>
</v-card> </v-card>
@@ -79,15 +71,12 @@
> >
<v-list-item class="w-100 pl-4 py-2 pt-3"> <v-list-item class="w-100 pl-4 py-2 pt-3">
<template v-slot:prepend> <template v-slot:prepend>
<v-avatar <v-avatar
color="loading_avatar"
color="grey-darken-3" :image=accountStore.user.photo></v-avatar>
:image=accountStore.user.photo></v-avatar>
</template> </template>
<v-list-item-title>{{x.author.fio}}</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-subtitle>Участник</v-list-item-subtitle>
</v-list-item> </v-list-item>
<v-card-title class="pt-0 pb-1"> <v-card-title class="pt-0 pb-1">
@@ -116,9 +105,6 @@
</div> </div>
</template> </template>
</v-list-item> </v-list-item>
<div > <div >
<v-divider/> <v-divider/>
@@ -135,48 +121,33 @@
:key="key" :key="key"
class="d-flex flex-column pa-3" class="d-flex flex-column pa-3"
> >
<v-row <v-row
class="justify-space-between ma-0 align-center bgchat mr-7" class="justify-space-between ma-0 align-center bgchat mr-7"
:class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'" :class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'"
> >
<v-col class="flex-grow-1 text-subtitle-2 pl-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) }} {{ accountStore.user.login==y.author.login?'':splitname(y.author) }}
</v-col> </v-col>
<v-col class="pa-0 text-center text-subtitle-2 "> <v-col class="pa-0 text-center text-subtitle-2 ">
{{dateformat(y.cdate)}} {{dateformat(y.cdate)}}
</v-col> </v-col>
<v-col class="pa-0 pr-2 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) }} {{ accountStore.user.login!=y.author.login?'':splitname(y.author) }}
</v-col> </v-col>
</v-row> </v-row>
<div class="text-subtitle-2"> <div class="text-subtitle-2">
</div> </div>
<v-row> <v-row>
<v-col class="pr-0"> <v-col class="pr-0">
<v-alert <v-alert
color="white"
rounded=0
color="white" :border="accountStore.user.login==y.author.login?'end':'start'"
rounded=0 :border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
:border="accountStore.user.login==y.author.login?'end':'start'" elevation=0>
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'" {{ y.text }}
elevation=0 </v-alert>
>
{{ y.text }}
</v-alert>
</v-col> </v-col>
<v-col class="flex-grow-0 d-flex pa-0 align-center" <v-col class="flex-grow-0 d-flex pa-0 align-center"
:class="accountStore.user.login==y.author.login?'pa-0':'pa-5'" :class="accountStore.user.login==y.author.login?'pa-0':'pa-5'"
@@ -186,34 +157,24 @@
variant="text" variant="text"
size="small" size="small"
icon='mdi-delete' icon='mdi-delete'
color="blue-grey-darken-1" color="delete_btn"
@click="deletComment(y.id, x.id)" @click="deletComment(y.id, x.id)"
/> />
</v-col> </v-col>
</v-row> </v-row>
</div>
</div>
</div> </div>
</v-expand-transition> </v-expand-transition>
</div>
</div>
</v-card> </v-card>
</div> </div>
<v-row justify="center"> <v-row justify="center">
<v-dialog <v-dialog
v-model="dialogCommentShow" v-model="dialogCommentShow"
persistent persistent
width="550" width="550">
>
<v-card> <v-card>
<v-card-title class="text-h5"> <v-card-title class="text-h5">
Прокоментировать новость Прокоментировать новость
@@ -230,14 +191,14 @@
<v-card-actions> <v-card-actions>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
@click="dialogCommentShow = false" @click="dialogCommentShow = false"
> >
Отмена Отмена
</v-btn> </v-btn>
<v-btn <v-btn
color="blue-darken-1" color="modal_btn"
variant="text" variant="text"
@click="addComment" @click="addComment"
> >
+15 -27
View File
@@ -1,35 +1,23 @@
<template> <template>
<div> <div>
<v-list-item v-for="x in onlineuser" v-show=" x!=accountStore.user.login" <v-list-item v-for="x in onlineuser" v-show=" x!=accountStore.user.login"
:key="x" :key="x"
:prepend-avatar="checkremote( `${spravURL}${x}.jpg`)" :prepend-avatar="checkremote( `${spravURL}${x}.jpg`)"
title="x" title="x"
nav nav
@click="whatuser(x)">
@click="whatuser(x)" <v-dialog
v-model="menuGetUserDialog"
> persistent
width="600">
<v-dialog {{spravURL}}
v-model="menuGetUserDialog"
persistent
width="600"
>
{{spravURL}}
<Card-users <Card-users
:menuGetUserDialog="menuGetUserDialog" :menuGetUserDialog="menuGetUserDialog"
:loging="loging" :loging="loging"
@menusClose="menuGetUserDialog=false" @menusClose="menuGetUserDialog=false"/>
/> </v-dialog>
</v-list-item>
</div>
</v-dialog>
</v-list-item>
</div>
</template> </template>
<script> <script>
+8 -17
View File
@@ -4,7 +4,7 @@
<v-app-bar <v-app-bar
:elevation="2" :elevation="2"
density="compact" density="compact"
color="teal-darken-4" color="app_bar"
class="pl-4"> class="pl-4">
<v-icon <v-icon
@@ -16,7 +16,7 @@
class="bg-transparent py" class="bg-transparent py"
density="compact" density="compact"
:prepend-avatar="imageSrc" :prepend-avatar="imageSrc"
title="Портал МИ ФНС по ЦОД № 2" title="Портал МиФНС по ЦОД № 2"
variant="text" variant="text"
:to="'/'" /> :to="'/'" />
@@ -95,7 +95,7 @@
</template> </template>
</template> </template>
</v-app-bar> </v-app-bar>
<v-navigation-drawer :width="245" :rail="rail" permanent v-model="drawer"> <v-navigation-drawer v-if="accountStore.cod2user" :width="245" :rail="rail" permanent v-model="drawer">
<v-row class="my-0 h-100"> <v-row class="my-0 h-100">
<v-col class="flex-column d-flex"> <v-col class="flex-column d-flex">
<v-row><v-col> <v-row><v-col>
@@ -152,7 +152,7 @@
location="top" location="top"
> >
{{ child.name }} {{ child.name }}
</v-tooltip> </v-tooltip>
</v-list-item> </v-list-item>
</v-list-group> </v-list-group>
</template> </template>
@@ -163,7 +163,7 @@
:key="x.name" :key="x.name"
:title="x.name" :title="x.name"
:value="x.name" :value="x.name"
:href="x.link" color="teal-darken-4"> :href="x.link" color="app_bar">
<template v-slot:prepend> <template v-slot:prepend>
<v-icon <v-icon
:icon="x.imagecode" /> :icon="x.imagecode" />
@@ -197,7 +197,7 @@
v-model="showTooltip" v-model="showTooltip"
location="top"> location="top">
<template v-slot:activator="{ props }"> <template v-slot:activator="{ props }">
<v-icon v-bind="props" color="#7A7A7A"> <v-icon v-bind="props" color="eye_icon">
mdi-account-eye mdi-account-eye
</v-icon> </v-icon>
</template> </template>
@@ -281,12 +281,8 @@
></v-list-item> ></v-list-item>
</v-list> </v-list>
</template> --> </template> -->
</v-navigation-drawer> </v-navigation-drawer>
</v-app> </v-app>
</template> </template>
@@ -338,12 +334,7 @@ export default {
{ {
name: 'Структура', name: 'Структура',
ico: 'mdi-source-branch', ico: 'mdi-source-branch',
submenu: [ path: "/structure"
{
name: 'ОКиБ',
path: "/okib"
},
]
}, },
{ {
name: 'Сотрудники', name: 'Сотрудники',
@@ -396,7 +387,7 @@ export default {
} }
onMounted(() => { onMounted(() => {
drawer.value = accountStore.cod2user ? true : false return drawer.value = accountStore.cod2user ? true : false
}) })
return { return {
+17 -3
View File
@@ -19,9 +19,16 @@ export default createVuetify({
scrollbar: '#367F8A', scrollbar: '#367F8A',
cards: '#F5F5F5', cards: '#F5F5F5',
text_carous: '#242424', text_carous: '#242424',
navigation: '#004D40', navigation: '#004D40', // Цвет текста и иконок в левом навигационном меню
numeral: '#3C3C3C', // Цвет для карусели с цифрами в работе numeral: '#3C3C3C', // Цвет для карусели с цифрами в работе
modalBtn: '#1E88E5' // Цвеь для кнопок в модальных окнах modal_btn: '#1E88E5', // Цвет для кнопок в модальных окнах
eye_icon: '#7A7A7A', // Цвет иконки для отображения количества посещений
stars: '#F9A825', // Цвет для звездочек в обратной связи
more_details_btn: '#01579B', // Цвет для кнопки перехода "подробнее"
loading_avatar: '#37474F', // Цвет поля прогрузки аватара пользователя
bg_comments: '#FFFFFF', // Цвет заднего фона для комментариев
delete_btn: '#546E7A', // Цвет для кнопки удаления
app_bar: '#004D40', // Цвет для навигационной (аппбар) панели
}, },
}, },
dark: { dark: {
@@ -35,7 +42,14 @@ export default createVuetify({
text_carous: '#242424', text_carous: '#242424',
navigation: '#FDF5E6', navigation: '#FDF5E6',
numeral: '#3C3C3C', numeral: '#3C3C3C',
modalBtn: '#1E88E5' modal_btn: '#1E88E5',
eye_icon: '#7A7A7A',
stars: '#F9A825',
more_details_btn: '#01579B',
loading_avatar: '#37474F',
bg_comments: '#FFFFFF',
delete_btn: '#546E7A',
app_bar: '#212121',
}, },
}, },
options: { options: {
-1
View File
@@ -7,7 +7,6 @@
<v-col <v-col
class="ma-3" class="ma-3"
> >
<v-table density="compact" class="mt-3"> <v-table density="compact" class="mt-3">
<thead> <thead>
<tr> <tr>
+3 -3
View File
@@ -63,11 +63,11 @@
> >
<v-card class="h-100 text-center g text-numeral"> <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"> <v-card-title class="statstyle py-0 text-overline font-weight-bold bg-main_theme">
{{x.status}} {{x.status}}
</v-card-title> </v-card-title>
<v-card-text class="numstyle mt-2 py-0 font-weight-bold"> <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'/> <vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.num)' :duration='2'/>
</v-card-text> </v-card-text>
</v-card> </v-card>
+2 -2
View File
@@ -72,8 +72,8 @@ class CommentNews(models.Model):
return str(self.author) return str(self.author)
class Carousels(models.Model): class Carousels(models.Model):
title=models.CharField( max_length=255, verbose_name='Заголовок') title=models.CharField(max_length=255, verbose_name='Заголовок')
text= models.TextField(null=True, verbose_name='Сообщение') text= models.TextField(max_length=260, null=True, verbose_name='Сообщение')
cdate =models.DateTimeField(default=datetime.now, verbose_name='Дата создания') cdate =models.DateTimeField(default=datetime.now, verbose_name='Дата создания')
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор новости') author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор новости')
link = models.ImageField(upload_to='newsimage/%Y/%m/%d', null=True, default="newsimage/default.jpg", verbose_name='Картинка') link = models.ImageField(upload_to='newsimage/%Y/%m/%d', null=True, default="newsimage/default.jpg", verbose_name='Картинка')