From dd90cfb4442b5e0528d0f223912a63b56a1d2e39 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Fri, 22 Sep 2023 15:15:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.sqlite3 | Bin 253952 -> 253952 bytes front/package-lock.json | 30 ++++-- front/package.json | 3 +- front/src/components/UI/Calendar.vue | 109 +++++++++++++------- front/src/components/carousel-list.vue | 2 +- front/src/components/carousel-numbers.vue | 8 +- front/src/components/news-list.vue | 2 +- front/src/layouts/default/DefaultPortal.vue | 4 +- front/src/views/HomePage.vue | 75 +++++++++++++- 9 files changed, 173 insertions(+), 60 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 3c316fafc9cfc0a75cedd87ead6999f44a566f4a..c3f627de298f7132c96cbd00300328791444a4c7 100644 GIT binary patch delta 412 zcmZoTz~69ye}Xh)%tRSy#+Z!>%6e?f5_-(0jMEQpW)hh^SMLF%Q*)hud!0Vx_Bws0 zP<>596DtD)Aks6lFt9MPFfuSQ)-|xyH8NB{liB_!j)}vOS(fYhboK>ImP}mFHybJ} z<(e+Cnn{PzX}Tkj+U~HL>4*rkEPv#5_5(~N?2-IW`0w$b1*$9O+P?D?(*hPYR%S*< zey8d2=b4r=%W||%XTJb6ilY^%#F>N1%4zzCn@oBXl$`xB_&m~;C2mrNE+Mo!Z|zGgDt{_G`_+_cRs3(Q$I zJ1A`7hSiw75)|cHJb$u^7tLKm^l~}83h#?6=60TTCnC9LpT4Ub1NfDD^mkKBU2+oOG_gIBV%0yOI;&F1vHuMf8v-p9GPXfMW(YaV6xn7sBndA z`twyxI@=vqGaV6Omf??|&VGQ&WV`JFrW&s8+fOkqVwt{REfd@H`14FlnPoT*PG`RW z*4M}}{ooCz56p&EcGExHWYXLI=q8gA8?y}O`swTsn2fjEJYcfqoa~@rGrjaBlg0Mu zFPUVgaWL_JW#IqK|8=wAftUQ#-}f`KZvWNK%;f--Si!)5g@46nL5Df~qFPKG42q0` cij0bIpO~^t-+P}~oz+6u(1dUL#QV(R09l({n*aa+ diff --git a/front/package-lock.json b/front/package-lock.json index 2d41a28b5..58d710878 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -1,17 +1,18 @@ { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "dependencies": { "@fullcalendar/core": "^6.1.8", "@fullcalendar/daygrid": "^6.1.8", "@fullcalendar/interaction": "^6.1.8", "@fullcalendar/list": "^6.1.8", + "@fullcalendar/multimonth": "^6.1.9", "@fullcalendar/timegrid": "^6.1.8", "@fullcalendar/vue3": "^6.1.8", "@mdi/font": "7.0.96", @@ -2695,19 +2696,19 @@ "dev": true }, "node_modules/@fullcalendar/core": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.8.tgz", - "integrity": "sha512-i8JBIvZCWGO9dsMEDcx9bnsQZ9PtGSJdOXGgWbhLaGq2iq41OBdp9g9gM4b/Otv2oK8bL5Gl6CsMmb/HkDtA6Q==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.9.tgz", + "integrity": "sha512-eeG+z9BWerdsU9Ac6j16rpYpPnE0wxtnEHiHrh/u/ADbGTR3hCOjCD9PxQOfhOTHbWOVs7JQunGcksSPu5WZBQ==", "dependencies": { "preact": "~10.12.1" } }, "node_modules/@fullcalendar/daygrid": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.8.tgz", - "integrity": "sha512-kCZxQFKb9Vqa3CZRX0v7rMSJ2mlTt4gDpyLfiNJKxUAq7W51uKurPaFZWicaXy1ESHVBxKNlbx5uNjBpyu50JQ==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz", + "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==", "peerDependencies": { - "@fullcalendar/core": "~6.1.8" + "@fullcalendar/core": "~6.1.9" } }, "node_modules/@fullcalendar/interaction": { @@ -2726,6 +2727,17 @@ "@fullcalendar/core": "~6.1.8" } }, + "node_modules/@fullcalendar/multimonth": { + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/multimonth/-/multimonth-6.1.9.tgz", + "integrity": "sha512-YpH1NL6RzdM1wO2nFJ3pNMo9xhd6i2WuE+e7SnGi7q1lO+ZZ77h5Fja5JKcpuIQUFHpi+m6vTzihIV8DT44NnQ==", + "dependencies": { + "@fullcalendar/daygrid": "~6.1.9" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.9" + } + }, "node_modules/@fullcalendar/timegrid": { "version": "6.1.8", "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.8.tgz", diff --git a/front/package.json b/front/package.json index a74da2078..c2a2ec82a 100644 --- a/front/package.json +++ b/front/package.json @@ -1,6 +1,6 @@ { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "scripts": { "dev": "vite", "build": "vite build", @@ -14,6 +14,7 @@ "@fullcalendar/daygrid": "^6.1.8", "@fullcalendar/interaction": "^6.1.8", "@fullcalendar/list": "^6.1.8", + "@fullcalendar/multimonth": "^6.1.9", "@fullcalendar/timegrid": "^6.1.8", "@fullcalendar/vue3": "^6.1.8", "@mdi/font": "7.0.96", diff --git a/front/src/components/UI/Calendar.vue b/front/src/components/UI/Calendar.vue index bd7529c18..9c0b50ffe 100644 --- a/front/src/components/UI/Calendar.vue +++ b/front/src/components/UI/Calendar.vue @@ -11,6 +11,8 @@ import interactionPlugin from '@fullcalendar/interaction' import listPlugin from '@fullcalendar/list' import timeGridPlugin from '@fullcalendar/interaction' import { axiosApiInstance } from '@/utils/axios-api' +import multiMonthPlugin from '@fullcalendar/multimonth' + export default { name: 'Calendar', @@ -22,25 +24,51 @@ export default { setup() { const calendarOptions = reactive({ - plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ], + plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ], initialView: 'dayGridMonth', + locale: 'ru', buttonText: { today: 'Сегодня', month: 'Месяц', week: 'Неделя', day: 'День', - list: 'Список' + list: 'Список', + year: 'Год' }, firstDay:'1', events: [], editable: true, headerToolbar: { - left: 'prev, next, today', + left: 'prev next today multiMonthYear', center: 'title', - right: 'dayGridMonth, dayGridWeek, dayGridDay, listDay' + right: 'dayGridMonth listDay listYear' }, - + multiMonthMaxColumns: 2, + buttonIcons: { + prev:'chevron-left', + }, + displayEventEnd: 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); } @@ -53,12 +81,10 @@ export default { for (let x in data.data) { data.data[x].map(e=>{ - let d = new Date(e.planned_date) - - - + 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({title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]}) + } ) @@ -84,31 +110,40 @@ export default { \ No newline at end of file diff --git a/front/src/components/carousel-list.vue b/front/src/components/carousel-list.vue index 74d7ecbfc..baf6c152a 100644 --- a/front/src/components/carousel-list.vue +++ b/front/src/components/carousel-list.vue @@ -2,7 +2,7 @@ - + > --> {{n.status}} @@ -45,7 +45,7 @@ - + @@ -82,7 +82,7 @@ export default {