Excel
This commit is contained in:
1 parent
c3a896e7f6
commit
506e657cbe
8 files changed
+62
-25
No files matched your search
BIN
Binary file not shown.
@@ -118,20 +118,7 @@ export default {
|
||||
.then(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=="План-график") {
|
||||
data.data[x].map(e=>{
|
||||
|
||||
|
||||
@@ -324,7 +324,12 @@ export default {
|
||||
{
|
||||
name: 'Структура',
|
||||
ico: 'mdi-source-branch',
|
||||
path: "/structure"
|
||||
submenu: [
|
||||
{
|
||||
name: 'ОКиБ',
|
||||
path: "/okib"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Сотрудники',
|
||||
|
||||
@@ -14,12 +14,13 @@ const routes = [
|
||||
title:"Портал МиФНС по ЦОД №2"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: '/structure',
|
||||
name: 'StructurePage',
|
||||
component: () => import('@/views/StructurePage.vue'),
|
||||
path: '/okib',
|
||||
name: 'OKiBPage',
|
||||
component: () => import('@/views/nested_view/o_OKiB.vue'),
|
||||
meta:{
|
||||
title:"Структура"
|
||||
title:"Отдел кадров и безопасности"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -73,15 +73,11 @@ setup(){
|
||||
pagecounter()
|
||||
const visiting = ref({})
|
||||
|
||||
const desserts = [
|
||||
{
|
||||
name: 'Frozen Yogurt',
|
||||
calories: 159,
|
||||
},]
|
||||
|
||||
|
||||
getfromserver(`api/watcher/counter/`, visiting)
|
||||
|
||||
return {desserts,
|
||||
return {
|
||||
visiting
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -4,4 +4,5 @@ from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'),
|
||||
path('dailyroundup/', DailyRoundUpAPIView.as_view(), name='dailyroundup'),
|
||||
]
|
||||
@@ -2,8 +2,9 @@ from rest_framework.response import Response
|
||||
import datetime
|
||||
from .serializers import *
|
||||
from .models import *
|
||||
|
||||
import pandas as pd
|
||||
from rest_framework.views import APIView
|
||||
from userauth.models import *
|
||||
|
||||
class GeneralVacationAPIView(APIView):
|
||||
def get(self, request):
|
||||
@@ -21,3 +22,12 @@ class GeneralVacationAPIView(APIView):
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
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')
|
||||
Reference in new issue
Block a user