This commit is contained in:
iriska-gri committed 2023-11-01 11:41:36 +03:00
1 parent 1c07236ddf
commit 3853ca0d72
7 files changed
+96 -29

No files matched your search

BIN
View File
Binary file not shown.
+5
View File
@@ -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>
+1 -1
View File
@@ -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">
+2 -2
View File
@@ -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);
+83 -24
View File
@@ -85,7 +85,9 @@
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-row>
<v-col>
<v-file-input <v-file-input
v-bind="props" v-bind="props"
accept=".xlsx" accept=".xlsx"
@@ -94,9 +96,37 @@
density="compact" density="compact"
label="Выберите файл" label="Выберите файл"
hide-details 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-col>
<v-col lg=7 class="pa-0"> <v-textarea </v-row>
<v-row >
<v-col class="pa-0 mb-3">
<v-textarea
v-model="searchname" v-model="searchname"
clearable clearable
prepend-inner-icon="mdi-magnify" prepend-inner-icon="mdi-magnify"
hide-details hide-details
class="mx-2" class="mx-0"
label="Поиск" label="Поиск"
rows="1" rows="1"
></v-textarea></v-col> no-resize
/>
</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>
+4 -1
View File
@@ -284,6 +284,7 @@ class DailyRoundUpAPIView(APIView):
class DailyloadAPIView(APIView): class DailyloadAPIView(APIView):
def get(self, request): def get(self, request):
try:
user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'department', 'fio', 'post') user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'department', 'fio', 'post')
dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position') dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position')
df_user = pd.DataFrame.from_records(user) df_user = pd.DataFrame.from_records(user)
@@ -314,7 +315,9 @@ class DailyloadAPIView(APIView):
else: else:
pos='' pos=''
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'))
except Exception as e:
pos=''
daily=""
return Response({'daily':daily, 'position':pos}) return Response({'daily':daily, 'position':pos})
class SearchUserAPIView(APIView): class SearchUserAPIView(APIView):