Merge branch 'razrab' into Alex
This commit is contained in:
commit
f27adbcbf1
14 files changed
+374
-81
No files matched your search
Binary file not shown.
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.24",
|
"version": "0.0.26",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "front",
|
"name": "front",
|
||||||
"version": "0.0.24",
|
"version": "0.0.26",
|
||||||
"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.24",
|
"version": "0.0.26",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-card
|
||||||
|
class="bg-white pa-3 px-0"
|
||||||
|
width="550"
|
||||||
|
height="600"
|
||||||
|
>
|
||||||
|
<v-card
|
||||||
|
class="mx-auto overflow-auto mx-0 px-3"
|
||||||
|
width="550"
|
||||||
|
height="600"
|
||||||
|
flat
|
||||||
|
>
|
||||||
|
|
||||||
|
<v-card-title class="fixed-bar bg-white">
|
||||||
|
|
||||||
|
<v-row class="bggrad">
|
||||||
|
<v-col class="text-center text-black_and_white">
|
||||||
|
{{namepos}}
|
||||||
|
</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-row>
|
||||||
|
|
||||||
|
|
||||||
|
</v-card-title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-for="(x, key) in result"
|
||||||
|
:key="key"
|
||||||
|
class="px-3" >
|
||||||
|
|
||||||
|
<v-list class="py-0">
|
||||||
|
<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(item.login)"
|
||||||
|
>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
<v-divider/>
|
||||||
|
<v-card-actions class="align-self-end pb-0">
|
||||||
|
<v-btn
|
||||||
|
color="more_details_btn"
|
||||||
|
variant="text"
|
||||||
|
@click="onSubmit"
|
||||||
|
|
||||||
|
|
||||||
|
>
|
||||||
|
Закрыть
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
<v-dialog
|
||||||
|
v-model="menuGetUserDialog"
|
||||||
|
persistent width="800">
|
||||||
|
|
||||||
|
<Card-users
|
||||||
|
:menuGetUserDialog="menuGetUserDialog"
|
||||||
|
:loging="iduser"
|
||||||
|
@menusClose="menuGetUserDialog = false" />
|
||||||
|
</v-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref,watch, onMounted, computed } from 'vue'
|
||||||
|
import {checkremote} from '@/utils/universal_functions'
|
||||||
|
import { spravURL } from '@/utils/axios-api'
|
||||||
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
|
import CardUsers from '@/components/cardUsers.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
components: {
|
||||||
|
CardUsers
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
idpos: {
|
||||||
|
type: Number,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
namepos: {
|
||||||
|
type: Text,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, {emit}){
|
||||||
|
const menuGetUserDialog = ref(false)
|
||||||
|
const t_dailyRound = ref({})
|
||||||
|
// const result = ref({})
|
||||||
|
const iduser = ref('')
|
||||||
|
const searchname = ref('')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const onSubmit = () => {
|
||||||
|
emit('searchClose')
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${props.idpos}`).then(data => {
|
||||||
|
console.log(data.data);
|
||||||
|
t_dailyRound.value = data.data.daily
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const getcard = async (idus) => {
|
||||||
|
menuGetUserDialog.value = true
|
||||||
|
iduser.value = idus
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = computed({
|
||||||
|
get() {
|
||||||
|
let ob={}
|
||||||
|
Object.keys(t_dailyRound.value).map(el1 => {
|
||||||
|
let myarr = t_dailyRound.value[el1].filter((el) =>el.fio.toLowerCase().includes(searchname.value.toLowerCase()))
|
||||||
|
|
||||||
|
if(myarr.length>0)
|
||||||
|
{
|
||||||
|
ob[el1] = myarr
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return ob
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
onSubmit,
|
||||||
|
checkremote,
|
||||||
|
searchname,
|
||||||
|
spravURL,
|
||||||
|
t_dailyRound,
|
||||||
|
result,
|
||||||
|
menuGetUserDialog,
|
||||||
|
getcard,
|
||||||
|
iduser
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -22,9 +22,10 @@
|
|||||||
{{x.position__name}}
|
{{x.position__name}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text
|
<v-card-text
|
||||||
@click="detailRound(x.position)"
|
@click="detailRound(x.position, x.position__name)"
|
||||||
class="numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white"
|
class="numstyle mt-2 py-0 font-weight-bold pointer bg-black_and_white"
|
||||||
>
|
>
|
||||||
|
<!-- <my-helper :pretext="x"/> -->
|
||||||
<vue3-autocounter
|
<vue3-autocounter
|
||||||
ref='counter'
|
ref='counter'
|
||||||
:startAmount='0'
|
:startAmount='0'
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-file-input
|
<v-file-input
|
||||||
v-bind="props"
|
|
||||||
accept=".xlsx"
|
accept=".xlsx"
|
||||||
v-model="dailyfiles"
|
v-model="dailyfiles"
|
||||||
variant="underlined"
|
variant="underlined"
|
||||||
@@ -76,7 +77,12 @@
|
|||||||
v-model="dialogDetailRound"
|
v-model="dialogDetailRound"
|
||||||
width="500"
|
width="500"
|
||||||
>
|
>
|
||||||
<v-card class="bg-white pa-3 px-0" width="550"
|
<dialog-search
|
||||||
|
:idpos=idpos
|
||||||
|
:namepos=namepos
|
||||||
|
@searchClose="dialogDetailRound=!dialogDetailRound"
|
||||||
|
/>
|
||||||
|
<!-- <v-card class="bg-white pa-3 px-0" width="550"
|
||||||
height="600">
|
height="600">
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
@@ -95,7 +101,7 @@ flat
|
|||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col class="pa-0 mb-3">
|
<v-col class="pa-0 mb-3">
|
||||||
<!-- <my-helper :pretext="t_dailyRound"/> -->
|
|
||||||
<v-textarea
|
<v-textarea
|
||||||
v-model="searchname"
|
v-model="searchname"
|
||||||
clearable
|
clearable
|
||||||
@@ -115,7 +121,7 @@ flat
|
|||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-for="(x, key) in t_dailyRound.daily"
|
v-for="(x, key) in result"
|
||||||
:key="key"
|
:key="key"
|
||||||
class="px-3" >
|
class="px-3" >
|
||||||
|
|
||||||
@@ -152,12 +158,12 @@ class="px-3" >
|
|||||||
Закрыть
|
Закрыть
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
<v-dialog
|
<!-- <v-dialog
|
||||||
v-model="menuGetUserDialog"
|
v-model="menuGetUserDialog"
|
||||||
persistent width="800">
|
persistent width="800">
|
||||||
|
|
||||||
@@ -165,7 +171,7 @@ class="px-3" >
|
|||||||
:menuGetUserDialog="menuGetUserDialog"
|
:menuGetUserDialog="menuGetUserDialog"
|
||||||
:loging="iduser"
|
:loging="iduser"
|
||||||
@menusClose="menuGetUserDialog = false" />
|
@menusClose="menuGetUserDialog = false" />
|
||||||
</v-dialog>
|
</v-dialog> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -179,35 +185,44 @@ class="px-3" >
|
|||||||
import {checkremote} from '@/utils/universal_functions'
|
import {checkremote} from '@/utils/universal_functions'
|
||||||
import { spravURL } from '@/utils/axios-api'
|
import { spravURL } from '@/utils/axios-api'
|
||||||
import CardUsers from '@/components/cardUsers.vue'
|
import CardUsers from '@/components/cardUsers.vue'
|
||||||
|
import DialogSearch from './dialog-search.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
CardUsers
|
CardUsers,
|
||||||
|
DialogSearch
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
const t_baseCriteria = ref([])
|
const t_baseCriteria = ref([])
|
||||||
const t_daily = ref('')
|
const t_daily = ref('')
|
||||||
const idpos = ref('')
|
const idpos = ref('')
|
||||||
|
const namepos = ref('')
|
||||||
const dialogDetailRound = ref(false)
|
const dialogDetailRound = ref(false)
|
||||||
const t_dailyRound = ref('')
|
const t_dailyRound = ref({})
|
||||||
const dailyfiles = ref('')
|
const dailyfiles = ref([])
|
||||||
const info = ref({})
|
const info = ref({})
|
||||||
const searchname = ref('')
|
const searchname = ref('')
|
||||||
const menuGetUserDialog = ref(false)
|
const menuGetUserDialog = ref(false)
|
||||||
const iduser = ref('')
|
const iduser = ref('')
|
||||||
|
const result = ref({})
|
||||||
|
|
||||||
|
|
||||||
const getcard = async (idus) => {
|
const getcard = async (idus) => {
|
||||||
menuGetUserDialog.value = true
|
menuGetUserDialog.value = true
|
||||||
iduser.value = idus
|
iduser.value = idus
|
||||||
}
|
}
|
||||||
|
|
||||||
const detailRound = (pos) => {
|
const detailRound = (pos, name) => {
|
||||||
idpos.value=pos
|
idpos.value=pos
|
||||||
|
namepos.value=name
|
||||||
dialogDetailRound.value=!dialogDetailRound.value
|
dialogDetailRound.value=!dialogDetailRound.value
|
||||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
|
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${pos}`).then(data => {
|
||||||
t_dailyRound.value = data.data
|
t_dailyRound.value = data.data
|
||||||
|
|
||||||
|
result.value=JSON.parse(JSON.stringify(data.data.daily))
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,25 +252,38 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(()=> searchname.value,(newValue,oldValue)=>{
|
// const filterItems = (query) => {
|
||||||
|
// console.log(t_dailyRound.value['daily'], '----------t_dailyRound.value');
|
||||||
if(newValue){
|
|
||||||
|
|
||||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}&searchname=${newValue}`)
|
|
||||||
.then(data => {
|
|
||||||
|
|
||||||
t_dailyRound.value = data.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${idpos.value}`)
|
|
||||||
.then(data => {
|
|
||||||
|
|
||||||
t_dailyRound.value = data.data
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}, {deep:true})
|
// result.value={}
|
||||||
|
// Object.keys(t_dailyRound.value['daily']).map(el1 => {
|
||||||
|
// let myarr = t_dailyRound.value['daily'][el1].filter((el) =>el.fio.toLowerCase().includes(query.toLowerCase()))
|
||||||
|
|
||||||
|
// if(myarr.length>0)
|
||||||
|
// {
|
||||||
|
// result.value[el1] = myarr
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// watch(()=> searchname.value,(newValue,oldValue)=>{
|
||||||
|
|
||||||
|
// if(newValue){
|
||||||
|
// filterItems(newValue)
|
||||||
|
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// result.value = JSON.parse(JSON.stringify(t_dailyRound.value['daily']))
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }, {deep:true})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
@@ -275,7 +303,10 @@ export default {
|
|||||||
spravURL,
|
spravURL,
|
||||||
menuGetUserDialog,
|
menuGetUserDialog,
|
||||||
iduser,
|
iduser,
|
||||||
getcard
|
getcard,
|
||||||
|
result,
|
||||||
|
idpos,
|
||||||
|
namepos
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<v-col cols="1" class="px-0 pt-5">
|
<v-col cols="1" class="px-0 pt-5">
|
||||||
|
|
||||||
<my-helper :pretext="info.mess"/>
|
|
||||||
<v-icon icon="mdi-file-excel"
|
<v-icon icon="mdi-file-excel"
|
||||||
|
|
||||||
color="green-darken-3"
|
color="green-darken-3"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="bg-yellow flex-column h-100">
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
:ref="i"
|
:ref="i"
|
||||||
class="mx-auto px-3 pt-3"
|
class="mx-auto px-3 pt-3"
|
||||||
|
|||||||
@@ -155,6 +155,7 @@
|
|||||||
:value="child.name"
|
:value="child.name"
|
||||||
:title="!rail?child.name:menuTruncated(child.name)"
|
:title="!rail?child.name:menuTruncated(child.name)"
|
||||||
:to="child.path"
|
:to="child.path"
|
||||||
|
:target="child.link?'_blank':''"
|
||||||
>
|
>
|
||||||
<v-tooltip
|
<v-tooltip
|
||||||
v-if="rail"
|
v-if="rail"
|
||||||
@@ -173,7 +174,10 @@
|
|||||||
:key="x.name"
|
:key="x.name"
|
||||||
:title="x.name"
|
:title="x.name"
|
||||||
:value="x.name"
|
:value="x.name"
|
||||||
:href="x.link" color="app_bar">
|
:href="x.link"
|
||||||
|
color="app_bar"
|
||||||
|
:target="x.link?'_blank':''"
|
||||||
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-icon
|
<v-icon
|
||||||
:icon="x.imagecode" />
|
:icon="x.imagecode" />
|
||||||
|
|||||||
@@ -25,7 +25,49 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column d-flex flex-grow-0 px-0" lg="2">
|
<v-col class="flex-column d-flex ma-3">
|
||||||
|
<v-row class="bg-red">
|
||||||
|
<v-col class="flex-grow-0"> <digital-letna/></v-col>
|
||||||
|
<v-col class="flex-column d-flex h-100">
|
||||||
|
<v-card class="overflow-auto d-flex h-100 flex-column">
|
||||||
|
|
||||||
|
<News-list-home />
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-row class="bg-yellow flex-grow-0">
|
||||||
|
<v-col class="pa-0">
|
||||||
|
<v-btn-toggle
|
||||||
|
v-model="toggle"
|
||||||
|
divided
|
||||||
|
variant="outlined"
|
||||||
|
>
|
||||||
|
<v-tooltip
|
||||||
|
v-for="x in favorit"
|
||||||
|
:key="x"
|
||||||
|
:text="x.page"
|
||||||
|
location="top"
|
||||||
|
>
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<v-btn
|
||||||
|
v-bind="props"
|
||||||
|
:icon="x.ico"
|
||||||
|
:to="x.fullPath"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</v-tooltip>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</v-btn-toggle>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
<!-- <v-col class="flex-column d-flex flex-grow-0 px-0" >
|
||||||
<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 flex-column ">
|
<v-col class="pt-0 flex-column ">
|
||||||
<digital-letna/>
|
<digital-letna/>
|
||||||
@@ -33,54 +75,46 @@
|
|||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="flex-grow-0 ma-0 mx-1">
|
<v-row class="flex-grow-0 ma-0 mx-1">
|
||||||
<v-col class="py-0">
|
<v-col class="py-0">
|
||||||
<v-card class="h-100 flex-colmn"
|
<v-card class="h-100 flex-colmn">
|
||||||
>
|
|
||||||
<v-row class="ma-3">
|
<v-row class="ma-3">
|
||||||
<v-col
|
<v-col
|
||||||
|
class="pa-1 text-center"
|
||||||
|
|
||||||
class="pa-1 text-center"
|
|
||||||
>
|
|
||||||
<v-btn-toggle
|
|
||||||
v-model="toggle"
|
|
||||||
divided
|
|
||||||
variant="outlined"
|
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
v-for="x in favorit"
|
|
||||||
:key="x"
|
|
||||||
:icon="x.ico"
|
|
||||||
:to="x.fullPath"
|
|
||||||
>
|
>
|
||||||
<v-icon></v-icon>
|
<v-btn-toggle
|
||||||
<v-tooltip
|
v-model="toggle"
|
||||||
activator="parent"
|
divided
|
||||||
location="top"
|
|
||||||
:text="x.page">
|
|
||||||
</v-tooltip>
|
|
||||||
</v-btn>
|
|
||||||
</v-btn-toggle>
|
|
||||||
<!-- <v-btn
|
|
||||||
:prepend-icon="x.ico"
|
|
||||||
size="x-small"
|
|
||||||
|
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
class="ma-1"
|
|
||||||
:to="x.fullPath"
|
|
||||||
stacked
|
|
||||||
>
|
>
|
||||||
|
<v-tooltip
|
||||||
</v-btn> -->
|
v-for="x in favorit"
|
||||||
|
:key="x"
|
||||||
|
:text="x.page"
|
||||||
|
location="top"
|
||||||
|
>
|
||||||
|
<template v-slot:activator="{ props }">
|
||||||
|
<v-btn
|
||||||
|
v-bind="props"
|
||||||
|
:icon="x.ico"
|
||||||
|
:to="x.fullPath"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</v-tooltip>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</v-btn-toggle>
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<!-- <my-helper :pretext="favorit"/> -->
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex flex-column pl-0 justify-space-between" lg=3>
|
<v-col class="d-flex flex-column pl-0 justify-space-between" >
|
||||||
<v-card
|
<v-card
|
||||||
class="h-100 bg-transparent flex-column d-flex "
|
class="h-100 bg-transparent flex-column d-flex "
|
||||||
elevation="1"
|
elevation="1"
|
||||||
@@ -101,7 +135,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
</v-col> -->
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
@@ -149,7 +183,6 @@
|
|||||||
axiosApiInstance.get(`api/watcher/selectedlinks/`)
|
axiosApiInstance.get(`api/watcher/selectedlinks/`)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
favorit.value = data.data
|
favorit.value = data.data
|
||||||
console.log(favorit.value);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -292,14 +292,16 @@ class DailyloadAPIView(APIView):
|
|||||||
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")
|
||||||
|
|
||||||
result={}
|
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"))]
|
df=df.loc[df['idpos']==int(request.GET.get("id"))]
|
||||||
|
pos=df['pos'].unique()[0]
|
||||||
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"))]
|
||||||
@@ -308,11 +310,12 @@ class DailyloadAPIView(APIView):
|
|||||||
|
|
||||||
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'], 'pos':row['pos']})
|
||||||
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'], 'pos':row['pos']}]
|
||||||
|
|
||||||
daily = result
|
daily = result
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
+30
-1
@@ -1,5 +1,34 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import *
|
from .models import *
|
||||||
|
from django.db.models import Q
|
||||||
# Register your models here.
|
# Register your models here.
|
||||||
|
class MultiDBModelAdmin(admin.ModelAdmin):
|
||||||
|
# A handy constant for the name of the alternate database.
|
||||||
|
using = "user_directory"
|
||||||
|
|
||||||
# admin.site.register(DictEmployee)
|
def save_model(self, request, obj, form, change):
|
||||||
|
# Tell Django to save objects to the 'other' database.
|
||||||
|
obj.save(using=self.using)
|
||||||
|
|
||||||
|
def delete_model(self, request, obj):
|
||||||
|
# Tell Django to delete objects from the 'other' database
|
||||||
|
obj.delete(using=self.using)
|
||||||
|
|
||||||
|
def get_queryset(self, request):
|
||||||
|
# Tell Django to look for objects on the 'other' database.
|
||||||
|
return super().get_queryset(request).using(self.using).filter(~Q(deleted=1))
|
||||||
|
|
||||||
|
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||||
|
# Tell Django to populate ForeignKey widgets using a query
|
||||||
|
# on the 'other' database.
|
||||||
|
return super().formfield_for_foreignkey(
|
||||||
|
db_field, request, using=self.using, **kwargs
|
||||||
|
)
|
||||||
|
|
||||||
|
def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||||
|
# Tell Django to populate ManyToMany widgets using a query
|
||||||
|
# on the 'other' database.
|
||||||
|
return super().formfield_for_manytomany(
|
||||||
|
db_field, request, using=self.using, **kwargs
|
||||||
|
)
|
||||||
|
admin.site.register(DictEmployee, MultiDBModelAdmin)
|
||||||
@@ -155,6 +155,9 @@ class DictEmployee(models.Model):
|
|||||||
managed = False
|
managed = False
|
||||||
db_table = 'dict_employee'
|
db_table = 'dict_employee'
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.fio)
|
||||||
|
|
||||||
|
|
||||||
class DictPosition(models.Model):
|
class DictPosition(models.Model):
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user