ler
This commit is contained in:
1 parent
1c07236ddf
commit
3853ca0d72
7 files changed
+130
-63
No files matched your search
Binary file not shown.
@@ -48,4 +48,9 @@ import {useAccountStore} from '@/store/AccountStore'
|
|||||||
.pointer {
|
.pointer {
|
||||||
cursor:pointer
|
cursor:pointer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bggrad {
|
||||||
|
background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8));
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -88,7 +88,7 @@ export default {
|
|||||||
const menuAuthDialog = ref(false)
|
const menuAuthDialog = ref(false)
|
||||||
|
|
||||||
const anon=reactive({
|
const anon=reactive({
|
||||||
username:"9966-00-125",
|
username:"9966-00-",
|
||||||
password:""
|
password:""
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
:to="'/'" />
|
:to="'/'" />
|
||||||
|
|
||||||
<template v-slot:image>
|
<template v-slot:image>
|
||||||
<v-img gradient="to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)" />
|
<v-img class="bggrad" />
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<template v-if="accountStore.cod2user">
|
<template v-if="accountStore.cod2user">
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ export function bgimage(filecheck){
|
|||||||
|
|
||||||
|
|
||||||
export function checkremote(filecheck){
|
export function checkremote(filecheck){
|
||||||
return "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
|
||||||
// return filecheck
|
return process.env.NODE_ENV == 'development'? "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg":filecheck
|
||||||
// try{
|
// try{
|
||||||
// let http = new XMLHttpRequest();
|
// let http = new XMLHttpRequest();
|
||||||
// http.open('HEAD', filecheck, false);
|
// http.open('HEAD', filecheck, false);
|
||||||
|
|||||||
@@ -85,18 +85,48 @@
|
|||||||
v-else class="h-100 d-flex justify-center"
|
v-else class="h-100 d-flex justify-center"
|
||||||
:image="imageLenta"
|
:image="imageLenta"
|
||||||
>
|
>
|
||||||
<v-card-text class="align-self-center flex-column">
|
<v-card-text class="align-self-center flex-column mt-8">
|
||||||
<v-file-input
|
<v-row>
|
||||||
v-bind="props"
|
<v-col>
|
||||||
accept=".xlsx"
|
<v-file-input
|
||||||
v-model="dailyfiles"
|
v-bind="props"
|
||||||
variant="underlined"
|
accept=".xlsx"
|
||||||
density="compact"
|
v-model="dailyfiles"
|
||||||
label="Выберите файл"
|
variant="underlined"
|
||||||
hide-details
|
density="compact"
|
||||||
|
label="Выберите файл"
|
||||||
|
hide-details
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row>
|
||||||
|
<v-col class="text-center">
|
||||||
|
<v-btn
|
||||||
|
icon="mdi-download"
|
||||||
|
size="x-large"
|
||||||
|
variant="text"
|
||||||
|
color="teal-darken-4"
|
||||||
|
:disabled="dailyfiles==0?true:false"
|
||||||
|
@click="onPickFile"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <v-icon
|
||||||
|
icon="mdi-download"
|
||||||
|
|
||||||
|
color="teal-darken-4"
|
||||||
|
/> -->
|
||||||
|
<!-- <v-btn
|
||||||
|
append-icon="mdi-note-plus"
|
||||||
|
size="small"
|
||||||
|
color="teal-darken-4"
|
||||||
|
variant="text"
|
||||||
|
v-bind="props"
|
||||||
|
>
|
||||||
|
Загрузить
|
||||||
|
</v-btn> -->
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
@@ -177,7 +207,7 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<!-- <my-helper :pretext="t_daily.length"/> -->
|
<my-helper :pretext="t_daily"/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -221,6 +251,7 @@
|
|||||||
>
|
>
|
||||||
<v-card class="bg-white pa-3 px-0" width="550"
|
<v-card class="bg-white pa-3 px-0" width="550"
|
||||||
height="600">
|
height="600">
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
class="mx-auto overflow-auto mx-0 px-3"
|
class="mx-auto overflow-auto mx-0 px-3"
|
||||||
width="550"
|
width="550"
|
||||||
@@ -229,31 +260,29 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<v-card-title class="fixed-bar bg-white">
|
<v-card-title class="fixed-bar bg-white">
|
||||||
<v-toolbar class="bg-teal-lighten-2 ">
|
<!-- <v-toolbar class="bg-teal-lighten-2 flex-column d-flex"> -->
|
||||||
|
<v-row class="bggrad">
|
||||||
<v-row class="ma-0">
|
<v-col class="text-center">
|
||||||
<v-col class="pa-3 align-self-center">
|
{{t_dailyRound.position}}
|
||||||
<v-toolbar-title>{{t_dailyRound.position}}</v-toolbar-title>
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row >
|
||||||
|
<v-col class="pa-0 mb-3">
|
||||||
|
<v-textarea
|
||||||
|
v-model="searchname"
|
||||||
|
clearable
|
||||||
|
prepend-inner-icon="mdi-magnify"
|
||||||
|
hide-details
|
||||||
|
class="mx-0"
|
||||||
|
label="Поиск"
|
||||||
|
rows="1"
|
||||||
|
no-resize
|
||||||
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=7 class="pa-0"> <v-textarea
|
|
||||||
v-model="searchname"
|
|
||||||
clearable
|
|
||||||
|
|
||||||
prepend-inner-icon="mdi-magnify"
|
|
||||||
hide-details
|
|
||||||
class="mx-2"
|
|
||||||
label="Поиск"
|
|
||||||
rows="1"
|
|
||||||
></v-textarea></v-col>
|
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
<!-- <v-divider class="mt-4"/> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <v-btn variant="text" icon="mdi-magnify"></v-btn> -->
|
|
||||||
</v-toolbar>
|
|
||||||
|
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|
||||||
|
|
||||||
@@ -263,7 +292,7 @@
|
|||||||
:key="key"
|
:key="key"
|
||||||
class="px-3" >
|
class="px-3" >
|
||||||
|
|
||||||
<v-list>
|
<v-list class="py-0">
|
||||||
<v-list-subheader>{{key}} </v-list-subheader>
|
<v-list-subheader>{{key}} </v-list-subheader>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
|
||||||
@@ -284,6 +313,17 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
<v-divider/>
|
||||||
|
<v-card-actions class="align-self-end pb-0">
|
||||||
|
<v-btn
|
||||||
|
color="more_details_btn"
|
||||||
|
variant="text"
|
||||||
|
@click="dialogDetailRound=!dialogDetailRound"
|
||||||
|
|
||||||
|
>
|
||||||
|
Закрыть
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
|
|
||||||
@@ -385,12 +425,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dailyfun(){
|
function dailyfun(){
|
||||||
// if (t_daily.value.length>0){
|
|
||||||
axiosApiInstance.get('api/general_vacation/dailyload/')
|
axiosApiInstance.get('api/general_vacation/dailyload/')
|
||||||
.then(data => {
|
.then(data => {
|
||||||
t_daily.value = data.data.daily
|
t_daily.value = data.data.daily
|
||||||
})
|
})
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -415,6 +455,22 @@
|
|||||||
return new URL(`/src/assets/bg-for-number-carousel.png`, import.meta.url).href;
|
return new URL(`/src/assets/bg-for-number-carousel.png`, import.meta.url).href;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const onPickFile = () => {
|
||||||
|
|
||||||
|
const sdata = new FormData()
|
||||||
|
sdata.append('dailyfiles', dailyfiles.value[0])
|
||||||
|
axiosApiInstance.post(`api/general_vacation/dailyroundup/`, sdata).then(result => {
|
||||||
|
info.value = result.data
|
||||||
|
})
|
||||||
|
console.log('----------------')
|
||||||
|
dailyfiles.value = ''
|
||||||
|
// dailyfun()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
accountStore,
|
accountStore,
|
||||||
model,
|
model,
|
||||||
@@ -433,7 +489,8 @@
|
|||||||
iduser,
|
iduser,
|
||||||
imageLenta,
|
imageLenta,
|
||||||
dialoground,
|
dialoground,
|
||||||
dailyfiles
|
dailyfiles,
|
||||||
|
onPickFile
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,4 +529,6 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -284,37 +284,40 @@ class DailyRoundUpAPIView(APIView):
|
|||||||
|
|
||||||
class DailyloadAPIView(APIView):
|
class DailyloadAPIView(APIView):
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'department', 'fio', 'post')
|
try:
|
||||||
dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position')
|
user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'department', 'fio', 'post')
|
||||||
df_user = pd.DataFrame.from_records(user)
|
dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position')
|
||||||
df_daily = pd.DataFrame.from_records(dailyr)
|
df_user = pd.DataFrame.from_records(user)
|
||||||
df_daily.columns = ["login", "pos", "idpos"]
|
df_daily = pd.DataFrame.from_records(dailyr)
|
||||||
df = pd.merge(df_user, df_daily, left_on= 'login', right_on="login")
|
df_daily.columns = ["login", "pos", "idpos"]
|
||||||
|
df = pd.merge(df_user, df_daily, left_on= 'login', right_on="login")
|
||||||
|
|
||||||
result={}
|
result={}
|
||||||
pos=dailyr[0][1]
|
pos=dailyr[0][1]
|
||||||
|
|
||||||
if request.GET.__contains__('id'):
|
if request.GET.__contains__('id'):
|
||||||
df=df.loc[df['idpos']==int(request.GET.get("id"))]
|
df=df.loc[df['idpos']==int(request.GET.get("id"))]
|
||||||
if request.GET.__contains__('searchname'):
|
if request.GET.__contains__('searchname'):
|
||||||
|
|
||||||
df = df.loc[df["fio"].str.contains(request.GET.get("searchname"))]
|
df = df.loc[df["fio"].str.contains(request.GET.get("searchname"))]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for index, row in df.iterrows ():
|
for index, row in df.iterrows ():
|
||||||
if row['department'] in result.keys():
|
if row['department'] in result.keys():
|
||||||
result[row['department']].append({'login':row['login'],'fio':row['fio'], 'post':row['post']})
|
result[row['department']].append({'login':row['login'],'fio':row['fio'], 'post':row['post']})
|
||||||
else:
|
else:
|
||||||
result[row['department']]=[{'login':row['login'],'fio':row['fio'], 'post':row['post']}]
|
result[row['department']]=[{'login':row['login'],'fio':row['fio'], 'post':row['post']}]
|
||||||
print(result, '111111111111111111111')
|
print(result, '111111111111111111111')
|
||||||
daily = result
|
daily = result
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
pos=''
|
||||||
|
daily = DailyRoundUp.objects.values('position__name', 'position').filter(todaysDate=date.today()).annotate(Count('user'))
|
||||||
|
except Exception as e:
|
||||||
pos=''
|
pos=''
|
||||||
daily = DailyRoundUp.objects.values('position__name', 'position').filter(todaysDate=date.today()).annotate(Count('user'))
|
daily=""
|
||||||
|
|
||||||
return Response({'daily':daily, 'position':pos})
|
return Response({'daily':daily, 'position':pos})
|
||||||
|
|
||||||
class SearchUserAPIView(APIView):
|
class SearchUserAPIView(APIView):
|
||||||
|
|||||||
Reference in new issue
Block a user