Merge branch 'develop' into сja
This commit is contained in:
commit
33582a04e7
19 files changed
+175
-220
No files matched your search
@@ -129,6 +129,7 @@ class OrderResponsibility(models.Model):
|
|||||||
return f'{self.number} - {self.name}'
|
return f'{self.number} - {self.name}'
|
||||||
|
|
||||||
class OrderResponsibilityEmployee(models.Model):
|
class OrderResponsibilityEmployee(models.Model):
|
||||||
|
id = models.PositiveIntegerField(primary_key=True, db_comment='╥рсхы№э√щ эюьхЁ')
|
||||||
id_order_responsibility = models.OneToOneField(OrderResponsibility, models.DO_NOTHING, db_column='id_order_responsibility', db_comment='╚─ яЁшърчр ю эрчэрўхэшш юЄтхЄёЄтхээ√ї ёюЄЁєфэшъют',related_name="respons_users") # The composite primary key (id_order_responsibility, id_dict_employee) found, that is not supported. The first column is selected.
|
id_order_responsibility = models.OneToOneField(OrderResponsibility, models.DO_NOTHING, db_column='id_order_responsibility', db_comment='╚─ яЁшърчр ю эрчэрўхэшш юЄтхЄёЄтхээ√ї ёюЄЁєфэшъют',related_name="respons_users") # The composite primary key (id_order_responsibility, id_dict_employee) found, that is not supported. The first column is selected.
|
||||||
employee = models.ForeignKey('userauth.DictEmployee', models.DO_NOTHING, db_column='id_dict_employee', db_comment='╚─ ёюЄЁєфэшър, ъюЄюЁ√щ эрчэрўхэ юЄтхЄёЄтхээ√ь яю фрээюьє яЁшърчє', related_name="user_respons")
|
employee = models.ForeignKey('userauth.DictEmployee', models.DO_NOTHING, db_column='id_dict_employee', db_comment='╚─ ёюЄЁєфэшър, ъюЄюЁ√щ эрчэрўхэ юЄтхЄёЄтхээ√ь яю фрээюьє яЁшърчє', related_name="user_respons")
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ class Carousels(models.Model):
|
|||||||
text= models.TextField(max_length=260, blank=True, null=True, verbose_name='Сообщение')
|
text= models.TextField(max_length=260, blank=True, null=True, verbose_name='Сообщение')
|
||||||
cdate =models.DateTimeField(default=now, verbose_name='Дата создания')
|
cdate =models.DateTimeField(default=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.FileField(upload_to='newsimage/%Y/%m/%d', null=True, default="newsimage/default.jpg", verbose_name='Картинка')
|
||||||
published = models.BooleanField(default=True, verbose_name='Опубликован')
|
published = models.BooleanField(default=True, verbose_name='Опубликован')
|
||||||
enddate = models.DateTimeField(default=default_end_date, verbose_name='Дата снятия с публикации')
|
enddate = models.DateTimeField(default=default_end_date, verbose_name='Дата снятия с публикации')
|
||||||
sender = models.ForeignKey(BaseSender, on_delete=models.PROTECT, related_name='get_base_sender', verbose_name='Тематика')
|
sender = models.ForeignKey(BaseSender, on_delete=models.PROTECT, related_name='get_base_sender', verbose_name='Тематика')
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ INSTALLED_APPS = [
|
|||||||
'navigation.apps.NavigationConfig',
|
'navigation.apps.NavigationConfig',
|
||||||
'drf_yasg',
|
'drf_yasg',
|
||||||
'accounts',
|
'accounts',
|
||||||
'safety',
|
|
||||||
|
|
||||||
'vote.apps.VoteConfig',
|
|
||||||
'commeteresp',
|
'commeteresp',
|
||||||
|
'safety',
|
||||||
|
'vote.apps.VoteConfig',
|
||||||
|
|
||||||
# 'orgmanagment',
|
# 'orgmanagment',
|
||||||
'corsheaders',
|
'corsheaders',
|
||||||
'watcher.apps.WatcherConfig',
|
'watcher.apps.WatcherConfig',
|
||||||
|
|||||||
@@ -20,21 +20,4 @@ class SafetyAPIView(APIView):
|
|||||||
chapters = self.request.query_params.get('chapter', "fire")
|
chapters = self.request.query_params.get('chapter', "fire")
|
||||||
safety_group = SafetyType.objects.get(path=chapters)
|
safety_group = SafetyType.objects.get(path=chapters)
|
||||||
return Response(SafetySerializer(safety_group).data)
|
return Response(SafetySerializer(safety_group).data)
|
||||||
|
|
||||||
# class SafetyResponsebilityAPIView(APIView):
|
|
||||||
|
|
||||||
# def get(self, request):
|
|
||||||
|
|
||||||
# fireuser = OrderResponsibility.objects.get(id=54)
|
|
||||||
# responsobility_users = OrderResponsibilitySerializer(fireuser)
|
|
||||||
|
|
||||||
# return Response(responsobility_users.data)
|
|
||||||
|
|
||||||
# class CommitteeFilesAPIView(APIView):
|
|
||||||
|
|
||||||
# def get(self, request):
|
|
||||||
|
|
||||||
# committee_files = Committee1.objects.get(id=106)
|
|
||||||
# files = Committee1Serializer(committee_files)
|
|
||||||
|
|
||||||
# return Response(files.data)
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
+12
-10
@@ -1,17 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card
|
<v-card
|
||||||
class="rounded-0 h-100 flex-column d-flex"
|
class="rounded-0 h-100 flex-column d-flex"
|
||||||
min-height="410"
|
min-height="400"
|
||||||
max-height="410"
|
max-height="400"
|
||||||
|
|
||||||
>
|
>
|
||||||
<v-card-title class="pb-1">
|
<v-card-title class="">
|
||||||
{{news.title}}
|
{{news.title}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-row class="flex-grow-0">
|
<v-row class="flex-grow-0">
|
||||||
<v-col class="d-flex flex-column ">
|
<v-col class="d-flex flex-column ">
|
||||||
<v-img
|
<v-img
|
||||||
:src="`${burl}${news.link}`"
|
:src="`${burl}${news.link}`"
|
||||||
height="175px"
|
height="170px"
|
||||||
width="92%"
|
width="92%"
|
||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
cover
|
cover
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-divider/>
|
|
||||||
<v-row class="ma-0 flex-grow-0">
|
<v-row class="ma-0 flex-grow-0">
|
||||||
<v-col
|
<v-col
|
||||||
class="py-1 pl-4"
|
class="py-1 pl-4"
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-divider/>
|
<v-divider class="mx-4"/>
|
||||||
<v-row class="ma-0 overflow-auto">
|
<v-row class="ma-0 overflow-auto">
|
||||||
<v-col
|
<v-col
|
||||||
class="py-0"
|
class="py-0"
|
||||||
@@ -97,14 +98,15 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-divider/>
|
<v-divider class="mx-4"/>
|
||||||
<v-row class="flex-grow-0 ma-0">
|
<v-row class="flex-grow-0 ma-0">
|
||||||
<v-col class="d-flex justify-space-between">
|
<v-col class="d-flex justify-space-between">
|
||||||
<v-btn
|
<v-btn
|
||||||
color="more_details_btn"
|
color="more_details_btn"
|
||||||
variant="text"
|
|
||||||
:to='`/newsfull?id=${news.id}`'
|
:to='`/newsfull?id=${news.id}`'
|
||||||
size="small"
|
size="small"
|
||||||
|
rounded="xl"
|
||||||
append-icon="mdi-step-forward-2"
|
append-icon="mdi-step-forward-2"
|
||||||
>
|
>
|
||||||
Подробнее
|
Подробнее
|
||||||
@@ -130,7 +132,7 @@ const accountStore = useAccountStore()
|
|||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: { icoUser },
|
components: { icoUser },
|
||||||
|
name:'NewsCard',
|
||||||
props: {
|
props: {
|
||||||
news: {
|
news: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -65,8 +65,8 @@
|
|||||||
<v-divider/>
|
<v-divider/>
|
||||||
<v-card-actions class="align-self-end py-0">
|
<v-card-actions class="align-self-end py-0">
|
||||||
<v-btn
|
<v-btn
|
||||||
color="modal_btn"
|
rounded="xl"
|
||||||
variant="text"
|
color="more_details_btn"
|
||||||
@click= "$emit('update:opendialog', false)"
|
@click= "$emit('update:opendialog', false)"
|
||||||
>
|
>
|
||||||
Закрыть
|
Закрыть
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<v-spacer/>
|
<v-spacer/>
|
||||||
<v-btn
|
<v-btn
|
||||||
color="modal_btn"
|
color="modal_btn"
|
||||||
variant="text"
|
rounded="xl"
|
||||||
text="Закрыть"
|
text="Закрыть"
|
||||||
@click="menusCloses"
|
@click="menusCloses"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-carousel
|
<v-carousel
|
||||||
cycle
|
|
||||||
interval="10000"
|
interval="10000"
|
||||||
cover
|
cover
|
||||||
height="450"
|
height="450"
|
||||||
@@ -9,10 +9,10 @@
|
|||||||
:show-arrows="carous.length<2?false:'hover'"
|
:show-arrows="carous.length<2?false:'hover'"
|
||||||
color="white"
|
color="white"
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-carousel-item
|
<template v-for="(x, i) in carous" :key="i">
|
||||||
v-for="(x, i) in carous"
|
<v-carousel-item
|
||||||
:key="i"
|
v-if="!x.link.endsWith('mp4')"
|
||||||
:src="`${burl}${x.link}`"
|
:src="`${burl}${x.link}`"
|
||||||
cover
|
cover
|
||||||
eager
|
eager
|
||||||
@@ -67,6 +67,21 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-carousel-item>
|
</v-carousel-item>
|
||||||
|
<v-carousel-item v-else >
|
||||||
|
|
||||||
|
<div class="d-flex justify-center">
|
||||||
|
<video
|
||||||
|
style="height: 450px;"
|
||||||
|
controls
|
||||||
|
>
|
||||||
|
<source :src="`${burl}${x.link}`" type="video/mp4" />
|
||||||
|
Текущий браузер не поддерживает воспроизведение этого видео.
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</v-carousel-item>
|
||||||
|
</template>
|
||||||
</v-carousel>
|
</v-carousel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -77,7 +92,9 @@ import { axiosApiInstance } from "@/utils/axios-api";
|
|||||||
import { useAlertStore } from "@/store/useAlertStore";
|
import { useAlertStore } from "@/store/useAlertStore";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
const burl = baseURL.slice(0, -1);
|
const burl = baseURL.slice(0, -1);
|
||||||
|
|
||||||
const carous = ref([{ link: `/media/newsimage/scales.jpg`, "title": null, "text": "" }]);
|
const carous = ref([{ link: `/media/newsimage/scales.jpg`, "title": null, "text": "" }]);
|
||||||
@@ -92,6 +109,7 @@ export default {
|
|||||||
feedalert.ico = "mdi-alert-outline";
|
feedalert.ico = "mdi-alert-outline";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(result.data);
|
||||||
if (result.data.result.length > 0) {
|
if (result.data.result.length > 0) {
|
||||||
carous.value = result.data.result;
|
carous.value = result.data.result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,8 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
<v-divider class="" />
|
<v-divider class="" />
|
||||||
<v-card-actions class="pb-0" style="place-content: end">
|
<v-card-actions class="pb-0" style="place-content: end">
|
||||||
<v-btn color="more_details_btn" variant="text" @click="onSubmit">
|
<v-btn
|
||||||
|
color="more_details_btn" rounded="xl" @click="onSubmit">
|
||||||
Закрыть
|
Закрыть
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row>
|
<v-row class="py-2">
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
<v-row class=" flex-grow-1 pa-1 d-flex h-0 overflow-auto">
|
<v-row class="h-0 overflow-auto">
|
||||||
<v-col
|
<v-col
|
||||||
v-for="(x, key) in newsAll"
|
v-for="(x, key) in newsAll"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -11,27 +11,40 @@
|
|||||||
sm=12
|
sm=12
|
||||||
xs=12
|
xs=12
|
||||||
cols=12
|
cols=12
|
||||||
class="d-flex pa-1 flex-column "
|
class="d-flex pa-0 flex-column "
|
||||||
>
|
>
|
||||||
<news-card :news="x"/>
|
<NewsCard :news="x" class="ma-1"/>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
<v-row class="flex-grow-0 ">
|
<v-row class="flex-grow-0 ">
|
||||||
<v-col class="pa-0" >
|
<v-col class="pa-0" >
|
||||||
<v-pagination
|
<v-pagination
|
||||||
|
density="compact"
|
||||||
v-model="page"
|
v-model="page"
|
||||||
:length=visiblePage
|
:length="visiblePage"
|
||||||
:total-visible="7"
|
:total-visible="7"
|
||||||
@update:modelValue="loadNewsAll"
|
@update:modelValue="loadNewsAll"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:item="item">
|
||||||
|
|
||||||
|
<v-btn icon density="compact"
|
||||||
|
:color="item.isActive?'more_details_btn':'grey-ligten-3'"
|
||||||
|
@click="pager(item.page)"
|
||||||
|
>{{ item.page }}</v-btn>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
</v-pagination>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-grow-0 py-0">
|
<v-col class="flex-grow-0 py-0 " >
|
||||||
<v-select
|
<v-select
|
||||||
style="width:53px"
|
style="width:53px"
|
||||||
hide-details
|
hide-details
|
||||||
hide-selected
|
|
||||||
density="compact"
|
density="compact"
|
||||||
|
hide-selected
|
||||||
|
|
||||||
v-model="countpage"
|
v-model="countpage"
|
||||||
rounded
|
rounded
|
||||||
variant="underlined"
|
variant="underlined"
|
||||||
@@ -50,12 +63,12 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import newsCard from './UI/news-card.vue'
|
import NewsCard from './UI/NewsCard.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
newsCard
|
NewsCard
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
@@ -68,21 +81,27 @@ export default {
|
|||||||
const visiblePage = ref(0)
|
const visiblePage = ref(0)
|
||||||
|
|
||||||
const loadNewsAll = () => {
|
const loadNewsAll = () => {
|
||||||
axiosApiInstance.get( `api/navigation/newscrossroad/?name=${route.path}&page=${page.value-1}&countpage=${countpage.value}`).then(result => {
|
|
||||||
|
axiosApiInstance.get( `api/navigation/newscrossroad/?name=${route.path.slice(1)}&page=${page.value-1}&countpage=${countpage.value}`).then(result => {
|
||||||
|
|
||||||
newsAll.value= result.data.result
|
newsAll.value= result.data.result
|
||||||
countetnews.value = result.data.countpage/countpage.value
|
countetnews.value = result.data.countpage/countpage.value
|
||||||
visiblePage.value = countetnews.value <= 1 ? 1 : countetnews.value+1
|
visiblePage.value = countetnews.value <= 1 ? 1 : Math.ceil(countetnews.value)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
loadNewsAll()
|
loadNewsAll()
|
||||||
|
const pager=(val)=>{
|
||||||
|
page.value=Number(val)
|
||||||
|
loadNewsAll()
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
newsAll,
|
newsAll,
|
||||||
|
|
||||||
countetnews,
|
pager,
|
||||||
page,
|
page,
|
||||||
countpage,
|
countpage,
|
||||||
visiblePage,
|
visiblePage,
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row>
|
<v-row class="">
|
||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex pa-0">
|
||||||
<v-row class="mt-0 h-0 overflow-auto ">
|
<v-row class="mt-0 mx-3 h-0 overflow-auto ">
|
||||||
<v-col
|
<v-col
|
||||||
v-for="(x, key) in newsAll"
|
v-for="(x, key) in newsAll"
|
||||||
:key="key"
|
:key="key"
|
||||||
class="pb-1 pt-0"
|
class="py-1"
|
||||||
lg=12
|
lg=12
|
||||||
md=6
|
md=6
|
||||||
sm=6
|
sm=6
|
||||||
>
|
>
|
||||||
<news-card :news="x"/>
|
<NewsCard :news="x"/>
|
||||||
|
|
||||||
|
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="dialogfotoOne"
|
v-model="dialogfotoOne"
|
||||||
@@ -73,12 +73,12 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import newsCard from './UI/news-card.vue'
|
import NewsCard from './UI/NewsCard.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
newsCard
|
NewsCard
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ import Timer from "@/components/UI/Timer.vue"
|
|||||||
import {baseURL} from "@/utils/axios-api";
|
import {baseURL} from "@/utils/axios-api";
|
||||||
import {computed, ref} from 'vue'
|
import {computed, ref} from 'vue'
|
||||||
import {useAccountStore} from "@/store/AccountStore";
|
import {useAccountStore} from "@/store/AccountStore";
|
||||||
import defaultImage from '../../assets/emblem.png'
|
import defaultImage from '@/assets/emblem.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {Timer},
|
components: {Timer},
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-list nav density="compact" class="text-blue-grey-lighten-1">
|
||||||
|
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
v-for="x in aMenuItem"
|
||||||
|
:key="x"
|
||||||
|
:title="x.name"
|
||||||
|
:value="x.name"
|
||||||
|
:href="x.link"
|
||||||
|
:target="x.link ? '_blank' : ''"
|
||||||
|
slim
|
||||||
|
>
|
||||||
|
<template v-slot:prepend>
|
||||||
|
<v-icon :icon="x.ico" size="x_small" />
|
||||||
|
<v-tooltip v-if="rail" activator="parent" location="top">
|
||||||
|
</v-tooltip>
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
</v-list>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { baseURL } from "@/utils/axios-api";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name:'AdminMenu',
|
||||||
|
props: {
|
||||||
|
rail: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
const aMenuItem = [
|
||||||
|
{
|
||||||
|
name: "Панель администратора",
|
||||||
|
ico: "mdi-wrench",
|
||||||
|
link: baseURL + "admin",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
aMenuItem,
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<template v-if="accountStore.cod2user">
|
<template v-if="accountStore.cod2user">
|
||||||
<vcard-user :author="accountStore.user" />
|
<vcard-user :author="accountStore.user" />
|
||||||
|
|
||||||
<v-tooltip location="bottom">
|
<v-tooltip location="bottom">
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-btn color="black_and_white" v-bind="props" dark to="/faq" icon="mdi-comment-question-outline" />
|
<v-btn color="black_and_white" v-bind="props" dark to="/faq" icon="mdi-comment-question-outline" />
|
||||||
@@ -78,15 +77,15 @@
|
|||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row><v-col>
|
<v-row><v-col>
|
||||||
<v-list nav density="compact">
|
<v-list nav density="compact">
|
||||||
<template v-for="(x, key) in navigations">
|
<template v-for="(x, key) in navigations" :key="key">
|
||||||
<!-- v-if="!('submenu' in x) || (x.path== '/portal' && accountStore.user.is_staff)" -->
|
<!-- v-if="!('submenu' in x) || (x.path== '/portal' && accountStore.user.is_staff)" -->
|
||||||
<v-list-item v-if="(x.path == '/portal'
|
<v-list-item v-if="(x.path == '/portal'? accountStore.user.is_superuser : true) && !('submenu' in x)
|
||||||
? accountStore.user.is_superuser
|
|
||||||
: true) && !('submenu' in x)
|
|
||||||
" :key="x.key" :title="x.name" :value="x.name" :href="x.link" :disabled="x.path == ''" :to="x.path"
|
" :key="x.key" :title="x.name" :value="x.name" :href="x.link" :disabled="x.path == ''" :to="x.path"
|
||||||
:target="x.link ? '_blank' : ''" color="navigation">
|
:target="x.link ? '_blank' : ''"
|
||||||
|
color="navigation"
|
||||||
<!-- Чтобы сделать неактивным раздел безопасность, не забыть прописать путь до него в disabled для показа -->
|
|
||||||
|
>
|
||||||
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-icon :icon="x.ico" />
|
<v-icon :icon="x.ico" />
|
||||||
<v-tooltip v-if="rail" activator="parent" location="top">
|
<v-tooltip v-if="rail" activator="parent" location="top">
|
||||||
@@ -116,7 +115,7 @@
|
|||||||
</v-list>
|
</v-list>
|
||||||
|
|
||||||
<v-list nav density="compact">
|
<v-list nav density="compact">
|
||||||
<v-list-item v-for="x of mainmenuStore.portallinks" :key="x.name" :title="x.name" :value="x.name"
|
<v-list-item v-for="x of mainmenuStore.portallinks" :key="x.name" :title="x.name" :value="x.name"
|
||||||
:href="x.link" color="app_bar" :target="x.link ? '_blank' : ''">
|
:href="x.link" color="app_bar" :target="x.link ? '_blank' : ''">
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-icon :icon="x.imagecode" />
|
<v-icon :icon="x.imagecode" />
|
||||||
@@ -131,17 +130,8 @@
|
|||||||
|
|
||||||
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
||||||
<v-col>
|
<v-col>
|
||||||
<default-portal-menu-list :rail="rail" />
|
<AdminMenu :rail="rail" />
|
||||||
<!-- <v-list nav density="compact" active-class="noneoutline">
|
|
||||||
<default-portal-menu-list :aMenuItem="supperuser"/>
|
|
||||||
<div v-if="getDevelopment()">
|
|
||||||
|
|
||||||
<default-portal-menu-list :aMenuItem="oRasrab"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-list> -->
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row no-gutters class="flex-grow-0">
|
<v-row no-gutters class="flex-grow-0">
|
||||||
@@ -197,8 +187,8 @@ import { axiosApiInstance, clearAxios } from "@/utils/axios-api";
|
|||||||
import { baseURL } from "@/utils/axios-api";
|
import { baseURL } from "@/utils/axios-api";
|
||||||
import VcardUser from "@/components/UI/fiousercard/vcardUser.vue";
|
import VcardUser from "@/components/UI/fiousercard/vcardUser.vue";
|
||||||
import PageCounter from "@/components/UI/defaultportal/page-counter.vue";
|
import PageCounter from "@/components/UI/defaultportal/page-counter.vue";
|
||||||
import DefaultPortalMenuList from "@/layouts/default/DefaultPortalMenuList.vue";
|
import AdminMenu from "@/layouts/default/AdminMenu.vue";
|
||||||
import { getDevelopment } from "@/utils/universal_functions";
|
|
||||||
import { useDisplay } from "vuetify";
|
import { useDisplay } from "vuetify";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -208,7 +198,7 @@ export default {
|
|||||||
CardLike,
|
CardLike,
|
||||||
VcardUser,
|
VcardUser,
|
||||||
PageCounter,
|
PageCounter,
|
||||||
DefaultPortalMenuList,
|
AdminMenu,
|
||||||
},
|
},
|
||||||
|
|
||||||
mixins: [uf],
|
mixins: [uf],
|
||||||
@@ -258,30 +248,7 @@ export default {
|
|||||||
|
|
||||||
mainmenuStore.loadlinks();
|
mainmenuStore.loadlinks();
|
||||||
|
|
||||||
const gittlink = () => {
|
|
||||||
const link =
|
|
||||||
baseURL == "http://127.0.0.1:8000/"
|
|
||||||
? "http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2/projects"
|
|
||||||
: "http://maestro.cod2.regions.tax.nalog.ru:3333/COD2/PORTAL_COD2/projects/22";
|
|
||||||
return link;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 'https://materialdesignicons.com/cdn/1.6.50-dev/'
|
|
||||||
|
|
||||||
const oRasrab = [
|
|
||||||
{
|
|
||||||
name: "Gitt",
|
|
||||||
ico: "mdi-github",
|
|
||||||
link: gittlink(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Swagger",
|
|
||||||
ico: "mdi-puzzle",
|
|
||||||
link: "http://127.0.0.1:8000/swagger/",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// ]
|
|
||||||
|
|
||||||
const navigations = ref([
|
const navigations = ref([
|
||||||
{
|
{
|
||||||
@@ -354,11 +321,7 @@ export default {
|
|||||||
path: "/portal",
|
path: "/portal",
|
||||||
},
|
},
|
||||||
|
|
||||||
// {
|
|
||||||
// name: 'К празднику',
|
|
||||||
// ico: 'mdi-cake-variant',
|
|
||||||
// path: "/fnshol"
|
|
||||||
// }
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const imageSrc = computed(() => {
|
const imageSrc = computed(() => {
|
||||||
@@ -390,7 +353,7 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
getSafetyChapter();
|
// getSafetyChapter();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
theme,
|
theme,
|
||||||
@@ -402,18 +365,16 @@ export default {
|
|||||||
navigations,
|
navigations,
|
||||||
imageSrc,
|
imageSrc,
|
||||||
LikeDialog,
|
LikeDialog,
|
||||||
scrimg,
|
scrimg,
|
||||||
oRasrab,
|
|
||||||
rail,
|
rail,
|
||||||
showTooltip,
|
showTooltip,
|
||||||
menuTruncated,
|
menuTruncated,
|
||||||
// feedalert,
|
|
||||||
alert,
|
alert,
|
||||||
burl,
|
burl,
|
||||||
name,
|
name,
|
||||||
closeinfo,
|
closeinfo,
|
||||||
baseURL,
|
baseURL,
|
||||||
getDevelopment,
|
|
||||||
message,
|
message,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<v-list nav density="compact" class="text-blue-grey-lighten-1">
|
|
||||||
<div v-for="(list, key) in aMenuItem" :key="key">
|
|
||||||
<div v-if="showProm(key)">
|
|
||||||
<v-list-item
|
|
||||||
v-for="x in list"
|
|
||||||
:key="x"
|
|
||||||
:title="x.name"
|
|
||||||
:value="x.name"
|
|
||||||
:href="x.link"
|
|
||||||
:target="x.link ? '_blank' : ''"
|
|
||||||
slim
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<v-icon :icon="x.ico" size="x_small" />
|
|
||||||
<v-tooltip v-if="rail" activator="parent" location="top">
|
|
||||||
</v-tooltip>
|
|
||||||
</template>
|
|
||||||
</v-list-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</v-list>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { baseURL } from "@/utils/axios-api";
|
|
||||||
import { getDevelopment } from "@/utils/universal_functions";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
rail: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
setup() {
|
|
||||||
const gittlink = () => {
|
|
||||||
const link =
|
|
||||||
baseURL == "http://127.0.0.1:8000/"
|
|
||||||
? "http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2/projects"
|
|
||||||
: "http://maestro.cod2.regions.tax.nalog.ru:3333/COD2/PORTAL_COD2/projects/22";
|
|
||||||
return link;
|
|
||||||
};
|
|
||||||
const aMenuItem = {
|
|
||||||
prom: [
|
|
||||||
{
|
|
||||||
name: "Панель администратора",
|
|
||||||
ico: "mdi-wrench",
|
|
||||||
link: baseURL + "admin",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
my: [
|
|
||||||
{
|
|
||||||
name: "Gitt",
|
|
||||||
ico: "mdi-github",
|
|
||||||
link: gittlink(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Swagger",
|
|
||||||
ico: "mdi-puzzle",
|
|
||||||
link: "http://127.0.0.1:8000/swagger/",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
const showProm = (data) => {
|
|
||||||
let show = true;
|
|
||||||
|
|
||||||
if (data == "my" && getDevelopment() == false) {
|
|
||||||
show = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return show;
|
|
||||||
};
|
|
||||||
|
|
||||||
return {
|
|
||||||
aMenuItem,
|
|
||||||
getDevelopment,
|
|
||||||
showProm,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style></style>
|
|
||||||
@@ -6,8 +6,7 @@ import { axiosApiInstance, clearAxios } from "@/utils/axios-api";
|
|||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
import defaultImage from '@/assets/FNS-logo-xs.png'
|
||||||
|
|
||||||
export function get_name(namestr) {
|
export function get_name(namestr) {
|
||||||
let arr = namestr.split("/");
|
let arr = namestr.split("/");
|
||||||
return arr[arr.length - 1];
|
return arr[arr.length - 1];
|
||||||
@@ -57,7 +56,7 @@ export function getfromserverfree(path, reactive) {
|
|||||||
|
|
||||||
export function checkremote(filecheck) {
|
export function checkremote(filecheck) {
|
||||||
return process.env.NODE_ENV == "development"
|
return process.env.NODE_ENV == "development"
|
||||||
? "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
? defaultImage
|
||||||
: filecheck;
|
: filecheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,9 +91,6 @@ export function pagecounter() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function getDevelopment() {
|
|
||||||
return process.env.NODE_ENV == "development" ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function useICalReader(url) {
|
export function useICalReader(url) {
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row style="height:250px">
|
<v-row style="height:250px">
|
||||||
<v-col class="d-flex flex-column pa-1">
|
<v-col class="d-flex flex-column flex-grow-0 pa-1">
|
||||||
<!-- <event-calendar/> -->
|
<!-- <event-calendar/> -->
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -65,6 +66,8 @@
|
|||||||
<v-slide-group
|
<v-slide-group
|
||||||
show-arrows
|
show-arrows
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<v-slide-group-item
|
<v-slide-group-item
|
||||||
v-for="x in favorit"
|
v-for="x in favorit"
|
||||||
:key="x"
|
:key="x"
|
||||||
@@ -95,6 +98,7 @@
|
|||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -109,7 +113,7 @@
|
|||||||
|
|
||||||
import CarouselList from '@/components/carousel-list.vue'
|
import CarouselList from '@/components/carousel-list.vue'
|
||||||
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
||||||
|
|
||||||
|
|
||||||
import NewsHome from '@/components/news-home.vue'
|
import NewsHome from '@/components/news-home.vue'
|
||||||
import LoadRound from '@/components/load-round.vue'
|
import LoadRound from '@/components/load-round.vue'
|
||||||
@@ -121,7 +125,7 @@
|
|||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
CarouselList,
|
CarouselList,
|
||||||
CarouselNumbers,
|
CarouselNumbers,
|
||||||
|
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ import NoneVote from "@/components/vote/NoneVote.vue"
|
|||||||
import {useRoute, useRouter} from "vue-router";
|
import {useRoute, useRouter} from "vue-router";
|
||||||
import VoteResult from "@/components/vote/VoteResult.vue";
|
import VoteResult from "@/components/vote/VoteResult.vue";
|
||||||
import {deleteVote, getVoteDetail, getVoteResult, getVotes} from "@/utils/axios-api";
|
import {deleteVote, getVoteDetail, getVoteResult, getVotes} from "@/utils/axios-api";
|
||||||
import {formatDate} from "@vueuse/shared";
|
// import {formatDate} from "@vueuse/shared";
|
||||||
import { useAccountStore } from "@/store/AccountStore";
|
import { useAccountStore } from "@/store/AccountStore";
|
||||||
import {pagecounter} from '@/utils/universal_functions'
|
import {pagecounter} from '@/utils/universal_functions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {formatDate},
|
|
||||||
|
|
||||||
components: {CurrentVote, VoteConstructor, VoteCardVue, VoteResult, NoneVote},
|
components: {CurrentVote, VoteConstructor, VoteCardVue, VoteResult, NoneVote},
|
||||||
setup() {
|
setup() {
|
||||||
|
|||||||
Reference in new issue
Block a user