Merge branch 'razrab'
This commit is contained in:
commit
db15c6e26c
20 files changed
+312
-81
No files matched your search
Binary file not shown.
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.21",
|
"version": "0.0.22",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.21",
|
"version": "0.0.22",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullcalendar/core": "^6.1.8",
|
"@fullcalendar/core": "^6.1.8",
|
||||||
"@fullcalendar/daygrid": "^6.1.8",
|
"@fullcalendar/daygrid": "^6.1.8",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.21",
|
"version": "0.0.22",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 682 KiB After Width: | Height: | Size: 490 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
@@ -8,13 +8,14 @@
|
|||||||
<v-btn
|
<v-btn
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
append-icon="mdi-login"
|
append-icon="mdi-login"
|
||||||
|
color="black_and_white"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-icon color="white"></v-icon>
|
<v-icon color="black_and_white"></v-icon>
|
||||||
</template>
|
</template>
|
||||||
Войти
|
Войти
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<v-icon color="white"/>
|
<v-icon color="black_and_white"/>
|
||||||
</template>
|
</template>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
<v-col cols="12" class="py-0">
|
<v-col cols="12" class="py-0">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="anon.username"
|
v-model="anon.username"
|
||||||
|
color="black_and_white"
|
||||||
label="Логин"
|
label="Логин"
|
||||||
variant="underlined"
|
variant="underlined"
|
||||||
:error-messages="errorer('username')"
|
:error-messages="errorer('username')"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
hover
|
hover
|
||||||
half-increments
|
half-increments
|
||||||
|
|
||||||
color="stars"
|
color="yellow"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
|
|||||||
@@ -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}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
cover
|
cover
|
||||||
class="text-white"
|
class="text-white"
|
||||||
> -->
|
> -->
|
||||||
<v-card class="h-100 text-center g text-numeral">
|
<v-card class="h-100 text-center g text-black_grey">
|
||||||
<v-card-title class="statstyle my-2 py-0 text-overline font-weight-bold">
|
<v-card-title class="statstyle my-2 py-0 text-overline font-weight-bold">
|
||||||
{{n.status}}
|
{{n.status}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|||||||
Whitespace-only changes.
@@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<v-row class="justify-center">
|
||||||
|
|
||||||
|
<v-col cols="12"
|
||||||
|
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light"
|
||||||
|
>
|
||||||
|
|
||||||
|
<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>
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<v-alert
|
<v-alert
|
||||||
|
|
||||||
|
|
||||||
color="bg_comments"
|
color="bg_white"
|
||||||
rounded=0
|
rounded=0
|
||||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||||
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
||||||
|
|||||||
@@ -11,10 +11,12 @@
|
|||||||
v-if="accountStore.cod2user"
|
v-if="accountStore.cod2user"
|
||||||
class="px-3"
|
class="px-3"
|
||||||
size="20"
|
size="20"
|
||||||
|
color="black_and_white"
|
||||||
:icon="rail ? 'mdi-chevron-right' : 'mdi-chevron-left'"
|
:icon="rail ? 'mdi-chevron-right' : 'mdi-chevron-left'"
|
||||||
@click="rail = !rail" />
|
@click="rail = !rail" />
|
||||||
<v-card
|
<v-card
|
||||||
class="bg-transparent py"
|
class="bg-transparent py"
|
||||||
|
color="black_and_white"
|
||||||
density="compact"
|
density="compact"
|
||||||
:prepend-avatar="imageSrc"
|
:prepend-avatar="imageSrc"
|
||||||
title="Портал МИ ФНС по ЦОД № 2"
|
title="Портал МИ ФНС по ЦОД № 2"
|
||||||
@@ -28,6 +30,7 @@
|
|||||||
<template v-if="accountStore.cod2user">
|
<template v-if="accountStore.cod2user">
|
||||||
<v-card
|
<v-card
|
||||||
class="bg-transparent"
|
class="bg-transparent"
|
||||||
|
color="black_and_white"
|
||||||
density="compact"
|
density="compact"
|
||||||
:prepend-avatar="accountStore.user.photo"
|
:prepend-avatar="accountStore.user.photo"
|
||||||
:title="accountStore.user.fio"
|
:title="accountStore.user.fio"
|
||||||
@@ -48,6 +51,7 @@
|
|||||||
<v-tooltip location="bottom">
|
<v-tooltip location="bottom">
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-btn
|
<v-btn
|
||||||
|
color="black_and_white"
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
dark to="/faq"
|
dark to="/faq"
|
||||||
icon="mdi-comment-question-outline" />
|
icon="mdi-comment-question-outline" />
|
||||||
@@ -61,6 +65,7 @@
|
|||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
|
|
||||||
<v-btn
|
<v-btn
|
||||||
|
color="black_and_white"
|
||||||
v-bind="props"
|
v-bind="props"
|
||||||
dark icon="mdi-thumb-up-outline" />
|
dark icon="mdi-thumb-up-outline" />
|
||||||
</template>
|
</template>
|
||||||
@@ -79,9 +84,9 @@
|
|||||||
mdi-lightbulb-outline
|
mdi-lightbulb-outline
|
||||||
</v-icon>
|
</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn dark icon="mdi-magnify" />
|
<v-btn color="black_and_white" icon="mdi-magnify" />
|
||||||
<v-btn dark icon="mdi-account-multiple-outline" @click="drawer_right = !drawer_right" />
|
<v-btn color="black_and_white" icon="mdi-account-multiple-outline" @click="drawer_right = !drawer_right" />
|
||||||
<v-btn dark icon="mdi-logout" @click="accountStore.logout" />
|
<v-btn color="black_and_white" icon="mdi-logout" @click="accountStore.logout" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -184,7 +189,7 @@
|
|||||||
<v-list class=" d-flex flex-column ">
|
<v-list class=" d-flex flex-column ">
|
||||||
|
|
||||||
<v-list-item v-if="!rail" class="text-caption font-weight-bold text-truncate">
|
<v-list-item v-if="!rail" class="text-caption font-weight-bold text-truncate">
|
||||||
<p>Посещений всего: {{ appStore.countvisitor.totalvisit }}</p>
|
<p>Посещений всего:{{ appStore.countvisitor.totalvisit }}</p>
|
||||||
<v-divider />
|
<v-divider />
|
||||||
<p>Посещений сегодня: {{ appStore.countvisitor.visittoday }}</p>
|
<p>Посещений сегодня: {{ appStore.countvisitor.visittoday }}</p>
|
||||||
<v-divider />
|
<v-divider />
|
||||||
@@ -198,7 +203,7 @@
|
|||||||
v-model="showTooltip"
|
v-model="showTooltip"
|
||||||
location="top">
|
location="top">
|
||||||
<template v-slot:activator="{ props }">
|
<template v-slot:activator="{ props }">
|
||||||
<v-icon v-bind="props" color="eye_icon">
|
<v-icon v-bind="props" color="grey">
|
||||||
mdi-account-eye
|
mdi-account-eye
|
||||||
</v-icon>
|
</v-icon>
|
||||||
</template>
|
</template>
|
||||||
@@ -325,6 +330,7 @@ export default {
|
|||||||
const rail = ref(false)
|
const rail = ref(false)
|
||||||
const showTooltip = ref(false)
|
const showTooltip = ref(false)
|
||||||
|
|
||||||
|
|
||||||
const menuTruncated = (menus) => {
|
const menuTruncated = (menus) => {
|
||||||
return menus.slice(0,2).toUpperCase()
|
return menus.slice(0,2).toUpperCase()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ export default createVuetify({
|
|||||||
cards: '#F5F5F5',
|
cards: '#F5F5F5',
|
||||||
text_carous: '#242424',
|
text_carous: '#242424',
|
||||||
navigation: '#004D40', // Цвет текста и иконок в левом навигационном меню
|
navigation: '#004D40', // Цвет текста и иконок в левом навигационном меню
|
||||||
numeral: '#3C3C3C', // Цвет для карусели с цифрами в работе
|
black_grey: '#3C3C3C', // Цвет для карусели с цифрами в работе
|
||||||
modal_btn: '#1E88E5', // Цвет для кнопок в модальных окнах
|
modal_btn: '#1E88E5', // Цвет для кнопок в модальных окнах
|
||||||
eye_icon: '#7A7A7A', // Цвет иконки для отображения количества посещений
|
grey: '#7A7A7A', // Цвет иконки для отображения количества посещений
|
||||||
stars: '#F9A825', // Цвет для звездочек в обратной связи
|
yellow: '#F9A825', // Цвет для звездочек в обратной связи
|
||||||
more_details_btn: '#01579B', // Цвет для кнопки перехода "подробнее"
|
more_details_btn: '#01579B', // Цвет для кнопки перехода "подробнее"
|
||||||
loading_avatar: '#37474F', // Цвет поля прогрузки аватара пользователя
|
loading_avatar: '#37474F', // Цвет поля прогрузки аватара пользователя
|
||||||
bg_comments: '#FFFFFF', // Цвет заднего фона для комментариев
|
bg_white: '#FFFFFF', // Цвет заднего фона для комментариев
|
||||||
delete_btn: '#546E7A', // Цвет для кнопки удаления
|
delete_btn: '#546E7A', // Цвет для кнопки удаления
|
||||||
app_bar: '#004D40', // Цвет для навигационной (аппбар) панели
|
app_bar: '#004D40', // Цвет для навигационной (аппбар) панели
|
||||||
back_number_carousel: '#FFFFFF',
|
black_and_white: '#FFFFFF',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
@@ -42,16 +42,16 @@ export default createVuetify({
|
|||||||
cards: '#F5F5F5',
|
cards: '#F5F5F5',
|
||||||
text_carous: '#242424',
|
text_carous: '#242424',
|
||||||
navigation: '#FDF5E6',
|
navigation: '#FDF5E6',
|
||||||
numeral: '#3C3C3C',
|
black_grey: '#3C3C3C',
|
||||||
modal_btn: '#1E88E5',
|
modal_btn: '#1E88E5',
|
||||||
eye_icon: '#7A7A7A',
|
grey: '#7A7A7A',
|
||||||
stars: '#F9A825',
|
yellow: '#F9A825',
|
||||||
more_details_btn: '#01579B',
|
more_details_btn: '#01579B',
|
||||||
loading_avatar: '#37474F',
|
loading_avatar: '#37474F',
|
||||||
bg_comments: '#FFFFFF',
|
bg_white: '#FFFFFF',
|
||||||
delete_btn: '#546E7A',
|
delete_btn: '#546E7A',
|
||||||
app_bar: '#212121',
|
app_bar: '#212121',
|
||||||
back_number_carousel: '#101311',
|
black_and_white: '#101311',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
@@ -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){
|
||||||
|
|||||||
@@ -66,23 +66,73 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-card class="h-100 text-center g text-numeral bg-back_number_carousel">
|
<v-card class="h-100 text-center g text-black_grey bg-black_and_white">
|
||||||
<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-black_and_white">
|
||||||
{{x.position__name}}
|
{{x.position__name}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text @click="detailRound(x.position)" class="numstyle mt-2 py-0 font-weight-bold pointer bg-back_number_carousel">
|
<v-card-text @click="detailRound(x.position)" class="numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white">
|
||||||
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.user__count)' :duration='2'/>
|
<vue3-autocounter ref='counter' :startAmount='0' :endAmount='Number(x.user__count)' :duration='2'/>
|
||||||
</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="500"
|
||||||
|
>
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<v-btn
|
||||||
|
color="teal-darken-2"
|
||||||
|
v-bind="props"
|
||||||
|
>
|
||||||
|
Загрузить
|
||||||
|
</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"
|
||||||
|
>
|
||||||
|
Закрыть
|
||||||
|
</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 +157,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,14 +210,16 @@
|
|||||||
|
|
||||||
<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>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col lg=7 class="pa-0"> <v-textarea
|
<v-col lg=7 class="pa-0"> <v-textarea
|
||||||
v-model="searchname"
|
v-model="searchname"
|
||||||
append-inner-icon="mdi-magnify"
|
clearable
|
||||||
|
|
||||||
|
prepend-inner-icon="mdi-magnify"
|
||||||
hide-details
|
hide-details
|
||||||
class="mx-2"
|
class="mx-2"
|
||||||
label="Поиск"
|
label="Поиск"
|
||||||
@@ -183,7 +235,7 @@
|
|||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
|
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
{{ searchname}}
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -204,6 +256,7 @@
|
|||||||
:title="item.fio"
|
:title="item.fio"
|
||||||
:subtitle="item.post"
|
:subtitle="item.post"
|
||||||
variant="text"
|
variant="text"
|
||||||
|
@click="getcard(item.login)"
|
||||||
>
|
>
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -216,12 +269,21 @@
|
|||||||
|
|
||||||
|
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
<v-dialog
|
||||||
|
v-model="menuGetUserDialog"
|
||||||
|
persistent width="800">
|
||||||
|
|
||||||
|
<Card-users
|
||||||
|
:menuGetUserDialog="menuGetUserDialog"
|
||||||
|
:loging="iduser"
|
||||||
|
@menusClose="menuGetUserDialog = false" />
|
||||||
|
</v-dialog>
|
||||||
</div>
|
</div>
|
||||||
</v-container>
|
</v-container>
|
||||||
</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'
|
||||||
@@ -232,8 +294,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 LoadRound from '@/components/load-round.vue'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
@@ -241,7 +304,9 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
CarouselList,
|
CarouselList,
|
||||||
CarouselNumbers,
|
CarouselNumbers,
|
||||||
CalendarFull,
|
CalendarFull,
|
||||||
NewsListHome
|
NewsListHome,
|
||||||
|
CardUsers,
|
||||||
|
LoadRound
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
@@ -251,6 +316,9 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
const dialogDetailRound = ref(false)
|
const dialogDetailRound = ref(false)
|
||||||
const searchname = ref('')
|
const searchname = ref('')
|
||||||
const idpos = ref('')
|
const idpos = ref('')
|
||||||
|
const menuGetUserDialog = ref(false)
|
||||||
|
const iduser = ref('')
|
||||||
|
const dialoground = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -266,13 +334,23 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
|
|
||||||
watch(()=> searchname.value,(newValue,oldValue)=>{
|
watch(()=> searchname.value,(newValue,oldValue)=>{
|
||||||
|
console.log(newValue,'newValue', oldValue,'oldValue');
|
||||||
if(newValue){
|
if(newValue){
|
||||||
|
|
||||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}&searchname=${newValue}`)
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}&searchname=${newValue}`)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log(newValue);
|
console.log(data.data);
|
||||||
// t_daily.value = data.data.daily
|
t_dailyRound.value = data.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}`)
|
||||||
|
.then(data => {
|
||||||
|
console.log(data.data, '-----------------');
|
||||||
|
t_dailyRound.value = data.data
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
}, {deep:true})
|
}, {deep:true})
|
||||||
|
|
||||||
|
|
||||||
@@ -286,11 +364,15 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
}
|
}
|
||||||
|
|
||||||
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) => {
|
||||||
@@ -303,6 +385,14 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const getcard = async (idus) => {
|
||||||
|
menuGetUserDialog.value = true
|
||||||
|
iduser.value = idus
|
||||||
|
}
|
||||||
|
|
||||||
|
const imageLenta=computed(()=> {
|
||||||
|
return new URL(`/src/assets/bg-for-number-carousel.png`, import.meta.url).href;
|
||||||
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
accountStore,
|
accountStore,
|
||||||
@@ -314,8 +404,15 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
detailRound,
|
detailRound,
|
||||||
dialogDetailRound,
|
dialogDetailRound,
|
||||||
checkremote,
|
checkremote,
|
||||||
|
bgimage,
|
||||||
spravURL,
|
spravURL,
|
||||||
searchname
|
searchname,
|
||||||
|
menuGetUserDialog,
|
||||||
|
getcard,
|
||||||
|
iduser,
|
||||||
|
imageLenta,
|
||||||
|
dialoground
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -344,10 +441,7 @@ import {checkremote} from '@/utils/universal_functions'
|
|||||||
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,14 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<v-container class="my-auto">
|
||||||
<v-row class="justify-center">
|
<v-row justify="center">
|
||||||
|
<!-- <v-alert
|
||||||
<v-col cols="6"
|
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-if="!showInfo" -->
|
||||||
|
<v-col cols="7"
|
||||||
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"
|
||||||
>
|
>
|
||||||
{{t_dailyRound}}
|
{{t_dailyRound}}
|
||||||
|
|
||||||
<v-btn @click="detailRound">
|
<v-btn class="mr-2" @click="detailRound">
|
||||||
Тык
|
Уточнение
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn
|
<v-btn
|
||||||
|
|
||||||
@@ -39,7 +48,20 @@
|
|||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<v-row justify="center">
|
||||||
|
<v-col cols="2">
|
||||||
|
<v-alert
|
||||||
|
v-model="showInfo"
|
||||||
|
:border="'start'"
|
||||||
|
variant="tonal"
|
||||||
|
type="info"
|
||||||
|
width="max-content"
|
||||||
|
closable>
|
||||||
|
{{ info.mess }}
|
||||||
|
</v-alert>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -72,7 +94,8 @@ export default {
|
|||||||
info.value = result.data
|
info.value = result.data
|
||||||
console.log(result.data, '----------------')
|
console.log(result.data, '----------------')
|
||||||
})
|
})
|
||||||
|
showInfo.value = true
|
||||||
|
dailyfiles.value = ''
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -88,6 +111,8 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showInfo = ref(false)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
visiting,
|
visiting,
|
||||||
excelOp,
|
excelOp,
|
||||||
@@ -96,7 +121,8 @@ export default {
|
|||||||
onPickFile,
|
onPickFile,
|
||||||
info,
|
info,
|
||||||
detailRound,
|
detailRound,
|
||||||
t_dailyRound
|
t_dailyRound,
|
||||||
|
showInfo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 'Файл не найден'
|
||||||
|
|
||||||
|
|
||||||
@@ -281,39 +284,33 @@ 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', 'familyname', 'name', 'parentname')
|
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)
|
||||||
df_daily = pd.DataFrame.from_records(dailyr)
|
df_daily = pd.DataFrame.from_records(dailyr)
|
||||||
df_daily.columns = ["login", "pos", "idpos"]
|
df_daily.columns = ["login", "pos", "idpos"]
|
||||||
df = pd.merge(df_user, df_daily, left_on= 'login', right_on="login")
|
df = pd.merge(df_user, df_daily, left_on= 'login', right_on="login")
|
||||||
print(df, 'df_user---------------------------')
|
|
||||||
# print(df_daily , 'df_daily---------------------------')
|
result={}
|
||||||
|
pos=dailyr[0][1]
|
||||||
|
|
||||||
if request.GET.__contains__('id'):
|
if request.GET.__contains__('id'):
|
||||||
|
df=df.loc[df['idpos']==int(request.GET.get("id"))]
|
||||||
|
|
||||||
daily = DailyRoundUp.objects.filter(position=request.GET.get("id"),todaysDate=date.today()).values_list('user', 'position__name')
|
|
||||||
|
|
||||||
if request.GET.__contains__('searchname'):
|
if request.GET.__contains__('searchname'):
|
||||||
# daily1 = DictEmployee.objects.using('user_directory').filter(login__in=[x[0] for x in daily])
|
|
||||||
# daily1 = daily1.filter(fio__icontains=request.GET.get("searchname"))
|
|
||||||
u= DictEmployee.objects.using('user_directory').values('familyname').filter(fio__icontains=request.GET.get("searchname"))
|
|
||||||
print(daily, '-----------------------------')
|
|
||||||
else:
|
|
||||||
u=DictEmployee.objects.using('user_directory').filter(login__in=[x[0] for x in daily])
|
|
||||||
print('1111111111111111111111111111111111111111111')
|
|
||||||
pos=daily[0][1]
|
|
||||||
|
|
||||||
result = {}
|
df = df.loc[df["fio"].str.contains(request.GET.get("searchname"))]
|
||||||
|
|
||||||
|
|
||||||
for x in u:
|
|
||||||
if x.department in result.keys():
|
for index, row in df.iterrows ():
|
||||||
result[x.department].append({'login':x.login,'fio':x.fio, 'post':x.post})
|
if row['department'] in result.keys():
|
||||||
|
result[row['department']].append({'login':row['login'],'fio':row['fio'], 'post':row['post']})
|
||||||
else:
|
else:
|
||||||
result[x.department]=[{'login':x.login,'fio':x.fio, 'post':x.post}]
|
result[row['department']]=[{'login':row['login'],'fio':row['fio'], 'post':row['post']}]
|
||||||
|
print(result, '111111111111111111111')
|
||||||
daily = result
|
daily = result
|
||||||
|
|
||||||
|
|
||||||
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'))
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user