Сохранить
This commit is contained in:
1 parent
fc20f36a1d
commit
9e8f71d0fd
6 files changed
+80
-20
No files matched your search
BIN
Binary file not shown.
@@ -24,7 +24,7 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<!-- <my-helper :pretext = 'x'/> -->
|
<!-- -->
|
||||||
<v-container
|
<v-container
|
||||||
fill-height
|
fill-height
|
||||||
fluid
|
fluid
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ import OnlineUsers from '@/components/onlineUsers.vue'
|
|||||||
import CardUsers from '@/components/cardUsers.vue'
|
import CardUsers from '@/components/cardUsers.vue'
|
||||||
import CardLike from '@/components/cardLike.vue'
|
import CardLike from '@/components/cardLike.vue'
|
||||||
import { pagecounter } from '@/utils/universal_functions'
|
import { pagecounter } from '@/utils/universal_functions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: { AuthForm, OnlineUsers, CardUsers, CardLike },
|
components: { AuthForm, OnlineUsers, CardUsers, CardLike },
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ export function getfromserver(path, reactive){
|
|||||||
|
|
||||||
|
|
||||||
export function checkremote(filecheck){
|
export function checkremote(filecheck){
|
||||||
return filecheck
|
return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
||||||
|
// return filecheck
|
||||||
// try{
|
// try{
|
||||||
// let http = new XMLHttpRequest();
|
// let http = new XMLHttpRequest();
|
||||||
// http.open('HEAD', filecheck, false);
|
// http.open('HEAD', filecheck, false);
|
||||||
|
|||||||
@@ -51,13 +51,13 @@
|
|||||||
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
|
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
|
||||||
<v-row class="flex-grow-1 ma-0 mx-1">
|
<v-row class="flex-grow-1 ma-0 mx-1">
|
||||||
<v-col class="pt-0">
|
<v-col class="pt-0">
|
||||||
|
{{[t_daily.daily]}}
|
||||||
<v-card v-if="t_daily.length > 0" class="h-100 flex-column">
|
<v-card v-if="t_daily.length > 0" class="h-100 flex-column" >
|
||||||
|
|
||||||
<v-row v-for="x in t_daily" :key="x">
|
<v-row v-for="x in t_daily" :key="x" v-show="x.position!=6">
|
||||||
|
|
||||||
<v-col>
|
<v-col >
|
||||||
<v-card
|
<v-card
|
||||||
|
|
||||||
class="ma-2 d-flex flex-column"
|
class="ma-2 d-flex flex-column"
|
||||||
height="100"
|
height="100"
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
elevation="0"
|
elevation="0"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-card class="h-100 text-center g text-numeral bg-back_number_carousel">
|
<v-card class="h-100 text-center g text-numeral bg-back_number_carousel">
|
||||||
<v-card-title class="statstyle py-0 text-overline font-weight-bold bg-back_number_carousel">
|
<v-card-title class="statstyle py-0 text-overline font-weight-bold bg-back_number_carousel">
|
||||||
{{x.position__name}}
|
{{x.position__name}}
|
||||||
@@ -150,7 +150,54 @@
|
|||||||
v-model="dialogDetailRound"
|
v-model="dialogDetailRound"
|
||||||
width="500"
|
width="500"
|
||||||
>
|
>
|
||||||
<v-card class="pa-5">
|
<v-card class="bg-white pa-3 px-0" width="450"
|
||||||
|
height="500">
|
||||||
|
<v-card
|
||||||
|
class="mx-auto overflow-auto mx-0 px-3"
|
||||||
|
width="450"
|
||||||
|
height="500"
|
||||||
|
flat
|
||||||
|
>
|
||||||
|
<my-helper :pretext='t_dailyRound'/>
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<v-toolbar color="cyan-lighten-1">
|
||||||
|
<v-btn variant="text" icon="mdi-menu"></v-btn>
|
||||||
|
|
||||||
|
<v-toolbar-title>Inbox</v-toolbar-title>
|
||||||
|
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
|
<v-btn variant="text" icon="mdi-magnify"></v-btn>
|
||||||
|
</v-toolbar>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-for="(x, key) in t_dailyRound"
|
||||||
|
:key="key"
|
||||||
|
class="px-3" >
|
||||||
|
|
||||||
|
<v-list>
|
||||||
|
<v-list-subheader>{{key}} </v-list-subheader>
|
||||||
|
</v-list>
|
||||||
|
|
||||||
|
<v-card
|
||||||
|
v-for="item in x"
|
||||||
|
:key="item"
|
||||||
|
class="bg-transparent"
|
||||||
|
density="compact"
|
||||||
|
:prepend-avatar="checkremote(`${spravURL}${item.login}.jpg`)"
|
||||||
|
:title="item.fio"
|
||||||
|
:subtitle="item.post"
|
||||||
|
variant="text" @click="getcard"
|
||||||
|
>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
</v-card>
|
||||||
|
<!-- <v-card class="pa-5">
|
||||||
<v-divider class="my-6"/>
|
<v-divider class="my-6"/>
|
||||||
<v-table
|
<v-table
|
||||||
v-for="(x, key) in t_dailyRound"
|
v-for="(x, key) in t_dailyRound"
|
||||||
@@ -177,7 +224,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
<v-divider class="my-6"/>
|
<v-divider class="my-6"/>
|
||||||
</v-table>
|
</v-table>
|
||||||
</v-card>
|
</v-card> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -198,6 +245,8 @@
|
|||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
import CalendarFull from '@/components/UI/Calendar-full.vue'
|
import CalendarFull from '@/components/UI/Calendar-full.vue'
|
||||||
import NewsListHome from '@/components/news-list-home.vue'
|
import NewsListHome from '@/components/news-list-home.vue'
|
||||||
|
import { spravURL } from '@/utils/axios-api'
|
||||||
|
import {checkremote} from '@/utils/universal_functions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
@@ -243,8 +292,8 @@
|
|||||||
function dailyfun(){
|
function dailyfun(){
|
||||||
axiosApiInstance.get('api/general_vacation/dailyload/')
|
axiosApiInstance.get('api/general_vacation/dailyload/')
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
// console.log();
|
||||||
t_daily.value = data.data
|
t_daily.value = data.data.daily
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,7 +301,7 @@
|
|||||||
dialogDetailRound.value=!dialogDetailRound.value
|
dialogDetailRound.value=!dialogDetailRound.value
|
||||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`)
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|
||||||
t_dailyRound.value = data.data
|
t_dailyRound.value = data.data
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -266,7 +315,9 @@
|
|||||||
t_daily,
|
t_daily,
|
||||||
t_dailyRound,
|
t_dailyRound,
|
||||||
detailRound,
|
detailRound,
|
||||||
dialogDetailRound
|
dialogDetailRound,
|
||||||
|
checkremote,
|
||||||
|
spravURL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,8 +212,9 @@ class DailyRoundUpAPIView(APIView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'id')
|
user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'id')
|
||||||
dfuser = pd.DataFrame.from_records(user)
|
dfuser = pd.DataFrame.from_records(user)
|
||||||
# print(dfuser)
|
|
||||||
try:
|
try:
|
||||||
|
print(request.data['dailyfiles'], '============================================')
|
||||||
file = request.data['dailyfiles']
|
file = request.data['dailyfiles']
|
||||||
ed = pd.read_excel(file)
|
ed = pd.read_excel(file)
|
||||||
df = pd.DataFrame(ed)
|
df = pd.DataFrame(ed)
|
||||||
@@ -257,6 +258,7 @@ class DailyRoundUpAPIView(APIView):
|
|||||||
base=BasePosition.objects.get(pk=keys)
|
base=BasePosition.objects.get(pk=keys)
|
||||||
DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
|
DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
|
||||||
user=df3['login'][ind], defaults={'position':base})
|
user=df3['login'][ind], defaults={'position':base})
|
||||||
|
print(df3, '-----------------------')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
err = 'Файл не найден'
|
err = 'Файл не найден'
|
||||||
|
|
||||||
@@ -276,18 +278,23 @@ class DailyloadAPIView(APIView):
|
|||||||
|
|
||||||
if request.GET.__contains__('id'):
|
if request.GET.__contains__('id'):
|
||||||
|
|
||||||
daily = DailyRoundUp.objects.filter(position=request.GET.get("id"),todaysDate=date.today()).values_list('user')
|
daily = DailyRoundUp.objects.filter(position=request.GET.get("id"),todaysDate=date.today()).values_list('user', 'position__name')
|
||||||
|
print(daily,'0000000000000000000000000000000000000000000000000000000000000000000000000000000')
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
|
# base=BasePosition.objects.get(pk=keys)
|
||||||
|
|
||||||
u=DictEmployee.objects.using('user_directory').filter(login__in=[x[0] for x in daily])
|
u=DictEmployee.objects.using('user_directory').filter(login__in=[x[0] for x in daily])
|
||||||
for x in u:
|
for x in u:
|
||||||
|
|
||||||
if x.department in result.keys():
|
if x.department in result.keys():
|
||||||
result[x.department].append({'login':x.login,'fio':x.fio})
|
result[x.department].append({'login':x.login,'fio':x.fio, 'post':x.post})
|
||||||
else:
|
else:
|
||||||
result[x.department]=[{'login':x.login,'fio':x.fio}]
|
result[x.department]=[{'login':x.login,'fio':x.fio, 'post':x.post}]
|
||||||
|
# result['position'] = request.GET.get("id")
|
||||||
daily = result
|
daily = result
|
||||||
else:
|
else:
|
||||||
daily = DailyRoundUp.objects.values('position__name', 'position').filter(todaysDate=date.today()).annotate(Count('user'))
|
daily = DailyRoundUp.objects.values('position__name', 'position').filter(todaysDate=date.today()).annotate(Count('user'))
|
||||||
|
|
||||||
return Response(daily)
|
# return Response(daily)
|
||||||
|
return Response({'daily':daily, 'position':request.GET.get("id")})
|
||||||
Reference in new issue
Block a user