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
+134 -188

No files matched your search

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