Поз
This commit is contained in:
1 parent
709aaec60c
commit
9139c47da7
11 files changed
+206
-31
No files matched your search
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 490 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -90,15 +90,13 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const burl = baseURL.slice(0,-1)
|
const burl = baseURL.slice(0,-1)
|
||||||
const carous=ref([{link: ""}])
|
const carous=ref([{link: ""}])
|
||||||
const imageSrcgrupp=computed(()=> {
|
|
||||||
return new URL(`@/assets/mc.png`, import.meta.url).href;
|
|
||||||
})
|
|
||||||
|
|
||||||
getfromserver("api/navigation/carousels/", carous)
|
getfromserver("api/navigation/carousels/", carous)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return { burl, carous, imageSrcgrupp}
|
return { burl, carous}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Whitespace-only changes.
@@ -0,0 +1,110 @@
|
|||||||
|
<template>
|
||||||
|
<v-row class="justify-center">
|
||||||
|
|
||||||
|
<v-col v-if="!showInfo" cols="6"
|
||||||
|
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light"
|
||||||
|
>
|
||||||
|
{{t_dailyRound}}
|
||||||
|
|
||||||
|
<v-btn @click="detailRound">
|
||||||
|
Тык
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
|
||||||
|
class="mr-2"
|
||||||
|
color="modal_btn"
|
||||||
|
@click="excelOp"
|
||||||
|
>
|
||||||
|
Скачать
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
|
<!-- <v-spacer></v-spacer> -->
|
||||||
|
<v-file-input
|
||||||
|
:rules="[val => (!!val && val.length > 0) || 'Добавьте файл']"
|
||||||
|
accept=".xlsx"
|
||||||
|
v-model="dailyfiles"
|
||||||
|
variant="underlined"
|
||||||
|
density="compact"
|
||||||
|
label="Выберите файл"
|
||||||
|
class="mr-2"></v-file-input>
|
||||||
|
|
||||||
|
<!-- <v-spacer></v-spacer> -->
|
||||||
|
<v-btn
|
||||||
|
color="modal_btn"
|
||||||
|
@click="onPickFile">
|
||||||
|
Загрузить
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { baseURL } from '@/utils/axios-api'
|
||||||
|
import {getfromserver} from '@/utils/universal_functions'
|
||||||
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup(){
|
||||||
|
const dailyfiles = ref('')
|
||||||
|
const visiting = ref({})
|
||||||
|
const info = ref({})
|
||||||
|
const t_dailyRound = ref('')
|
||||||
|
const excelOp = () => {
|
||||||
|
axiosApiInstance.get(`api/general_vacation/dailyroundup/`).then(result => {
|
||||||
|
let link = document.createElement("a")
|
||||||
|
link.href = baseURL+result.data.path
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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(result.data, '----------------')
|
||||||
|
})
|
||||||
|
showInfo.value = true
|
||||||
|
dailyfiles.value = ''
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const detailRound = () => {
|
||||||
|
|
||||||
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=6`)
|
||||||
|
.then(data => {
|
||||||
|
console.log(data.data);
|
||||||
|
|
||||||
|
t_dailyRound.value = data.data
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const showInfo = ref(false)
|
||||||
|
|
||||||
|
return {
|
||||||
|
visiting,
|
||||||
|
excelOp,
|
||||||
|
baseURL,
|
||||||
|
dailyfiles,
|
||||||
|
onPickFile,
|
||||||
|
info,
|
||||||
|
detailRound,
|
||||||
|
t_dailyRound,
|
||||||
|
showInfo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -24,7 +24,9 @@ export function getfromserver(path, reactive){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function bgimage(filecheck){
|
||||||
|
return new URL(`@assets/bg-for-number-carousel.png`, import.meta.url).href
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function checkremote(filecheck){
|
export function checkremote(filecheck){
|
||||||
|
|||||||
@@ -75,14 +75,70 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<!-- </v-img> -->
|
<!-- </v-img> :image="imageLenta" :prepend-avatar="imageLenta" -->
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
<v-card v-else class="h-100 d-flex justify-center bgWithoutNum">
|
<v-card
|
||||||
<p class="align-self-center text-h5 text-center">Данные по сотрудникам не загружены</p>
|
|
||||||
|
v-else class="h-100 d-flex justify-center"
|
||||||
|
:image="imageLenta"
|
||||||
|
>
|
||||||
|
|
||||||
|
<p class="align-self-center text-h5 text-center">
|
||||||
|
<v-row justify="center">
|
||||||
|
|
||||||
|
|
||||||
|
<v-dialog
|
||||||
|
v-model="dialoground"
|
||||||
|
persistent
|
||||||
|
width="1024"
|
||||||
|
>
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<v-btn
|
||||||
|
color="primary"
|
||||||
|
v-bind="props"
|
||||||
|
>
|
||||||
|
Open Dialog
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
<v-card>
|
||||||
|
<v-card-title>
|
||||||
|
<span class="text-h5">Загрузить файл</span>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<v-container>
|
||||||
|
<load-round/>
|
||||||
|
</v-container>
|
||||||
|
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn
|
||||||
|
color="blue-darken-1"
|
||||||
|
variant="text"
|
||||||
|
@click="dialoground = false"
|
||||||
|
>
|
||||||
|
Close
|
||||||
|
</v-btn>
|
||||||
|
<v-btn
|
||||||
|
color="blue-darken-1"
|
||||||
|
variant="text"
|
||||||
|
@click="dialoground = false"
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
</v-row>
|
||||||
|
<!-- Данные по сотрудникам не загружены -->
|
||||||
|
<!-- <v-btn icon="mdi-calendar" size="x-large"></v-btn> -->
|
||||||
|
</p>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -107,7 +163,7 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<my-helper :pretext="t_daily.length"/>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
@@ -160,7 +216,7 @@
|
|||||||
|
|
||||||
<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 ">
|
||||||
<!-- <my-helper :pretext="t_dailyRound"/> -->
|
|
||||||
<v-row class="ma-0">
|
<v-row class="ma-0">
|
||||||
<v-col class="pa-3 align-self-center">
|
<v-col class="pa-3 align-self-center">
|
||||||
<v-toolbar-title>{{t_dailyRound.position}}</v-toolbar-title>
|
<v-toolbar-title>{{t_dailyRound.position}}</v-toolbar-title>
|
||||||
@@ -231,7 +287,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted,watch } from 'vue'
|
import { ref, onMounted,watch, computed } from 'vue'
|
||||||
import {useAppStore} from '@/store/app'
|
import {useAppStore} from '@/store/app'
|
||||||
import {useAccountStore} from '@/store/AccountStore'
|
import {useAccountStore} from '@/store/AccountStore'
|
||||||
import {pagecounter} from '@/utils/universal_functions'
|
import {pagecounter} from '@/utils/universal_functions'
|
||||||
@@ -242,8 +298,9 @@
|
|||||||
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 { spravURL } from '@/utils/axios-api'
|
||||||
import {checkremote} from '@/utils/universal_functions'
|
import {checkremote, bgimage} from '@/utils/universal_functions'
|
||||||
import CardUsers from '@/components/cardUsers.vue'
|
import CardUsers from '@/components/cardUsers.vue'
|
||||||
|
import LoadRound from '@/components/load-round.vue'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
@@ -252,7 +309,8 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
CarouselNumbers,
|
CarouselNumbers,
|
||||||
CalendarFull,
|
CalendarFull,
|
||||||
NewsListHome,
|
NewsListHome,
|
||||||
CardUsers
|
CardUsers,
|
||||||
|
LoadRound
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
@@ -264,6 +322,7 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
const idpos = ref('')
|
const idpos = ref('')
|
||||||
const menuGetUserDialog = ref(false)
|
const menuGetUserDialog = ref(false)
|
||||||
const iduser = ref('')
|
const iduser = ref('')
|
||||||
|
const dialoground = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -309,11 +368,15 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
}
|
}
|
||||||
|
|
||||||
function dailyfun(){
|
function dailyfun(){
|
||||||
axiosApiInstance.get('api/general_vacation/dailyload/')
|
// if (t_daily.value.length>0){
|
||||||
|
axiosApiInstance.get('api/general_vacation/dailyload/')
|
||||||
.then(data => {
|
.then(data => {
|
||||||
// console.log();
|
|
||||||
t_daily.value = data.data.daily
|
t_daily.value = data.data.daily
|
||||||
})
|
})
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const detailRound = (pos) => {
|
const detailRound = (pos) => {
|
||||||
@@ -331,6 +394,10 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
iduser.value = idus
|
iduser.value = idus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const imageLenta=computed(()=> {
|
||||||
|
return new URL(`/src/assets/bg-for-number-carousel.png`, import.meta.url).href;
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
accountStore,
|
accountStore,
|
||||||
model,
|
model,
|
||||||
@@ -341,11 +408,15 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
detailRound,
|
detailRound,
|
||||||
dialogDetailRound,
|
dialogDetailRound,
|
||||||
checkremote,
|
checkremote,
|
||||||
|
bgimage,
|
||||||
spravURL,
|
spravURL,
|
||||||
searchname,
|
searchname,
|
||||||
menuGetUserDialog,
|
menuGetUserDialog,
|
||||||
getcard,
|
getcard,
|
||||||
iduser
|
iduser,
|
||||||
|
imageLenta,
|
||||||
|
dialoground
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -374,10 +445,7 @@ import CardUsers from '@/components/cardUsers.vue'
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bgWithoutNum {
|
|
||||||
background: url("/src/assets/bg-for-number-carousel.png");
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-bar {
|
.fixed-bar {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<v-row class="justify-center">
|
<v-row class="justify-center">
|
||||||
<v-alert
|
|
||||||
class="d-flex align-self-center"
|
|
||||||
v-model="showInfo"
|
|
||||||
:border="'start'"
|
|
||||||
variant="tonal"
|
|
||||||
type="info"
|
|
||||||
max-width="max-content"
|
|
||||||
closable>{{ info.mess }}
|
|
||||||
</v-alert>
|
|
||||||
<v-col v-if="!showInfo" cols="6"
|
<v-col v-if="!showInfo" cols="6"
|
||||||
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light"
|
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light"
|
||||||
>
|
>
|
||||||
@@ -74,6 +66,7 @@ export default {
|
|||||||
|
|
||||||
const onPickFile = () => {
|
const onPickFile = () => {
|
||||||
|
|
||||||
|
console.log('fffffffffffffffffffffffffffffffffffffffff');
|
||||||
const sdata = new FormData()
|
const sdata = new FormData()
|
||||||
sdata.append('dailyfiles', dailyfiles.value[0])
|
sdata.append('dailyfiles', dailyfiles.value[0])
|
||||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/`, sdata).then(result => {
|
axiosApiInstance.post(`api/general_vacation/dailyroundup/`, sdata).then(result => {
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ 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)
|
||||||
|
|
||||||
@@ -262,10 +263,12 @@ class DailyRoundUpAPIView(APIView):
|
|||||||
pos = DailyRoundUp.objects.values('position__name', 'position').filter(position=6,todaysDate=date.today()).annotate(Count('user'))
|
pos = DailyRoundUp.objects.values('position__name', 'position').filter(position=6,todaysDate=date.today()).annotate(Count('user'))
|
||||||
|
|
||||||
|
|
||||||
print('-------', pos)
|
|
||||||
mess = "Файл загружен"
|
mess = "Файл загружен"
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e, '--------jjjjjjjjjjjjjjjjjj------------------------------')
|
||||||
|
pos=''
|
||||||
mess = 'Файл не найден'
|
mess = 'Файл не найден'
|
||||||
|
|
||||||
|
|
||||||
@@ -306,6 +309,7 @@ class DailyloadAPIView(APIView):
|
|||||||
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=''
|
pos=''
|
||||||
|
|||||||
Binary file not shown.
Reference in new issue
Block a user