Merge branch 'razrab'
This commit is contained in:
commit
193ee4ad00
12 files changed
+249
-82
No files matched your search
BIN
Binary file not shown.
Generated
+21
-9
@@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullcalendar/core": "^6.1.8",
|
"@fullcalendar/core": "^6.1.8",
|
||||||
"@fullcalendar/daygrid": "^6.1.8",
|
"@fullcalendar/daygrid": "^6.1.8",
|
||||||
"@fullcalendar/interaction": "^6.1.8",
|
"@fullcalendar/interaction": "^6.1.8",
|
||||||
"@fullcalendar/list": "^6.1.8",
|
"@fullcalendar/list": "^6.1.8",
|
||||||
|
"@fullcalendar/multimonth": "^6.1.9",
|
||||||
"@fullcalendar/timegrid": "^6.1.8",
|
"@fullcalendar/timegrid": "^6.1.8",
|
||||||
"@fullcalendar/vue3": "^6.1.8",
|
"@fullcalendar/vue3": "^6.1.8",
|
||||||
"@mdi/font": "7.0.96",
|
"@mdi/font": "7.0.96",
|
||||||
@@ -2695,19 +2696,19 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@fullcalendar/core": {
|
"node_modules/@fullcalendar/core": {
|
||||||
"version": "6.1.8",
|
"version": "6.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.9.tgz",
|
||||||
"integrity": "sha512-i8JBIvZCWGO9dsMEDcx9bnsQZ9PtGSJdOXGgWbhLaGq2iq41OBdp9g9gM4b/Otv2oK8bL5Gl6CsMmb/HkDtA6Q==",
|
"integrity": "sha512-eeG+z9BWerdsU9Ac6j16rpYpPnE0wxtnEHiHrh/u/ADbGTR3hCOjCD9PxQOfhOTHbWOVs7JQunGcksSPu5WZBQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"preact": "~10.12.1"
|
"preact": "~10.12.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fullcalendar/daygrid": {
|
"node_modules/@fullcalendar/daygrid": {
|
||||||
"version": "6.1.8",
|
"version": "6.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz",
|
||||||
"integrity": "sha512-kCZxQFKb9Vqa3CZRX0v7rMSJ2mlTt4gDpyLfiNJKxUAq7W51uKurPaFZWicaXy1ESHVBxKNlbx5uNjBpyu50JQ==",
|
"integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@fullcalendar/core": "~6.1.8"
|
"@fullcalendar/core": "~6.1.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@fullcalendar/interaction": {
|
"node_modules/@fullcalendar/interaction": {
|
||||||
@@ -2726,6 +2727,17 @@
|
|||||||
"@fullcalendar/core": "~6.1.8"
|
"@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": {
|
"node_modules/@fullcalendar/timegrid": {
|
||||||
"version": "6.1.8",
|
"version": "6.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.8.tgz",
|
||||||
|
|||||||
+2
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
"@fullcalendar/daygrid": "^6.1.8",
|
"@fullcalendar/daygrid": "^6.1.8",
|
||||||
"@fullcalendar/interaction": "^6.1.8",
|
"@fullcalendar/interaction": "^6.1.8",
|
||||||
"@fullcalendar/list": "^6.1.8",
|
"@fullcalendar/list": "^6.1.8",
|
||||||
|
"@fullcalendar/multimonth": "^6.1.9",
|
||||||
"@fullcalendar/timegrid": "^6.1.8",
|
"@fullcalendar/timegrid": "^6.1.8",
|
||||||
"@fullcalendar/vue3": "^6.1.8",
|
"@fullcalendar/vue3": "^6.1.8",
|
||||||
"@mdi/font": "7.0.96",
|
"@mdi/font": "7.0.96",
|
||||||
|
|||||||
@@ -3,13 +3,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {reactive} from 'vue'
|
import {reactive, ref, onMounted} from 'vue'
|
||||||
// import '@fullcalendar/core/vdom'
|
// import '@fullcalendar/core/vdom'
|
||||||
import FullCalendar from '@fullcalendar/vue3'
|
import FullCalendar from '@fullcalendar/vue3'
|
||||||
import dayGridPlugin from '@fullcalendar/daygrid'
|
import dayGridPlugin from '@fullcalendar/daygrid'
|
||||||
import interactionPlugin from '@fullcalendar/interaction'
|
import interactionPlugin from '@fullcalendar/interaction'
|
||||||
import listPlugin from '@fullcalendar/list'
|
import listPlugin from '@fullcalendar/list'
|
||||||
import timeGridPlugin from '@fullcalendar/interaction'
|
import timeGridPlugin from '@fullcalendar/interaction'
|
||||||
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
|
import multiMonthPlugin from '@fullcalendar/multimonth'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Calendar',
|
name: 'Calendar',
|
||||||
@@ -20,26 +23,86 @@ export default {
|
|||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
|
const calendarOptions = reactive({
|
||||||
|
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
|
||||||
|
initialView: 'dayGridMonth',
|
||||||
|
|
||||||
const calendarOptions = reactive({
|
locale: 'ru',
|
||||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin ],
|
buttonText: {
|
||||||
initialView: 'dayGridMonth',
|
today: 'Сегодня',
|
||||||
locale: 'ru',
|
month: 'Месяц',
|
||||||
events: [
|
week: 'Неделя',
|
||||||
{ title: 'event 1', date: '2023-09-21' },
|
day: 'День',
|
||||||
{ title: 'event 2', date: '2023-09-22' },
|
list: 'Список',
|
||||||
],
|
year: 'Год'
|
||||||
editable: true,
|
},
|
||||||
headerToolbar: {
|
firstDay:'1',
|
||||||
left: 'prev, next, today',
|
events: [],
|
||||||
center: 'title',
|
editable: true,
|
||||||
right: 'dayGridMonth, dayGridWeek, listDay'
|
headerToolbar: {
|
||||||
},
|
left: 'prev next today multiMonthYear',
|
||||||
|
center: 'title',
|
||||||
|
right: 'dayGridMonth listDay listYear'
|
||||||
|
},
|
||||||
|
multiMonthMaxColumns: 2,
|
||||||
|
buttonIcons: {
|
||||||
|
prev:'chevron-left',
|
||||||
|
},
|
||||||
|
displayEventEnd: true,
|
||||||
|
|
||||||
dateClick: (arg) => {
|
|
||||||
console.log(arg.date);
|
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 }
|
return { calendarOptions }
|
||||||
}
|
}
|
||||||
@@ -47,31 +110,40 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.red {
|
#fc-dom-1:first-letter {
|
||||||
background: rgb(235, 77, 77) !important;
|
text-transform: capitalize;
|
||||||
color: whitesmoke !important;
|
}
|
||||||
}
|
|
||||||
.blue {
|
.fc-toolbar {
|
||||||
background: rgb(59, 59, 163) !important;
|
padding: 0px;
|
||||||
color: whitesmoke !important;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
.orange {
|
.fc-day-header {
|
||||||
background: orange !important;
|
font-weight: bold;
|
||||||
color: white !important;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.green {
|
.fc-day {
|
||||||
background: rgb(49, 155, 49) !important;
|
border: none;
|
||||||
color: white !important;
|
}
|
||||||
}
|
.fc-time-grid-event {
|
||||||
.blue,
|
background-color: #e6e6e6;
|
||||||
.orange,
|
border: none;
|
||||||
.red,
|
color: #000;
|
||||||
.green {
|
}
|
||||||
font-size: 13px;
|
.fc-event-title {
|
||||||
font-weight: 500;
|
font-weight: bold;
|
||||||
text-transform: capitalize;
|
}
|
||||||
}
|
|
||||||
.event-item {
|
.fc .fc-toolbar.fc-header-toolbar {
|
||||||
padding: 2px 0 2px 4px !important;
|
padding-bottom: 1.2em;
|
||||||
}
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fc .fc-daygrid-day-events {
|
||||||
|
margin-top: -7px;
|
||||||
|
}
|
||||||
|
.fc {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<v-carousel
|
<v-carousel
|
||||||
cover
|
cover
|
||||||
height="500"
|
height="350"
|
||||||
hide-delimiters
|
hide-delimiters
|
||||||
hide-delimiter-background
|
hide-delimiter-background
|
||||||
show-arrows="hover"
|
show-arrows="hover"
|
||||||
|
|||||||
@@ -30,12 +30,12 @@
|
|||||||
elevation="0"
|
elevation="0"
|
||||||
|
|
||||||
>
|
>
|
||||||
<v-img
|
<!-- <v-img
|
||||||
height="100"
|
height="100"
|
||||||
:src="`${burl}${n.img}`"
|
:src="`${burl}${n.img}`"
|
||||||
cover
|
cover
|
||||||
class="text-white"
|
class="text-white"
|
||||||
>
|
> -->
|
||||||
<v-card class="h-100 text-center g text-numeral">
|
<v-card class="h-100 text-center g text-numeral">
|
||||||
<v-card-title class="statstyle my-2 py-0 text-overline font-weight-bold">
|
<v-card-title class="statstyle my-2 py-0 text-overline font-weight-bold">
|
||||||
{{n.status}}
|
{{n.status}}
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
</v-img>
|
<!-- </v-img> -->
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
<style>
|
<style>
|
||||||
.numstyle {
|
.numstyle {
|
||||||
font-size: 2.875rem!important;
|
font-size: 2.875rem!important;
|
||||||
line-height: 0.25rem!important;
|
line-height: 2.5rem!important;
|
||||||
font-family: cursive !important;
|
font-family: cursive !important;
|
||||||
background: #ffffffb0;
|
background: #ffffffb0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<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
|
<v-card
|
||||||
class="mx-auto mb-0 "
|
class="mx-auto mb-0 "
|
||||||
v-for="(x, i) in newss" :key= i
|
v-for="(x, i) in newss" :key= i
|
||||||
|
|||||||
@@ -201,7 +201,7 @@
|
|||||||
|
|
||||||
<router-view
|
<router-view
|
||||||
/>
|
/>
|
||||||
<div class="mystat d-flex flex-column">
|
<!-- <div class="mystat d-flex flex-column">
|
||||||
<v-btn
|
<v-btn
|
||||||
class="mb-1"
|
class="mb-1"
|
||||||
prepend-icon="mdi-wikipedia"
|
prepend-icon="mdi-wikipedia"
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
>
|
>
|
||||||
МС
|
МС
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div> -->
|
||||||
</v-main>
|
</v-main>
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
v-if="accountStore.cod2user"
|
v-if="accountStore.cod2user"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container fluid class="d-flex mx-0">
|
<v-container fluid class="d-flex mx-0">
|
||||||
<v-row>
|
<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-row class="flex-grow-0">
|
||||||
<v-col class="pr-0">
|
<v-col class="pr-0">
|
||||||
<Carousel-list/>
|
<Carousel-list/>
|
||||||
@@ -97,6 +97,7 @@
|
|||||||
/> -->
|
/> -->
|
||||||
<!-- </v-locale-provider> -->
|
<!-- </v-locale-provider> -->
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- <v-col>
|
<!-- <v-col>
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="proba">
|
@click="proba">
|
||||||
@@ -107,7 +108,71 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-col>
|
</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-col class="d-flex flex-column justify-space-between px-0 py-2 pb-0" lg=3>
|
||||||
<v-card
|
<v-card
|
||||||
class="h-100 bg-transparent "
|
class="h-100 bg-transparent "
|
||||||
@@ -140,7 +205,6 @@
|
|||||||
import CarouselList from '@/components/carousel-list.vue'
|
import CarouselList from '@/components/carousel-list.vue'
|
||||||
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import { VDatePicker } from 'vuetify/labs/VDatePicker'
|
|
||||||
import Calendar from '@/components/UI/calendar.vue'
|
import Calendar from '@/components/UI/calendar.vue'
|
||||||
|
|
||||||
|
|
||||||
@@ -150,13 +214,11 @@
|
|||||||
NewsList,
|
NewsList,
|
||||||
CarouselList,
|
CarouselList,
|
||||||
CarouselNumbers,
|
CarouselNumbers,
|
||||||
VDatePicker,
|
|
||||||
Calendar
|
Calendar
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
const t_baseCriteria = ref([])
|
const t_baseCriteria = ref([])
|
||||||
const date1 = ref(['2023-09-19', '2023-09-18', '2023-09-1'])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -195,24 +257,15 @@
|
|||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(data.data);
|
console.log(data.data);
|
||||||
t_baseCriteria.value = data.data.results
|
t_baseCriteria.value = data.data.results
|
||||||
|
|
||||||
// t_baseCriteria.value.map(e=>
|
|
||||||
// console.log(e,'e')
|
|
||||||
// // e.rating = e.get_criteria[0].rating
|
|
||||||
// )
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
||||||
accountStore,
|
accountStore,
|
||||||
stat,
|
stat,
|
||||||
model,
|
model,
|
||||||
onlines,
|
onlines,
|
||||||
appStore,
|
appStore,
|
||||||
proba,
|
proba,
|
||||||
date1,
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -232,13 +285,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hicard {
|
.hicard {
|
||||||
height: 40%!important;
|
height: 40%!important;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fg {
|
.fg {
|
||||||
height: 240px;
|
height: 240px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</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