P-13
This commit is contained in:
1 parent
7443c956c7
commit
73b5a8c1fe
6 files changed
+390
-225
No files matched your search
@@ -44,7 +44,7 @@ class CalendarEvents(models.Model):
|
|||||||
|
|
||||||
class FilesEvent(models.Model):
|
class FilesEvent(models.Model):
|
||||||
""" Прикрепленные файлы к событию"""
|
""" Прикрепленные файлы к событию"""
|
||||||
name = models.CharField(max_length=300, verbose_name='Название файла')
|
name = models.CharField(max_length=300, null=True, blank=True, verbose_name='Название файла')
|
||||||
link = models.FileField(upload_to='calendar/%Y/%m/%d')
|
link = models.FileField(upload_to='calendar/%Y/%m/%d')
|
||||||
event = models.ForeignKey(CalendarEvents, on_delete=models.PROTECT, null=True, blank= True, related_name='get_calendar_events_files', verbose_name='Событие к которому привязаны файлы')
|
event = models.ForeignKey(CalendarEvents, on_delete=models.PROTECT, null=True, blank= True, related_name='get_calendar_events_files', verbose_name='Событие к которому привязаны файлы')
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<v-row no-gutters class="h-100 gap">
|
||||||
|
<v-col lg="4" class="flex-column d-flex">
|
||||||
|
<v-card class="h-100">
|
||||||
|
<v-card-title
|
||||||
|
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
|
||||||
|
>
|
||||||
|
<!-- :to='`/newsfull?id=${news.id}`' -->
|
||||||
|
<v-row>
|
||||||
|
<v-col class="d-flex justify-center">Вакансии</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text class="h-100 pa-0 d-flex flex-column">
|
||||||
|
<v-row no-gutters class="h-0 gap overflow-auto">
|
||||||
|
<v-col class="bg-red">
|
||||||
|
|
||||||
|
<v-card
|
||||||
|
class="mx-auto h-100"
|
||||||
|
|
||||||
|
>
|
||||||
|
<v-list density="compact">
|
||||||
|
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
v-for="vac in vacancy"
|
||||||
|
:key="vac.id"
|
||||||
|
:value="vac"
|
||||||
|
color="btn_text"
|
||||||
|
>
|
||||||
|
|
||||||
|
|
||||||
|
<v-card class="my-3">
|
||||||
|
<v-card-title class="text-wrap"> {{vac.name}} </v-card-title>
|
||||||
|
<v-card-text class="pb-0"> {{vac.department.name}} </v-card-text>
|
||||||
|
|
||||||
|
<v-card-actions class="justify-end pt-0">
|
||||||
|
<v-btn
|
||||||
|
color="btn_text"
|
||||||
|
variant="text"
|
||||||
|
class="text-none"
|
||||||
|
append-icon="mdi-arrow-right"
|
||||||
|
>
|
||||||
|
Подробнее
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
<!-- <v-card class="my-3" v-for="vac in vacancy" :key="vac.id">
|
||||||
|
<v-card-title class="text-wrap"> {{vac.name}} </v-card-title>
|
||||||
|
<v-card-text class="pb-0"> {{vac.department.name}} </v-card-text>
|
||||||
|
|
||||||
|
<v-card-actions class="justify-end pt-0">
|
||||||
|
<v-btn
|
||||||
|
color="btn_text"
|
||||||
|
variant="text"
|
||||||
|
class="text-none"
|
||||||
|
append-icon="mdi-arrow-right"
|
||||||
|
>
|
||||||
|
Подробнее
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card> -->
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<!-- -->
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-card class="h-100">
|
||||||
|
<v-card-title
|
||||||
|
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
|
||||||
|
>
|
||||||
|
<v-row>
|
||||||
|
<v-col class="d-flex justify-center">Описание</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text class="h-100 pa-0 d-flex flex-column">
|
||||||
|
<v-row no-gutters class="h-0 overflow-auto">
|
||||||
|
<v-col class="bg-red" v-if="vacancy.length>0">
|
||||||
|
<v-card class="rounded-0">
|
||||||
|
|
||||||
|
<v-card-title>
|
||||||
|
{{vacancy[0].name}}
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-subtitle>
|
||||||
|
{{vacancy[0].department.name}}
|
||||||
|
</v-card-subtitle>
|
||||||
|
<v-card-text>
|
||||||
|
|
||||||
|
</v-card-text>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
<v-card class="rounded-0" >
|
||||||
|
|
||||||
|
<v-card-title>
|
||||||
|
<span class="text-subtitle-1">
|
||||||
|
Направление деятельности подразделения
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-subtitle>
|
||||||
|
{{vacancy[0].department.name}}
|
||||||
|
|
||||||
|
</v-card-subtitle>
|
||||||
|
<v-card-text>
|
||||||
|
<div v-for="x in vacancy[0].department.department_directions">
|
||||||
|
|
||||||
|
{{x.direction_title}}
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-text></v-card-text>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<!-- -->
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { clearAxios } from "@/utils/axios-api";
|
||||||
|
import { baseURL } from "@/utils/axios-api";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
let vacancy = ref({});
|
||||||
|
|
||||||
|
const getVacancies = () => {
|
||||||
|
clearAxios.get(`api/about_inspection/getvacancy/`).then((data) => {
|
||||||
|
vacancy.value = data.data;
|
||||||
|
// console.log(, 'data')
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const formatText = (text) => {
|
||||||
|
return text.replaceAll(
|
||||||
|
'src="/media/uploads',
|
||||||
|
`src="${baseURL}media/uploads`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
getVacancies();
|
||||||
|
|
||||||
|
return {
|
||||||
|
vacancy,
|
||||||
|
formatText
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style></style>
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<v-card>
|
||||||
|
{{}}
|
||||||
|
</v-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -7,16 +7,15 @@
|
|||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row class="flex-grow-0">
|
<v-row class="flex-grow-0">
|
||||||
<v-col class="pb-0 pr-0">
|
<v-col class="pb-0 pr-0">
|
||||||
<v-card
|
<v-card height="350px" class="rounded-b-0">
|
||||||
height="350px"
|
|
||||||
class="rounded-b-0"
|
|
||||||
>
|
|
||||||
<v-card-title class="pt-0 pb-1 flex-column d-flex">
|
<v-card-title class="pt-0 pb-1 flex-column d-flex">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col lg=9 class="pt-4">
|
<v-col lg="9" class="pt-4">
|
||||||
{{ newsFull.title }}
|
{{ newsFull.title }}
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="pa-0 pr-3 pt-1 flex-grow-1 d-flex flex-column flex-wrap">
|
<v-col
|
||||||
|
class="pa-0 pr-3 pt-1 flex-grow-1 d-flex flex-column flex-wrap"
|
||||||
|
>
|
||||||
<v-switch
|
<v-switch
|
||||||
v-model="gallery"
|
v-model="gallery"
|
||||||
class="align-self-end comgal"
|
class="align-self-end comgal"
|
||||||
@@ -27,16 +26,14 @@
|
|||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-icon
|
<v-icon
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
icon='mdi-message-text-outline'
|
icon="mdi-message-text-outline"
|
||||||
color="pink-darken-4"
|
color="pink-darken-4"
|
||||||
/>
|
/>
|
||||||
<span class="pl-3">
|
<span class="pl-3">
|
||||||
{{ newsFull.comment.length }}
|
{{ newsFull.comment.length }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span>
|
<span> Чат </span>
|
||||||
Чат
|
|
||||||
</span>
|
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
@@ -51,9 +48,7 @@
|
|||||||
{{ newsFull.gallery.length }}
|
{{ newsFull.gallery.length }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span>
|
<span> Галерея </span>
|
||||||
Галерея
|
|
||||||
</span>
|
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</v-switch>
|
</v-switch>
|
||||||
@@ -69,42 +64,55 @@
|
|||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
cover
|
cover
|
||||||
@click="openOneImg(newsFull.link)"
|
@click="openOneImg(newsFull.link)"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="pt-0 pr-0">
|
<v-col class="pt-0 pr-0">
|
||||||
<v-card
|
<v-card class="rounded-t-0 flex-column d-flex h-100">
|
||||||
class="rounded-t-0 flex-column d-flex h-100 Line truncated
|
|
||||||
>
|
|
||||||
<v-list-item class="w-100">
|
<v-list-item class="w-100">
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<ico-user :author="newsFull.author" />
|
<ico-user :author="newsFull.author" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<div class="justify-self-end">
|
<div class="justify-self-end">
|
||||||
<v-icon
|
<v-icon
|
||||||
class="me-1"
|
class="me-1"
|
||||||
:icon="newsFull.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
|
:icon="
|
||||||
|
newsFull.scores.filter(
|
||||||
|
(e) =>
|
||||||
|
e.user == accountStore.user.login && e.score == true
|
||||||
|
).length > 0
|
||||||
|
? 'mdi-thumb-up'
|
||||||
|
: 'mdi-thumb-up-outline'
|
||||||
|
"
|
||||||
@click="toggleIncrementLike(newsFull.id, true)"
|
@click="toggleIncrementLike(newsFull.id, true)"
|
||||||
/>
|
/>
|
||||||
<span class="subheading me-2">
|
<span class="subheading me-2">
|
||||||
{{newsFull.scores.filter(e=> e.score==true).length}}
|
{{
|
||||||
</span>
|
newsFull.scores.filter((e) => e.score == true).length
|
||||||
<span class="me-1">
|
}}
|
||||||
·
|
|
||||||
</span>
|
</span>
|
||||||
|
<span class="me-1"> · </span>
|
||||||
|
|
||||||
<v-icon
|
<v-icon
|
||||||
class="me-1"
|
class="me-1"
|
||||||
:icon="newsFull.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'"
|
:icon="
|
||||||
|
newsFull.scores.filter(
|
||||||
|
(e) =>
|
||||||
|
e.user == accountStore.user.login &&
|
||||||
|
e.score == false
|
||||||
|
).length > 0
|
||||||
|
? 'mdi-thumb-down'
|
||||||
|
: 'mdi-thumb-down-outline'
|
||||||
|
"
|
||||||
@click="toggleIncrementLike(newsFull.id, false)"
|
@click="toggleIncrementLike(newsFull.id, false)"
|
||||||
/>
|
/>
|
||||||
<span class="subheading me-2">
|
<span class="subheading me-2">
|
||||||
{{newsFull.scores.filter(e=> e.score==false).length}}
|
{{
|
||||||
|
newsFull.scores.filter((e) => e.score == false).length
|
||||||
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -115,8 +123,8 @@
|
|||||||
<v-card-text class="pt-0">
|
<v-card-text class="pt-0">
|
||||||
<div
|
<div
|
||||||
v-if="newsFull.text"
|
v-if="newsFull.text"
|
||||||
v-html=formatText(newsFull.text)>
|
v-html="formatText(newsFull.text)"
|
||||||
</div>
|
></div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col
|
<v-col
|
||||||
@@ -134,39 +142,33 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row
|
<v-row class="d-flex flex-column" v-if="gallery">
|
||||||
class="d-flex flex-column "
|
|
||||||
v-if="gallery"
|
|
||||||
>
|
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
<v-card
|
<v-card
|
||||||
class="h-100 flex-column pa-3 d-flex overflow-auto overflow-x-hidden"
|
class="h-100 flex-column pa-3 d-flex overflow-auto overflow-x-hidden"
|
||||||
>
|
>
|
||||||
<div
|
<div class="flex-column d-flex ma-3">
|
||||||
class="flex-column d-flex ma-3"
|
|
||||||
>
|
|
||||||
<v-row
|
<v-row
|
||||||
style="height: 250px"
|
style="height: 250px"
|
||||||
class="justify-space-between"
|
class="justify-space-between"
|
||||||
v-if="newsFull.gallery.length > 0"
|
v-if="newsFull.gallery.length > 0"
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-for="e in newsFull.gallery" :key=e
|
v-for="e in newsFull.gallery"
|
||||||
:lg="Math.floor(Math.random() * (Math.floor(5) - Math.ceil(3)) + Math.ceil(2))"
|
:key="e"
|
||||||
|
:lg="
|
||||||
|
Math.floor(
|
||||||
|
Math.random() * (Math.floor(5) - Math.ceil(3)) +
|
||||||
|
Math.ceil(2)
|
||||||
|
)
|
||||||
|
"
|
||||||
class="flex-column d-flex pa-0 pb-3"
|
class="flex-column d-flex pa-0 pb-3"
|
||||||
>
|
>
|
||||||
|
<div class="h-100 w-100 flex-column d-flex">
|
||||||
<div
|
|
||||||
|
|
||||||
class='h-100 w-100 flex-column d-flex'
|
|
||||||
>
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="d-flex">
|
<v-col class="d-flex">
|
||||||
|
|
||||||
<v-img
|
<v-img
|
||||||
cover
|
cover
|
||||||
|
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:src="`${burl}${e.img}`"
|
:src="`${burl}${e.img}`"
|
||||||
@click="openImg(e.id)"
|
@click="openImg(e.id)"
|
||||||
@@ -180,8 +182,10 @@
|
|||||||
variant="text"
|
variant="text"
|
||||||
size="small"
|
size="small"
|
||||||
:color="heartIcoAll(e) ? 'red' : 'black'"
|
:color="heartIcoAll(e) ? 'red' : 'black'"
|
||||||
:icon= "heartIcoAll(e)?'mdi-heart':'mdi-heart-outline'"
|
:icon="
|
||||||
@click = toggleLikeAll(e.id)
|
heartIcoAll(e) ? 'mdi-heart' : 'mdi-heart-outline'
|
||||||
|
"
|
||||||
|
@click="toggleLikeAll(e.id)"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="pa-0 pl-1">
|
<v-col class="pa-0 pl-1">
|
||||||
@@ -190,102 +194,99 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row v-else>
|
<v-row v-else>
|
||||||
<v-col
|
<v-col
|
||||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
У новости нет фотографий
|
У новости нет фотографий
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</div>
|
</div>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
<v-row v-else>
|
<v-row v-else>
|
||||||
<v-col class="">
|
<v-col class="">
|
||||||
<v-card
|
<v-card class="h-100 flex-column d-flex">
|
||||||
class="h-100 flex-column d-flex"
|
<v-row
|
||||||
|
class="ma-0 my-3 overflow-auto h-0"
|
||||||
|
v-if="newsFull.comment.length > 0"
|
||||||
>
|
>
|
||||||
<v-row class="ma-0 my-3 overflow-auto h-0" v-if="newsFull.comment.length>0">
|
|
||||||
<v-col class="pa-0">
|
<v-col class="pa-0">
|
||||||
<v-card-text class="pt-0">
|
<v-card-text class="pt-0">
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="(y, key) in newsFull.comment"
|
v-for="(y, key) in newsFull.comment"
|
||||||
: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
|
||||||
>
|
? ""
|
||||||
{{ accountStore.user.login==y.author.login?'':splitname(y.author) }}
|
: 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 text-end text-subtitle-2">
|
<v-col class="pa-0 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="bg_white"
|
color="bg_white"
|
||||||
rounded=0
|
rounded="0"
|
||||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
:border="
|
||||||
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
accountStore.user.login == y.author.login
|
||||||
elevation=0
|
? 'end'
|
||||||
|
: 'start'
|
||||||
|
"
|
||||||
|
:border-color="
|
||||||
|
accountStore.user.login == y.author.login
|
||||||
|
? 'success'
|
||||||
|
: 'deep-purple accent-4'
|
||||||
|
"
|
||||||
|
elevation="0"
|
||||||
>
|
>
|
||||||
|
|
||||||
{{ y.text }}
|
{{ y.text }}
|
||||||
|
|
||||||
</v-alert>
|
</v-alert>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-grow-0 d-flex pa-0 align-center"
|
<v-col
|
||||||
:class="accountStore.user.login==y.author.login?'pa-0':'pa-5'"
|
class="flex-grow-0 d-flex pa-0 align-center"
|
||||||
|
:class="
|
||||||
|
accountStore.user.login == y.author.login
|
||||||
|
? 'pa-0'
|
||||||
|
: 'pa-5'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<v-btn
|
<v-btn
|
||||||
v-if="accountStore.user.login == y.author.login"
|
v-if="accountStore.user.login == y.author.login"
|
||||||
variant="text"
|
variant="text"
|
||||||
size="small"
|
size="small"
|
||||||
icon='mdi-delete'
|
icon="mdi-delete"
|
||||||
color="delete_btn"
|
color="delete_btn"
|
||||||
@click="deletComment(y.id, newsFull.id)"
|
@click="deletComment(y.id, newsFull.id)"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-col>
|
</v-col>
|
||||||
@@ -331,14 +332,11 @@
|
|||||||
:disabled="textcomment == ''"
|
:disabled="textcomment == ''"
|
||||||
@click="addComment(newsFull.id)"
|
@click="addComment(newsFull.id)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
@@ -356,8 +354,6 @@
|
|||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
@click="dialogfoto = false"
|
@click="dialogfoto = false"
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -368,18 +364,17 @@
|
|||||||
density="compact"
|
density="compact"
|
||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-chevron-left"
|
icon="mdi-chevron-left"
|
||||||
@click = "indximg !=0? indximg -=1:indximg=newsFull.gallery.length-1"
|
@click="
|
||||||
|
indximg != 0
|
||||||
|
? (indximg -= 1)
|
||||||
|
: (indximg = newsFull.gallery.length - 1)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column h_cards pa-0">
|
<v-col class="flex-column h_cards pa-0">
|
||||||
<v-img
|
<v-img class="d-flex" :src="`${burl}${galleryimges.img}`" />
|
||||||
class="d-flex"
|
|
||||||
:src="`${burl}${galleryimges.img}`"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex flex-column flex-grow-0">
|
<v-col class="d-flex flex-column flex-grow-0">
|
||||||
|
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="flex-column d-flex align-end align-self-center">
|
<v-col class="flex-column d-flex align-end align-self-center">
|
||||||
<v-btn
|
<v-btn
|
||||||
@@ -387,7 +382,11 @@
|
|||||||
density="compact"
|
density="compact"
|
||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-chevron-right"
|
icon="mdi-chevron-right"
|
||||||
@click = "indximg !=newsFull.gallery.length-1? indximg +=1:indximg=0"
|
@click="
|
||||||
|
indximg != newsFull.gallery.length - 1
|
||||||
|
? (indximg += 1)
|
||||||
|
: (indximg = 0)
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -396,24 +395,20 @@
|
|||||||
<v-row class="flex-grow-1 align-self-center d-flex placeIt">
|
<v-row class="flex-grow-1 align-self-center d-flex placeIt">
|
||||||
<v-col class="pa-0">
|
<v-col class="pa-0">
|
||||||
<v-btn
|
<v-btn
|
||||||
|
|
||||||
density="compact"
|
density="compact"
|
||||||
variant="text"
|
variant="text"
|
||||||
:color="heartIco() ? 'red' : 'black'"
|
:color="heartIco() ? 'red' : 'black'"
|
||||||
:icon="heartIco() ? 'mdi-heart' : 'mdi-heart-outline'"
|
:icon="heartIco() ? 'mdi-heart' : 'mdi-heart-outline'"
|
||||||
@click = toggleLike(galleryimges.id)
|
@click="toggleLike(galleryimges.id)"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="pa-0 text-overline">
|
<v-col class="pa-0 text-overline">
|
||||||
{{ galleryimges.likes.length }}
|
{{ galleryimges.likes.length }}
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="dialogfotoOne"
|
v-model="dialogfotoOne"
|
||||||
width="w-100"
|
width="w-100"
|
||||||
@@ -428,166 +423,159 @@
|
|||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-close"
|
icon="mdi-close"
|
||||||
@click="dialogfotoOne = false"
|
@click="dialogfotoOne = false"
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row>
|
||||||
|
|
||||||
<v-col class="flex-column h_cards pa-0">
|
<v-col class="flex-column h_cards pa-0">
|
||||||
<v-img
|
<v-img class="d-flex" :src="`${burl}${galleryimges}`" />
|
||||||
class="d-flex"
|
|
||||||
:src="`${burl}${galleryimges}`"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from "vue-router";
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from "@/utils/axios-api";
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from "vue";
|
||||||
import { baseURL } from '@/utils/axios-api'
|
import { baseURL } from "@/utils/axios-api";
|
||||||
import {checkremote} from '@/utils/universal_functions'
|
import { checkremote } from "@/utils/universal_functions";
|
||||||
import { spravURL } from '@/utils/axios-api'
|
import { spravURL } from "@/utils/axios-api";
|
||||||
import {useAccountStore} from '@/store/AccountStore'
|
import { useAccountStore } from "@/store/AccountStore";
|
||||||
import { format } from 'date-fns'
|
import { format } from "date-fns";
|
||||||
import icoUser from '@/components/UI/fiousercard/icoUser.vue'
|
import icoUser from "@/components/UI/fiousercard/icoUser.vue";
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore();
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: { icoUser },
|
components: { icoUser },
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
const textcomment = ref("");
|
||||||
|
const route = useRoute();
|
||||||
|
const newsFull = ref([]);
|
||||||
|
const gallery = ref(false);
|
||||||
|
|
||||||
|
const burl = baseURL.slice(0, -1);
|
||||||
const textcomment = ref('')
|
|
||||||
const route = useRoute()
|
|
||||||
const newsFull=ref([])
|
|
||||||
const gallery = ref(false)
|
|
||||||
|
|
||||||
const burl = baseURL.slice(0,-1)
|
|
||||||
|
|
||||||
const loadNews = () => {
|
const loadNews = () => {
|
||||||
axiosApiInstance.get(`api/navigation/newscrossroad/?id=${route.query.id}`).then(result => {
|
axiosApiInstance
|
||||||
newsFull.value=result.data.result[0]
|
.get(`api/navigation/newscrossroad/?id=${route.query.id}`)
|
||||||
|
.then((result) => {
|
||||||
|
newsFull.value = result.data.result[0];
|
||||||
|
|
||||||
if (newsFull.value.gallery.length > 0) {
|
if (newsFull.value.gallery.length > 0) {
|
||||||
gallery.value = true
|
gallery.value = true;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
loadNews();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
loadNews()
|
|
||||||
|
|
||||||
const splitname = (name) => {
|
const splitname = (name) => {
|
||||||
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
|
return (
|
||||||
}
|
name.familyname + " " + name.name[0] + "." + name.parentname[0] + "."
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const formatText = (text) => {
|
const formatText = (text) => {
|
||||||
|
return text.replaceAll(
|
||||||
return text.replaceAll('src="/media/uploads', `src="${baseURL}media/uploads`)
|
'src="/media/uploads',
|
||||||
|
`src="${baseURL}media/uploads`
|
||||||
}
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const dateformat = (datas) => {
|
const dateformat = (datas) => {
|
||||||
return format(new Date(datas), 'dd.MM.yyyy HH:mm')
|
return format(new Date(datas), "dd.MM.yyyy HH:mm");
|
||||||
}
|
};
|
||||||
|
|
||||||
const addComment = (idnew) => {
|
const addComment = (idnew) => {
|
||||||
|
axiosApiInstance
|
||||||
|
.post(`api/navigation/newscrossroad/`, {
|
||||||
|
news: idnew,
|
||||||
axiosApiInstance.post(`api/navigation/newscrossroad/`, {news: idnew, text: textcomment.value}).then(result => {
|
text: textcomment.value,
|
||||||
newsFull.value.comment= result.data.comment
|
|
||||||
})
|
})
|
||||||
textcomment.value=""
|
.then((result) => {
|
||||||
}
|
newsFull.value.comment = result.data.comment;
|
||||||
|
});
|
||||||
|
textcomment.value = "";
|
||||||
|
};
|
||||||
|
|
||||||
const deletComment = (id, news) => {
|
const deletComment = (id, news) => {
|
||||||
axiosApiInstance.post(`api/navigation/newscrossroad/`, {delid: id, news: news}).then(result => {
|
axiosApiInstance
|
||||||
newsFull.value.comment= result.data.comment
|
.post(`api/navigation/newscrossroad/`, { delid: id, news: news })
|
||||||
})
|
.then((result) => {
|
||||||
|
newsFull.value.comment = result.data.comment;
|
||||||
}
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const heartIcoAll = (image) => {
|
const heartIcoAll = (image) => {
|
||||||
return image.likes.filter(e=>e.user==accountStore.user.login).length==1
|
return (
|
||||||
|
image.likes.filter((e) => e.user == accountStore.user.login).length == 1
|
||||||
}
|
);
|
||||||
|
};
|
||||||
|
|
||||||
// ------------------------------ Галерея
|
// ------------------------------ Галерея
|
||||||
const galleryimges=ref([])
|
const galleryimges = ref([]);
|
||||||
const dialogfoto = ref(false)
|
const dialogfoto = ref(false);
|
||||||
const dialogfotoOne = ref(false)
|
const dialogfotoOne = ref(false);
|
||||||
const indximg = ref('')
|
const indximg = ref("");
|
||||||
|
|
||||||
const openImg = (idimg) => {
|
const openImg = (idimg) => {
|
||||||
dialogfoto.value = true
|
dialogfoto.value = true;
|
||||||
indximg.value = newsFull.value.gallery.findIndex(e=>e.id == idimg)
|
indximg.value = newsFull.value.gallery.findIndex((e) => e.id == idimg);
|
||||||
}
|
};
|
||||||
|
|
||||||
const openOneImg = (idimg) => {
|
const openOneImg = (idimg) => {
|
||||||
dialogfotoOne.value = true
|
dialogfotoOne.value = true;
|
||||||
galleryimges.value = idimg
|
galleryimges.value = idimg;
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
}
|
() => indximg,
|
||||||
|
(newValue, oldValue) => {
|
||||||
watch(()=>indximg ,(newValue,oldValue)=>{
|
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
galleryimges.value = newsFull.value.gallery[newValue.value]
|
galleryimges.value = newsFull.value.gallery[newValue.value];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}, {deep:true})
|
{ deep: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Лайки на фотографии
|
// Лайки на фотографии
|
||||||
|
|
||||||
const toggleLike = (idimage) => {
|
const toggleLike = (idimage) => {
|
||||||
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
|
axiosApiInstance
|
||||||
galleryimges.value.likes= result.data
|
.post(`api/navigation/gallery/`, { image: idimage })
|
||||||
})
|
.then((result) => {
|
||||||
}
|
galleryimges.value.likes = result.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const toggleLikeAll = (idimage) => {
|
const toggleLikeAll = (idimage) => {
|
||||||
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
|
axiosApiInstance
|
||||||
newsFull.value.gallery.filter(e=>e.id ==idimage)[0].likes = result.data
|
.post(`api/navigation/gallery/`, { image: idimage })
|
||||||
|
.then((result) => {
|
||||||
})
|
newsFull.value.gallery.filter((e) => e.id == idimage)[0].likes =
|
||||||
}
|
result.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
const heartIco = () => {
|
const heartIco = () => {
|
||||||
return galleryimges.value.likes.filter(e=>e.user==accountStore.user.login).length==1
|
return (
|
||||||
}
|
galleryimges.value.likes.filter(
|
||||||
|
(e) => e.user == accountStore.user.login
|
||||||
|
).length == 1
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const toggleIncrementLike = (news, scores) => {
|
const toggleIncrementLike = (news, scores) => {
|
||||||
|
axiosApiInstance
|
||||||
axiosApiInstance.post(`api/navigation/newscrossroad/`, {news: news, scores: scores}).then(result => {
|
.post(`api/navigation/newscrossroad/`, { news: news, scores: scores })
|
||||||
newsFull.value.scores= result.data
|
.then((result) => {
|
||||||
})
|
newsFull.value.scores = result.data;
|
||||||
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
route,
|
route,
|
||||||
@@ -613,24 +601,18 @@ export default {
|
|||||||
indximg,
|
indximg,
|
||||||
toggleIncrementLike,
|
toggleIncrementLike,
|
||||||
openOneImg,
|
openOneImg,
|
||||||
dialogfotoOne
|
dialogfotoOne,
|
||||||
|
};
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.comgal .v-switch__thumb {
|
.comgal .v-switch__thumb {
|
||||||
|
|
||||||
color: white !important;
|
color: white !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.h_cards {
|
.h_cards {
|
||||||
|
|
||||||
height: 86vh;
|
height: 86vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -36,7 +36,8 @@ export default createVuetify({
|
|||||||
app_bar: '#004D40', // Цвет для навигационной (аппбар) панели
|
app_bar: '#004D40', // Цвет для навигационной (аппбар) панели
|
||||||
black_and_white: '#FFFFFF',
|
black_and_white: '#FFFFFF',
|
||||||
grey_white: '#FFFFFF', // Цвет для карточек
|
grey_white: '#FFFFFF', // Цвет для карточек
|
||||||
insert_table: '#FAFAFA'
|
insert_table: '#FAFAFA',
|
||||||
|
btn_text: '#00897B' // фигма, текст кнопки с иконкой
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
@@ -60,7 +61,8 @@ export default createVuetify({
|
|||||||
app_bar: '#212121',
|
app_bar: '#212121',
|
||||||
black_and_white: '#101311',
|
black_and_white: '#101311',
|
||||||
grey_white: '#212121',
|
grey_white: '#212121',
|
||||||
insert_table: '#323030'
|
insert_table: '#323030',
|
||||||
|
btn_text: '#00897B'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<structure-inspection />
|
<structure-inspection />
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item class="gap h-100" value="openVacancies">
|
<v-window-item class="gap h-100" value="openVacancies">
|
||||||
<h1>Открытые вакансии</h1>
|
<open-vacancies/>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item class="gap h-100" value="contactInfo">
|
<v-window-item class="gap h-100" value="contactInfo">
|
||||||
<contact-info />
|
<contact-info />
|
||||||
@@ -23,6 +23,7 @@ import ContactInfo from "@/components/about_inspection/contacts/ContactInfo.vue"
|
|||||||
import { pagecounter } from "@/utils/universal_functions";
|
import { pagecounter } from "@/utils/universal_functions";
|
||||||
import PatternTabs from "@/components/UI/PatternTabs.vue";
|
import PatternTabs from "@/components/UI/PatternTabs.vue";
|
||||||
import GeneralInformation from "@/components/about_inspection/general_information/GeneralInformation.vue";
|
import GeneralInformation from "@/components/about_inspection/general_information/GeneralInformation.vue";
|
||||||
|
import OpenVacancies from '@/components/about_inspection/open_vacancies/OpenVacancies.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -30,9 +31,11 @@ export default {
|
|||||||
ContactInfo,
|
ContactInfo,
|
||||||
PatternTabs,
|
PatternTabs,
|
||||||
GeneralInformation,
|
GeneralInformation,
|
||||||
|
OpenVacancies
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
pagecounter();
|
pagecounter();
|
||||||
return {
|
return {
|
||||||
tabs_items: [
|
tabs_items: [
|
||||||
|
|||||||
Reference in new issue
Block a user