From 506e657cbe6aaa9c450cdba7cde151d2e1c5c615 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:28:31 +0300 Subject: [PATCH] Excel --- db.sqlite3 | Bin 360448 -> 368640 bytes front/src/components/UI/Calendar-full.vue | 13 ------- front/src/layouts/default/DefaultPortal.vue | 7 +++- front/src/router/index.js | 9 ++--- front/src/views/AboutPortalPage.vue | 8 ++--- front/src/views/nested_view/o_OKiB.vue | 37 ++++++++++++++++++++ general_vacation/urls.py | 1 + general_vacation/views.py | 12 ++++++- 8 files changed, 62 insertions(+), 25 deletions(-) create mode 100644 front/src/views/nested_view/o_OKiB.vue diff --git a/db.sqlite3 b/db.sqlite3 index 2023f8c6b8ec8def57fc225c01bf96b59dec88d4..0fe5e61de8ea2e60735c2834c7432c5119bccc7a 100644 GIT binary patch delta 2658 zcmeHJT}&KR6rOwLXa8rw2HGGbv#ivn2(z=uurokYrBEI;rPkU=2r;;@{B4aPDXAtb zKWRv#4@E6kQc=`Oq7Q~rnn4;VO-yXCHnT_(DiCa}jSuzbNepVeJ5(6J5PUId;=`P| z_nz;3_nf(BzM0n6Hksv^3g!*wDo*Hw zqi(iczTqsE|U42#A& zvaFNYC1W7gW_)Ul#@YyYxN%)vtiu@GN?e0VH(U0r5;qUDZdotTK1--r$J1WRyf&GZ zk@0S&&W2q9pgISlDG;9%vExNYu6@xyYHzm}+nu&+w%2S&Y$@D4_Z}DKGC7XD z%673&vpbks<{c))JWSuAuh6g3Wpon!1pV+bYa zj%r58Yw44%9~&*K_HJ4oNBPzgfyJF#%TeAnZqw_y*ZB{H@#P8F!CM)%8vOGNWFNND zq*rs4gea2ky5nY6Gx3Gun0QI+FjgY`YYcYc-WX)!vPjwdVOkx94&!GrkVBq)qu@s;7bbEM7u zigv)P28&bR(uc0YSp@2SlNmS6fRhg9m&8f&$*;i;TJbWtV46&V`{HalHouw`Q1XjR z)bVLJ0qWkBco+V2n&hhOG2{6B<;+Ngtg3~}sPY@&!avSHf!=omZXpQftk4oc3M>b1 zUkUW*24xd~qj!MCmuH~>G-(-CbPpBG3aDDPxdvhaK05~`_{==y&W;J^Yro&*%X!1sH8V~gm!-1Ce| z*P>Yp|8fhIsH{Zxu}#P-4O>>V)w5C>H;`=J@_$QX)EKs~G?cK-Yg5^r#j1A}n)+1M zx0c4@tb364t~v#x;udEuR=*?9O$p;~Z$n;&tkif}iM(VR`hKNxm1-Ql30_b_o#aj~ zT94jj+IqYD5ECt?#wp=5;iT~7f38k(aT4xRb#hxyp>h0+Z>%Xe3Fgn3rMvzDg#`+` delta 825 zcmZXSTSydP6vyW~bDy1=HBF&4Wml<8-JQKu&g|$`N;fd4HA^lhd}S*6d=PWS*X;366ZHV1X1ucVVr z2)klXgs+gmKqbZCm2udLD`TL^e2gkI#k_is(nO46kYRPkz>V;>NhrfTB!E$k2WG%y zFIXR@kLUH1I64gh-2NU|2%f-+IC!u;1yKlAB`?*BPsgPq&1$boe)APg1Juc8Nt$&-FHL;Mp?2u+4jeuPgn5ZG?>UtqAh6- zo*)SNQ<{PWQmAnON;fn_e-X?K@>Mfx5&E|`JUjtgAm~YX za;Bwf>TbVb7OhqD;5UmzUPt6syp1hHX%eA?AWXqq2*Wqpg>w^-hszUCo~9<$yUKUA bg8s$TGX~v27QKR6!b?C7ZH1SZtKGi=T)734 diff --git a/front/src/components/UI/Calendar-full.vue b/front/src/components/UI/Calendar-full.vue index 9d8080125..adbedeec5 100644 --- a/front/src/components/UI/Calendar-full.vue +++ b/front/src/components/UI/Calendar-full.vue @@ -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=>{ diff --git a/front/src/layouts/default/DefaultPortal.vue b/front/src/layouts/default/DefaultPortal.vue index 339fb53f8..f0b684c21 100644 --- a/front/src/layouts/default/DefaultPortal.vue +++ b/front/src/layouts/default/DefaultPortal.vue @@ -324,7 +324,12 @@ export default { { name: 'Структура', ico: 'mdi-source-branch', - path: "/structure" + submenu: [ + { + name: 'ОКиБ', + path: "/okib" + }, + ] }, { name: 'Сотрудники', diff --git a/front/src/router/index.js b/front/src/router/index.js index 7a4dbb057..8e36ccb96 100644 --- a/front/src/router/index.js +++ b/front/src/router/index.js @@ -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:"Отдел кадров и безопасности" } }, { diff --git a/front/src/views/AboutPortalPage.vue b/front/src/views/AboutPortalPage.vue index 36e3de291..0e6aa4a05 100644 --- a/front/src/views/AboutPortalPage.vue +++ b/front/src/views/AboutPortalPage.vue @@ -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 } } diff --git a/front/src/views/nested_view/o_OKiB.vue b/front/src/views/nested_view/o_OKiB.vue new file mode 100644 index 000000000..22fc6efb3 --- /dev/null +++ b/front/src/views/nested_view/o_OKiB.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/general_vacation/urls.py b/general_vacation/urls.py index cd8845de1..25473cf6b 100644 --- a/general_vacation/urls.py +++ b/general_vacation/urls.py @@ -4,4 +4,5 @@ from .views import * urlpatterns = [ path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'), + path('dailyroundup/', DailyRoundUpAPIView.as_view(), name='dailyroundup'), ] \ No newline at end of file diff --git a/general_vacation/views.py b/general_vacation/views.py index 904f04bb5..61230bb1e 100644 --- a/general_vacation/views.py +++ b/general_vacation/views.py @@ -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')