Второй этап
This commit is contained in:
1 parent
b02fa66f41
commit
a0edc64f1c
25 files changed
+97
-56
No files matched your search
@@ -3,13 +3,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {reactive} from 'vue'
|
||||
import {reactive, ref, onMounted} from 'vue'
|
||||
// import '@fullcalendar/core/vdom'
|
||||
import FullCalendar from '@fullcalendar/vue3'
|
||||
import dayGridPlugin from '@fullcalendar/daygrid'
|
||||
import interactionPlugin from '@fullcalendar/interaction'
|
||||
import listPlugin from '@fullcalendar/list'
|
||||
import timeGridPlugin from '@fullcalendar/interaction'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
|
||||
export default {
|
||||
name: 'Calendar',
|
||||
@@ -19,27 +20,50 @@ export default {
|
||||
},
|
||||
|
||||
setup() {
|
||||
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ],
|
||||
initialView: 'dayGridMonth',
|
||||
locale: 'ru',
|
||||
events: [
|
||||
{ title: 'event 1', date: '2023-09-21' },
|
||||
{ title: 'event 2', date: '2023-09-22' },
|
||||
],
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev, next, today',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth, dayGridWeek, listDay'
|
||||
},
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ],
|
||||
initialView: 'dayGridMonth',
|
||||
locale: 'ru',
|
||||
buttonText: {
|
||||
today: 'Сегодня',
|
||||
month: 'Месяц',
|
||||
week: 'Неделя',
|
||||
day: 'День',
|
||||
list: 'Список'
|
||||
},
|
||||
firstDay:'1',
|
||||
events: [],
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev, next, today',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth, dayGridWeek, dayGridDay, listDay'
|
||||
},
|
||||
|
||||
dateClick: (arg) => {
|
||||
console.log(arg.date);
|
||||
}
|
||||
})
|
||||
dateClick: (arg) => {
|
||||
console.log(arg.date);
|
||||
}
|
||||
})
|
||||
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||
.then(data => {
|
||||
|
||||
|
||||
console.log(data.data , 'genvacation--------------------');
|
||||
calendarOptions.events = [{ title: 'Отпуск', start: '2023-09-01', end: '2023-09-25'}]
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
f_generalvacation()
|
||||
console.log(typeof(huf), 'hu--------------');
|
||||
|
||||
})
|
||||
// genvacation.value[0].planned_date
|
||||
|
||||
|
||||
|
||||
return { calendarOptions }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<v-carousel
|
||||
cover
|
||||
height="500"
|
||||
height="300"
|
||||
hide-delimiters
|
||||
hide-delimiter-background
|
||||
show-arrows="hover"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-container fluid class="d-flex mx-0">
|
||||
<v-row>
|
||||
<v-col class="d-flex flex-column">
|
||||
<v-col class="d-flex flex-column" lg=7>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="pr-0">
|
||||
<Carousel-list/>
|
||||
@@ -140,7 +140,6 @@
|
||||
import CarouselList from '@/components/carousel-list.vue'
|
||||
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { VDatePicker } from 'vuetify/labs/VDatePicker'
|
||||
import Calendar from '@/components/UI/calendar.vue'
|
||||
|
||||
|
||||
@@ -150,13 +149,11 @@
|
||||
NewsList,
|
||||
CarouselList,
|
||||
CarouselNumbers,
|
||||
VDatePicker,
|
||||
Calendar
|
||||
},
|
||||
|
||||
setup(){
|
||||
const t_baseCriteria = ref([])
|
||||
const date1 = ref(['2023-09-19', '2023-09-18', '2023-09-1'])
|
||||
|
||||
|
||||
|
||||
@@ -195,24 +192,15 @@
|
||||
.then(data => {
|
||||
console.log(data.data);
|
||||
t_baseCriteria.value = data.data.results
|
||||
|
||||
// t_baseCriteria.value.map(e=>
|
||||
// console.log(e,'e')
|
||||
// // e.rating = e.get_criteria[0].rating
|
||||
// )
|
||||
})
|
||||
}
|
||||
return {
|
||||
|
||||
accountStore,
|
||||
stat,
|
||||
model,
|
||||
onlines,
|
||||
appStore,
|
||||
proba,
|
||||
date1,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user