Календарь

This commit is contained in:
iriska-gri committed 2023-11-10 12:47:33 +03:00
1 parent 8ada6829ad
commit bb654239af
6 files changed
+134 -22

No files matched your search

BIN
View File
Binary file not shown.
+12
View File
@@ -26,6 +26,7 @@
"roboto-fontface": "*", "roboto-fontface": "*",
"v-tooltip": "^2.1.3", "v-tooltip": "^2.1.3",
"vue": "^3.2.0", "vue": "^3.2.0",
"vue-cal": "^4.8.1",
"vue-chartjs": "^5.2.0", "vue-chartjs": "^5.2.0",
"vue-jwt-decode": "^0.1.0", "vue-jwt-decode": "^0.1.0",
"vue-router": "^4.0.0", "vue-router": "^4.0.0",
@@ -21546,6 +21547,17 @@
"@vue/shared": "3.3.4" "@vue/shared": "3.3.4"
} }
}, },
"node_modules/vue-cal": {
"version": "4.8.1",
"resolved": "https://registry.npmjs.org/vue-cal/-/vue-cal-4.8.1.tgz",
"integrity": "sha512-qe0jSDmbzdKF3/MSTPcHSJMOovav4MwmXtgs1n7jkI345zAtfErQVv4uFEVXg1rD62sBi1qWflYRUKy1mzQapg==",
"funding": {
"url": "https://github.com/sponsors/antoniandre"
},
"peerDependencies": {
"vue": "^2.6.14 || ^3.2.0"
}
},
"node_modules/vue-chartjs": { "node_modules/vue-chartjs": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz", "resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz",
+1
View File
@@ -28,6 +28,7 @@
"roboto-fontface": "*", "roboto-fontface": "*",
"v-tooltip": "^2.1.3", "v-tooltip": "^2.1.3",
"vue": "^3.2.0", "vue": "^3.2.0",
"vue-cal": "^4.8.1",
"vue-chartjs": "^5.2.0", "vue-chartjs": "^5.2.0",
"vue-jwt-decode": "^0.1.0", "vue-jwt-decode": "^0.1.0",
"vue-router": "^4.0.0", "vue-router": "^4.0.0",
+1 -15
View File
@@ -70,21 +70,7 @@ export default {
} }
, ,
// 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, aspectRatio: 1,
multiMonthMaxColumns: 2, multiMonthMaxColumns: 2,
displayEventEnd: true, displayEventEnd: true,
@@ -0,0 +1,109 @@
<template>
<v-row>
<v-col>
<vue-cal
locale="ru"
xsmall
:time="false"
hide-view-selector
active-view="month"
:disable-views="['years', 'year', 'week', 'day']"
@cell-focus="selectedDate = $event"
class="vuecal--blue-theme vuecal--rounded-theme"
>
<template #arrow-prev>
<v-icon icon="mdi-menu-left"></v-icon>
</template>
<template #arrow-next>
<v-icon icon="mdi-menu-right"></v-icon>
</template>
</vue-cal>
</v-col>
<v-col>
<vue-cal
locale="ru"
xsmall
:time="false"
hide-view-selector
active-view="day"
:disable-views="['years', 'year', 'month', 'week']"
:selected-date="selectedDate"
class="vuecal--blue-theme"
>
<template #arrow-prev>
<v-icon icon="mdi-menu-left"></v-icon>
</template>
<template #arrow-next>
<v-icon icon="mdi-menu-right"></v-icon>
</template>
</vue-cal>
</v-col>
</v-row>
</template>
<script>
import VueCal from 'vue-cal'
import 'vue-cal/dist/vuecal.css'
import { ref, onMounted } from 'vue'
export default {
components: { VueCal },
setup() {
const selectedDate = ref(null)
const events = [
{
start: '2023-11-20 14:00',
end: '2023-11-20 18:00',
title: 'Need to go shopping',
icon: 'shopping_cart', // Custom attribute.
content: 'Click to see my shopping list',
contentFull: 'My shopping list is rather long:<br><ul><li>Avocados</li><li>Tomatoes</li><li>Potatoes</li><li>Mangoes</li></ul>', // Custom attribute.
class: 'leisure'
},
{
start: '2023-10-10 14:00',
end: '2023-10-20 14:00',
title: 'Golf with John',
icon: 'golf_course', // Custom attribute.
content: 'Do I need to tell how many holes?',
contentFull: 'Okay.<br>It will be a 18 hole golf course.', // Custom attribute.
class: 'sport'
}
]
return { events, selectedDate }
}
}
</script>
<style>
.vuecal__cell-events-count {
width: 18px;
height: 2px;
color: transparent;
}
/* Dot indicator */
.vuecal__cell-events-count {
width: 4px;
min-width: 0;
height: 4px;
padding: 0;
color: transparent;
}
/* Cell background indicator */
.vuecal__cell--has-events {background-color: #fffacd;}
.vuecal__cell-events-count {display: none;}
</style>
+11 -7
View File
@@ -12,13 +12,11 @@
<v-col class="pr-0 pt-0 flex-column"> <v-col class="pr-0 pt-0 flex-column">
<v-card class="h-100 bg-transparent pa-2 d-flex flex-column"> <v-card class="h-100 bg-transparent pa-2 d-flex flex-column">
<v-row class="d-flex"> <v-row class="d-flex">
<v-col> <v-col class="flex-column d-flex">
<Calendar-full/> <!-- <Calendar-full/>
</v-col> </v-col>
<v-col> <v-col> -->
<Calendar-full <event-calendar/>
:initial="'listYear'"
/>
</v-col> </v-col>
</v-row> </v-row>
</v-card> </v-card>
@@ -158,6 +156,9 @@
import LoadRound from '@/components/load-round.vue' import LoadRound from '@/components/load-round.vue'
import DigitalLetna from '@/components/digital-letna.vue' import DigitalLetna from '@/components/digital-letna.vue'
import { axiosApiInstance } from '@/utils/axios-api' import { axiosApiInstance } from '@/utils/axios-api'
import EventCalendar from '@/components/UI/event-calendar.vue'
export default { export default {
components: { components: {
@@ -167,7 +168,9 @@
CalendarFull, CalendarFull,
NewsListHome, NewsListHome,
LoadRound, LoadRound,
DigitalLetna DigitalLetna,
EventCalendar
}, },
@@ -176,6 +179,7 @@
const appStore = useAppStore() const appStore = useAppStore()
const favorit = ref([]) const favorit = ref([])
const toggle = ref(null) const toggle = ref(null)
pagecounter() pagecounter()
const accountStore = useAccountStore() const accountStore = useAccountStore()
onMounted(() => { onMounted(() => {