Merge branch 'razrab'

This commit is contained in:
iriska-gri committed 2023-10-02 13:15:46 +03:00
commit c5dd3561f1
39 files changed
+447 -202

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "front",
"version": "0.0.11",
"version": "0.0.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "front",
"version": "0.0.11",
"version": "0.0.12",
"dependencies": {
"@fullcalendar/core": "^6.1.8",
"@fullcalendar/daygrid": "^6.1.8",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "front",
"version": "0.0.11",
"version": "0.0.12",
"scripts": {
"dev": "vite",
"build": "vite build",
Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@@ -1,5 +1,6 @@
<template>
<full-calendar :options="calendarOptions" />
</template>
<script>
@@ -15,18 +16,25 @@ import multiMonthPlugin from '@fullcalendar/multimonth'
export default {
name: 'Calendar',
name: 'calendar-full',
props: {
initial: {
type: String,
default: 'multiMonthYear'
}
},
components: {
FullCalendar
},
setup() {
setup(props) {
const calendarOptions = reactive({
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
initialView: 'dayGridMonth',
initialView: props.initial,
dayMaxEventRows: 2,
locale: 'ru',
buttonText: {
today: 'Сегодня',
@@ -38,37 +46,67 @@ export default {
},
firstDay:'1',
events: [],
// eventDidMount: function(info) {
// const dayEl = info.el.closest('.fc-daygrid-day')
// dayEl.style.backgroundColor = 'red'
// },
// datesRender: function(info) {
// const start = info.view.activeStart
// const end = info.view.activeEnd
// let daysEls = document.querySelectorAll('.fc-daygrid-day')
// console.log(daysEls , ' info-------------');
// },
editable: true,
headerToolbar: {
left: 'prev next today multiMonthYear',
headerToolbar: {
left: 'prev',
center: 'title',
right: 'dayGridMonth listDay listYear'
},
multiMonthMaxColumns: 2,
buttonIcons: {
prev:'chevron-left',
},
displayEventEnd: true,
right: 'next'
}
,
eventRender: function(eventObj, $el) {
$el.popover({
title: eventObj.title,
content: eventObj.description,
trigger: 'hover',
placement: 'top',
container: 'body'
});
},
// eventDidMount: function(info) {
// console.log(info.event.extendedProps);
// {description: "Lecture", department: "BioChemistry"}
// },
aspectRatio: 1,
multiMonthMaxColumns: 2,
displayEventEnd: true,
height: '100%',
stickyHeaderDates: true,
dayMaxEventRows: 2,
moreLinkContent: function(arg) {
return arg.shortText + ' события'
},
views: {
multiMonthYear: {
aspectRatio: 2,
moreLinkContent: function(arg) {
return arg.num
},
// titleFormat: { year: 'numeric', month: '2-digit', day: '2-digit' }
}
},
},
// columnFormat: {
allDayText: 'Весь день',
noEventsContent: 'На сегодня событий нет',
selectable: true,
aspectRatio: 2,
dateClick: (arg) => {
console.log(arg.date);
}
@@ -83,7 +121,7 @@ export default {
data.data[x].map(e=>{
let d = new Date(e.planned_date)
// console.log(, 'e---------d.addDays(e.count_days)--------e')
calendarOptions.events.push({title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
}
@@ -115,7 +153,7 @@ export default {
}
.fc-toolbar {
padding: 0px;
/* padding: 0px; */
background-color: #f8f8f8;
}
.fc-day-header {
@@ -135,15 +173,46 @@ export default {
}
.fc .fc-toolbar.fc-header-toolbar {
padding-bottom: 1.2em;
padding-bottom: 0.2em;
margin-bottom: 0px;
}
.fc .fc-daygrid-day-events {
/* .fc .fc-daygrid-day-events {
margin-top: -7px;
}
} */
.fc {
background-color: #ffffff;
}
.fc-button {
padding: 1px!important;
border-radius: 1em!important;
line-height: 0!important;
background-color: transparent!important;
border-color: transparent!important;
}
.fc-icon {
color: #000;
display: flex;
}
.fc-button:focus, .fc-icon {
outline: none!important;
}
.fc-button,
.fc-buttonactive,
.fc-button:focus {
border:none!important;
}
.fc-header-toolbar {
background: white !important;
}
</style>
+1 -1
View File
@@ -30,7 +30,7 @@
v-model="feedbackdata.nowrating[key].rating"
hover
half-increments
size="small"
color="yellow-darken-3"
/>
</v-col>
+56 -20
View File
@@ -1,12 +1,15 @@
<template>
<!-- -->
<v-carousel
cover
height="350"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
interval="10000"
cover
height="450"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
cycle
@@ -15,13 +18,12 @@
<v-carousel-item
v-for="(x, i) in carous" :key="i"
:src="`${burl}${x.link}`"
cover
eager
>
<!-- <my-helper :pretext = 'x'/> -->
<v-container
fill-height
fluid
@@ -29,12 +31,39 @@
class="flex-column h-100 d-flex"
>
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-6">
{{x.title}}
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}} </v-col>
<!-- {{ burl }} {{ x.sender }} -->
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text class="ml-2 mb-2 text-black w-50 flex-grow-0 py-3 text-text_carous text-h5 bgText overflow-auto font-weight-medium">
{{x.text}}
<v-card-text class="ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto ">
<v-textarea
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value=x.text
variant='plain'
readonly
auto-grow
rows="1"
hide-details
/>
</v-card-text>
</v-card>
@@ -48,8 +77,8 @@
</template>
<script>
import { ref } from 'vue'
import {getfromserverfree} from '@/utils/universal_functions'
import { ref, computed } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
@@ -60,13 +89,15 @@ export default {
setup() {
const burl = baseURL.slice(0,-1)
const carous=ref([{link: ""}])
const imageSrcgrupp=computed(()=> {
return new URL(`@/assets/mc.png`, import.meta.url).href;
})
getfromserverfree("api/navigation/carousels/", carous)
getfromserver("api/navigation/carousels/", carous)
return { burl, carous}
return { burl, carous, imageSrcgrupp}
}
}
@@ -80,7 +111,7 @@ export default {
.bgText {
background: #ffffffb0;
line-height: 3.0rem!important;
line-height: 2.1rem!important;
}
@@ -88,4 +119,9 @@ export default {
font-family: cursive !important;
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 1.3em!important;
}
</style>
+137 -3
View File
@@ -37,16 +37,101 @@
<v-expand-transition>
<div v-show="x.show">
<v-divider></v-divider>
<v-divider/>
<v-card-text>
{{x.text}}
</v-card-text>
<v-divider/>
<v-card-actions >
<v-row >
<v-col>
<v-btn
variant="text"
icon="mdi-thumb-up-outline"
color="blue-darken-3"
@click="toggleIncrementLike"
/>
{{ incrementLikes }}
</v-col>
<v-col class=" ml-8">
<v-btn
variant="text"
icon="mdi-message-text-outline"
color="teal"
@click="commentadd"
/>
{{ message }}
<v-btn
:icon="x.show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
@click="x.show = !x.show"
></v-btn>
</v-col>
<v-col class="text-center pr-0">
<v-btn
variant="text"
icon="mdi-thumb-down-outline"
color="red-lighten-2"
@click="toggleDecrementLike"
/>
{{ derementLikes }}
</v-col>
</v-row>
</v-card-actions>
<v-divider class="mb-2"/>
</div>
</v-expand-transition>
<v-expand-transition>
<div v-show="commentShow">
Тут комменты
</div>
</v-expand-transition>
</v-card>
<v-row justify="center">
<v-dialog
v-model="dialogCommentShow"
persistent
width="550"
>
<v-card>
<v-card-title class="text-h5">
Прокоментировать новость
</v-card-title>
<v-card-text>
<v-textarea
variant="solo"
hide-details
rows="5"
></v-textarea>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue-darken-1"
variant="text"
@click="dialogCommentShow = false"
>
Отмена
</v-btn>
<v-btn
color="blue-darken-1"
variant="text"
@click="dialogCommentShow = false"
>
Отправить
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-row>
</v-container>
</template>
<script>
@@ -64,6 +149,41 @@ export default {
const newss=ref([])
const show=ref(false)
const incrementLikes = ref(0)
const derementLikes = ref(0)
const likedI = ref(false)
const likedD = ref(false)
const message = ref(0)
const commentShow = ref(false)
const dialogCommentShow = ref(false)
const toggleIncrementLike = () => {
if (likedI.value) {
incrementLikes.value--
}
else {
incrementLikes.value++
if(likedD.value){
derementLikes.value--
likedD.value = false
}
}
likedI.value=!likedI.value
}
const toggleDecrementLike = () => {
if (likedD.value) {
derementLikes.value--
}
else {
derementLikes.value++
if(likedI.value){
incrementLikes.value--
likedI.value = false
}
}
likedD.value=!likedD.value
}
const burl = baseURL.slice(0,-1)
@@ -80,12 +200,26 @@ export default {
}
}, {deep:true})
const commentadd = () => {
dialogCommentShow.value=!dialogCommentShow.value
// commentShow.value =!commentShow.value
}
return {
newss,
show,
burl,
limitText
limitText,
incrementLikes,
derementLikes,
message,
commentShow,
toggleIncrementLike,
toggleDecrementLike,
dialogCommentShow,
commentadd
}
}
}
+37 -102
View File
@@ -3,101 +3,41 @@
<v-row>
<v-col class="d-flex flex-column" lg=7>
<v-row class="flex-grow-0">
<v-col class="pr-0">
<v-col class="pr-0 pb-0">
<Carousel-list/>
</v-col>
</v-row>
<v-row>
<!-- <v-col class="pt-1 flex-column d-flex mt-3" > -->
<!-- <v-row class="flex-column flex-grow-0 mb-1">
<Carousel-numbers
:digitalData="stat"/>
</v-row> -->
<!-- <v-row class="pt-1 flex-column mt-0 mb-0 "> -->
<!-- <v-card class="d-flex flex-column ml-3">
<div class="fg">
<v-banner
lines="one"
icon="mdi-lock"
color="deep-purple-accent-4"
class="my-4"
>
<v-banner-text>
{{date1}}
</v-banner-text>
<template v-slot:actions>
<v-btn>Action</v-btn>
</template>
</v-banner>
<v-banner
lines="two"
icon="mdi-weather-hurricane"
color="error"
class="my-4"
>
<v-banner-text>
Banner with two lines of text. If the text is too long to fit on two lines then an ellipsis will be used to hide the remaining content. So this next line will be hidden.
</v-banner-text>
<template v-slot:actions>
<v-btn>Action</v-btn>
</template>
</v-banner>
<v-banner
lines="three"
icon="$warning"
color="warning"
class="my-4"
>
<v-banner-text>
Banner with three lines of text. One or two lines is preferable. Three lines should be considered the absolute maximum length on desktop in order to keep messages short and actionable.
</v-banner-text>
<template v-slot:actions>
<v-btn>Action</v-btn>
</template>
</v-banner>
<v-banner
lines="three"
icon="$warning"
color="warning"
class="my-4"
>
<v-banner-text>
Banner with three lines of text. One or two lines is preferable. Three lines should be considered the absolute maximum length on desktop in order to keep messages short and actionable.
</v-banner-text>
<template v-slot:actions>
<v-btn>Action</v-btn>
</template>
</v-banner>
</div>
</v-card> -->
<!-- <Carousel-numbers
:digitalData="onlines"
/> -->
<!-- </v-row> -->
<!-- </v-col> -->
<!-- <v-row>
<v-col class="pt-1 pr-0 pb-0 flex-col">
<calendar/>
<!-- <v-locale-provider > -->
<!-- <v-date-picker
v-model="date1"
class="d-flex pik"
color="teal-accent-4"
/> -->
<!-- </v-locale-provider> -->
<Calendar-full
:initial="'listYear'"
:head=true
/>
</v-col>
</v-row> -->
<v-row>
<v-col class="pr-0 pt-0 flex-column">
<v-card class="h-100 bg-transparent pa-2 d-flex flex-column">
<v-row class="d-flex">
<v-col> <Calendar-full
/></v-col>
<v-col> <Calendar-full
:initial="'listYear'"
/>
</v-col>
</v-row>
</v-card>
</v-col>
<!-- </v-locale-provider> -->
<!-- </v-col> -->
<!-- <v-col>
<v-btn
@click="proba">
@@ -108,8 +48,8 @@
</v-row>
</v-col>
<v-col class="flex-column d-flex px-0">
<v-row class="flex-grow-1 ma-0">
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
<v-row class="flex-grow-1 ma-0 mx-1">
<v-col class="pt-0">
<v-card class="h-100 flex-column">
<v-row v-for="x in stat" :key="x">
@@ -122,18 +62,13 @@
elevation="0"
>
<!-- <v-img
height="100"
:src="`${burl}${n.img}`"
cover
class="text-white"
> -->
<v-card class="h-100 text-center g text-numeral">
<v-card-title class="statstyle py-0 text-overline font-weight-bold">
{{x.status}}
</v-card-title>
<v-card-text class="numstyle mt-2 py-0 font-weight-bold">
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.num)' :duration='1'/>
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.num)' :duration='2'/>
</v-card-text>
</v-card>
@@ -145,7 +80,7 @@
</v-card>
</v-col>
</v-row>
<v-row class="flex-grow-0 ma-0">
<v-row class="flex-grow-0 ma-0 mx-1">
<v-col class="py-0">
<v-card class="h-100 flex-colmn"
>
@@ -173,7 +108,7 @@
</v-row>
</v-col>
<v-col class="d-flex flex-column justify-space-between px-0 py-2 pb-0" lg=3>
<v-col class="d-flex flex-column justify-space-between px-0 py-2 pr-3 pb-0" lg=3>
<v-card
class="h-100 bg-transparent "
elevation="0"
@@ -205,7 +140,7 @@
import CarouselList from '@/components/carousel-list.vue'
import CarouselNumbers from '@/components/carousel-numbers.vue'
import { axiosApiInstance } from '@/utils/axios-api'
import Calendar from '@/components/UI/calendar.vue'
import CalendarFull from '@/components/UI/Calendar-full.vue'
export default {
@@ -214,7 +149,7 @@
NewsList,
CarouselList,
CarouselNumbers,
Calendar
CalendarFull
},
setup(){