Merge branch 'razrab'
This commit is contained in:
commit
193ee4ad00
12 files changed
+253
-86
No files matched your search
BIN
Binary file not shown.
Generated
+21
-9
@@ -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",
|
||||
|
||||
+2
-1
@@ -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",
|
||||
|
||||
@@ -3,13 +3,16 @@
|
||||
</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'
|
||||
import multiMonthPlugin from '@fullcalendar/multimonth'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'Calendar',
|
||||
@@ -19,27 +22,87 @@ export default {
|
||||
},
|
||||
|
||||
setup() {
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
|
||||
initialView: 'dayGridMonth',
|
||||
|
||||
|
||||
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'
|
||||
},
|
||||
|
||||
dateClick: (arg) => {
|
||||
console.log(arg.date);
|
||||
}
|
||||
})
|
||||
locale: 'ru',
|
||||
buttonText: {
|
||||
today: 'Сегодня',
|
||||
month: 'Месяц',
|
||||
week: 'Неделя',
|
||||
day: 'День',
|
||||
list: 'Список',
|
||||
year: 'Год'
|
||||
},
|
||||
firstDay:'1',
|
||||
events: [],
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev next today multiMonthYear',
|
||||
center: 'title',
|
||||
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);
|
||||
}
|
||||
})
|
||||
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||
.then(data => {
|
||||
|
||||
for (let x in data.data) {
|
||||
|
||||
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]})
|
||||
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
console.log(data.data , 'genvacation--------------------');
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
f_generalvacation()
|
||||
|
||||
|
||||
})
|
||||
// genvacation.value[0].planned_date
|
||||
|
||||
|
||||
|
||||
return { calendarOptions }
|
||||
}
|
||||
@@ -47,31 +110,40 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.red {
|
||||
background: rgb(235, 77, 77) !important;
|
||||
color: whitesmoke !important;
|
||||
}
|
||||
.blue {
|
||||
background: rgb(59, 59, 163) !important;
|
||||
color: whitesmoke !important;
|
||||
}
|
||||
.orange {
|
||||
background: orange !important;
|
||||
color: white !important;
|
||||
}
|
||||
.green {
|
||||
background: rgb(49, 155, 49) !important;
|
||||
color: white !important;
|
||||
}
|
||||
.blue,
|
||||
.orange,
|
||||
.red,
|
||||
.green {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.event-item {
|
||||
padding: 2px 0 2px 4px !important;
|
||||
}
|
||||
#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: 1.2em;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.fc .fc-daygrid-day-events {
|
||||
margin-top: -7px;
|
||||
}
|
||||
.fc {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<v-carousel
|
||||
cover
|
||||
height="500"
|
||||
height="350"
|
||||
hide-delimiters
|
||||
hide-delimiter-background
|
||||
show-arrows="hover"
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
elevation="0"
|
||||
|
||||
>
|
||||
<v-img
|
||||
<!-- <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 my-2 py-0 text-overline font-weight-bold">
|
||||
{{n.status}}
|
||||
@@ -45,7 +45,7 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-img>
|
||||
<!-- </v-img> -->
|
||||
</v-card>
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
<style>
|
||||
.numstyle {
|
||||
font-size: 2.875rem!important;
|
||||
line-height: 0.25rem!important;
|
||||
line-height: 2.5rem!important;
|
||||
font-family: cursive !important;
|
||||
background: #ffffffb0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-container class="py-1 newsVH bg-transparent overflow-auto">
|
||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
||||
<v-card
|
||||
class="mx-auto mb-0 "
|
||||
v-for="(x, i) in newss" :key= i
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
<router-view
|
||||
/>
|
||||
<div class="mystat d-flex flex-column">
|
||||
<!-- <div class="mystat d-flex flex-column">
|
||||
<v-btn
|
||||
class="mb-1"
|
||||
prepend-icon="mdi-wikipedia"
|
||||
@@ -219,7 +219,7 @@
|
||||
>
|
||||
МС
|
||||
</v-btn>
|
||||
</div>
|
||||
</div> -->
|
||||
</v-main>
|
||||
<v-navigation-drawer
|
||||
v-if="accountStore.cod2user"
|
||||
|
||||
@@ -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/>
|
||||
@@ -97,6 +97,7 @@
|
||||
/> -->
|
||||
<!-- </v-locale-provider> -->
|
||||
</v-col>
|
||||
|
||||
<!-- <v-col>
|
||||
<v-btn
|
||||
@click="proba">
|
||||
@@ -107,7 +108,71 @@
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col class="flex-column d-flex px-0">
|
||||
<v-row class="flex-grow-1 ma-0">
|
||||
<v-col class="pt-0">
|
||||
<v-card class="h-100 flex-column">
|
||||
<v-row v-for="x in stat" :key="x">
|
||||
<v-col>
|
||||
<v-card
|
||||
|
||||
class="ma-2 d-flex flex-column"
|
||||
height="100"
|
||||
|
||||
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'/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<!-- </v-img> -->
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-divider/>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 ma-0">
|
||||
<v-col class="py-0">
|
||||
<v-card class="h-100 flex-colmn"
|
||||
>
|
||||
<v-row class="ma-3">
|
||||
<v-col
|
||||
v-for="x in 6"
|
||||
:key="x"
|
||||
lg=6
|
||||
class="pa-1"
|
||||
>
|
||||
<v-btn
|
||||
|
||||
prepend-icon="mdi-wikipedia"
|
||||
block
|
||||
variant="outlined"
|
||||
class="ma-1"
|
||||
>
|
||||
Wiki
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
<v-col class="d-flex flex-column justify-space-between px-0 py-2 pb-0" lg=3>
|
||||
<v-card
|
||||
class="h-100 bg-transparent "
|
||||
@@ -140,7 +205,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 +214,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 +257,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,
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,13 +285,13 @@
|
||||
}
|
||||
|
||||
.hicard {
|
||||
height: 40%!important;
|
||||
overflow: auto;
|
||||
height: 40%!important;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fg {
|
||||
height: 240px;
|
||||
overflow: auto;
|
||||
height: 240px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,8 @@
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
|
||||
class GeneralVacationSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = GeneralVacation
|
||||
fields ='__all__'
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'),
|
||||
]
|
||||
@@ -1,3 +1,17 @@
|
||||
from django.shortcuts import render
|
||||
from rest_framework.response import Response
|
||||
import datetime
|
||||
from .serializers import *
|
||||
from .models import *
|
||||
|
||||
# Create your views here.
|
||||
from rest_framework.views import APIView
|
||||
|
||||
class GeneralVacationAPIView(APIView):
|
||||
def get(self, request):
|
||||
general = GeneralVacation.objects.all()
|
||||
|
||||
# Сериализуем извлечённый набор записей
|
||||
serializer_for_basecrit = GeneralVacationSerializer(
|
||||
instance=general, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
return Response({"Отпуск": serializer_for_basecrit.data})
|
||||
Reference in new issue
Block a user