This commit is contained in:
iriska-gri committed 2023-10-16 09:28:31 +03:00
1 parent c3a896e7f6
commit 506e657cbe
8 files changed
+62 -25

No files matched your search

BIN
View File
Binary file not shown.
-13
View File
@@ -118,20 +118,7 @@ export default {
.then(data => { .then(data => {
for (let x in data.data) { for (let x in data.data) {
// if (x =="Отпуск") {
// data.data[x].map(e=>{
// let d = new Date(e.planned_date)
// calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]})
// }
// )
// }
if (x=="План-график") { if (x=="План-график") {
data.data[x].map(e=>{ data.data[x].map(e=>{
+6 -1
View File
@@ -324,7 +324,12 @@ export default {
{ {
name: 'Структура', name: 'Структура',
ico: 'mdi-source-branch', ico: 'mdi-source-branch',
path: "/structure" submenu: [
{
name: 'ОКиБ',
path: "/okib"
},
]
}, },
{ {
name: 'Сотрудники', name: 'Сотрудники',
+5 -4
View File
@@ -14,12 +14,13 @@ const routes = [
title:"Портал МиФНС по ЦОД №2" title:"Портал МиФНС по ЦОД №2"
} }
}, },
{ {
path: '/structure', path: '/okib',
name: 'StructurePage', name: 'OKiBPage',
component: () => import('@/views/StructurePage.vue'), component: () => import('@/views/nested_view/o_OKiB.vue'),
meta:{ meta:{
title:"Структура" title:"Отдел кадров и безопасности"
} }
}, },
{ {
+2 -6
View File
@@ -73,15 +73,11 @@ setup(){
pagecounter() pagecounter()
const visiting = ref({}) const visiting = ref({})
const desserts = [
{
name: 'Frozen Yogurt',
calories: 159,
},]
getfromserver(`api/watcher/counter/`, visiting) getfromserver(`api/watcher/counter/`, visiting)
return {desserts, return {
visiting visiting
} }
} }
+37
View File
@@ -0,0 +1,37 @@
<template>
<v-row>
<v-col
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
>
<v-btn
@click="excelOp">
Excel
</v-btn>
</v-col>
</v-row>
</template>
<script>
import { ref } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
export default {
setup(){
const visiting = ref({})
const excelOp = () => {
getfromserver(`api/general_vacation/dailyroundup/`, visiting)
}
return {
visiting,
excelOp
}
}
}
</script>
<style>
</style>
+1
View File
@@ -4,4 +4,5 @@ from .views import *
urlpatterns = [ urlpatterns = [
path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'), path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'),
path('dailyroundup/', DailyRoundUpAPIView.as_view(), name='dailyroundup'),
] ]
+11 -1
View File
@@ -2,8 +2,9 @@ from rest_framework.response import Response
import datetime import datetime
from .serializers import * from .serializers import *
from .models import * from .models import *
import pandas as pd
from rest_framework.views import APIView from rest_framework.views import APIView
from userauth.models import *
class GeneralVacationAPIView(APIView): class GeneralVacationAPIView(APIView):
def get(self, request): def get(self, request):
@@ -21,3 +22,12 @@ class GeneralVacationAPIView(APIView):
many=True # Указываем, что на вход подаётся именно набор записей many=True # Указываем, что на вход подаётся именно набор записей
) )
return Response({"Отпуск": serializer_for_basecrit.data, "План-график": serializer_for_plan.data}) return Response({"Отпуск": serializer_for_basecrit.data, "План-график": serializer_for_plan.data})
class DailyRoundUpAPIView(APIView):
def get(self, request):
user = DictEmployee.objects.using('user_directory').values('login', 'fio')
df = pd.DataFrame.from_records(user)
print(df)
return Response('user')