Вывод на экран
This commit is contained in:
1 parent
e5f687eda8
commit
1d38024e88
5 files changed
+19
-8
No files matched your search
BIN
Binary file not shown.
@@ -229,4 +229,5 @@ display: flex;
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -53,7 +53,7 @@
|
||||
<v-col class="pt-0">
|
||||
<v-card class="h-100 flex-column">
|
||||
|
||||
<!-- <my-helper :pretext = 't_daily'/> -->
|
||||
<my-helper :pretext = 't_daily'/>
|
||||
<v-row v-for="x in stat" :key="x">
|
||||
|
||||
<v-col>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from datetime import datetime
|
||||
import os
|
||||
from django.forms import model_to_dict
|
||||
from openpyxl import load_workbook
|
||||
import openpyxl
|
||||
from rest_framework.response import Response
|
||||
@@ -270,12 +271,21 @@ class DailyRoundUpAPIView(APIView):
|
||||
class DailyloadAPIView(APIView):
|
||||
def get(self, request):
|
||||
daily = DailyRoundUp.objects.filter(todaysDate=datetime.now())
|
||||
print(daily, '-----------------------------')
|
||||
position = BasePosition.objects.all()
|
||||
print(position, '-------------')
|
||||
result = []
|
||||
n=1
|
||||
for x in daily:
|
||||
a=model_to_dict(x)
|
||||
# print(x.user, '------------', n)
|
||||
a['user'] = model_to_dict(DictEmployee.objects.using('user_directory').get(login=x.user))
|
||||
# print(x.user, '!!!!!!!!', n)
|
||||
n=n+1
|
||||
result.append(a)
|
||||
# print(a)
|
||||
# print(x.user,'222222222222222222')
|
||||
# user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'id')
|
||||
|
||||
#
|
||||
serializer_for_daily = DailyRoundUpSerializer(
|
||||
instance=daily, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
return Response(serializer_for_daily.data)
|
||||
|
||||
return Response({"Обход":result})
|
||||
# return Response({"Обход":serializer_for_daily})
|
||||
Binary file not shown.
Reference in new issue
Block a user