Вывод информации на фронт
This commit is contained in:
1 parent
cb858ee40c
commit
62b4bcd597
2 files changed
+2
-200
No files matched your search
@@ -1,198 +0,0 @@
|
||||
<template>
|
||||
<full-calendar :options="calendarOptions" />
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {reactive, ref, onMounted} from 'vue'
|
||||
|
||||
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'calendar-full',
|
||||
|
||||
props: {
|
||||
initial: {
|
||||
type: String,
|
||||
default: 'multiMonthYear'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
setup(props) {
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
|
||||
initialView: props.initial,
|
||||
dayMaxEventRows: 3
|
||||
,
|
||||
locale: 'ru',
|
||||
buttonText: {
|
||||
today: 'Сегодня',
|
||||
month: 'Месяц',
|
||||
week: 'Неделя',
|
||||
day: 'День',
|
||||
list: 'Список',
|
||||
year: 'Год'
|
||||
},
|
||||
firstDay:'1',
|
||||
events: [],
|
||||
|
||||
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev',
|
||||
center: 'title',
|
||||
right: 'next'
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
aspectRatio: 1,
|
||||
multiMonthMaxColumns: 2,
|
||||
displayEventEnd: true,
|
||||
height: '100%',
|
||||
stickyHeaderDates: true,
|
||||
dayMaxEventRows: 2,
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.shortText + ' события'
|
||||
},
|
||||
views: {
|
||||
multiMonthYear: {
|
||||
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.num
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
allDayText: 'Весь день',
|
||||
noEventsContent: 'На сегодня событий нет',
|
||||
selectable: true,
|
||||
|
||||
})
|
||||
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||
.then(data => {
|
||||
|
||||
for (let x in data.data) {
|
||||
|
||||
if (x=="План-график") {
|
||||
data.data[x].map(e=>{
|
||||
|
||||
|
||||
calendarOptions.events.push({ description: 'description for All Day Event', title: e.name, start: e.start_work_period, end: e.end_work_period})
|
||||
|
||||
}
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
f_generalvacation()
|
||||
|
||||
|
||||
})
|
||||
// genvacation.value[0].planned_date
|
||||
|
||||
|
||||
|
||||
return { calendarOptions }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#fc-dom-1:first-letter {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.fc-toolbar {
|
||||
/* padding: 0px; */
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.fc-day-header {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.fc-day {
|
||||
border: none;
|
||||
}
|
||||
.fc-time-grid-event {
|
||||
background-color: #e6e6e6;
|
||||
border: none;
|
||||
color: #000;
|
||||
}
|
||||
.fc-event-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fc .fc-toolbar.fc-header-toolbar {
|
||||
padding-bottom: 0.2em;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.fc .fc-popover {
|
||||
top: 0px!important
|
||||
;
|
||||
left: 450px!important;
|
||||
overflow: auto;
|
||||
min-width: 500px;
|
||||
height: 380px;
|
||||
}
|
||||
|
||||
.fc-h-event .fc-event-title {
|
||||
display: initial!important;
|
||||
}
|
||||
|
||||
/* .fc .fc-daygrid-day-events {
|
||||
margin-top: -7px;
|
||||
} */
|
||||
.fc {
|
||||
/* background-color: #ffffff; */
|
||||
background-color: var('bg-main_theme');
|
||||
}
|
||||
|
||||
.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>
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
import CarouselList from '@/components/carousel-list.vue'
|
||||
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
||||
import CalendarFull from '@/components/UI/Calendar-full.vue'
|
||||
|
||||
|
||||
import NewsHome from '@/components/news-home.vue'
|
||||
import LoadRound from '@/components/load-round.vue'
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
CarouselList,
|
||||
CarouselNumbers,
|
||||
CalendarFull,
|
||||
|
||||
|
||||
LoadRound,
|
||||
DigitalLetna,
|
||||
|
||||
Reference in new issue
Block a user