Подготовка к заливке

This commit is contained in:
iriska-gri committed 2023-12-26 16:17:44 +03:00
1 parent 72a5554905
commit 95402c9f35
7 files changed
+109 -22

No files matched your search

+89 -6
View File
@@ -8,7 +8,7 @@
{{news.title}}
</v-card-title>
<v-row class="flex-grow-0">
<v-col>
<v-col class="d-flex flex-column ">
<v-img
:src="`${burl}${news.link}`"
height="175px"
@@ -17,8 +17,18 @@
cover
@click="openOneImg(news.link)"
/>
<v-list-item class="d-flex flex-wrap justify-space-between w-100 ">
<div class="justify-self-start mt-1">
<!-- <v-list-item class="d-flex flex-column w-100 "> -->
<!-- <v-row class="bg-red ma-0 d-flex">
<v-col>
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
<span class="text-caption me-2">
{{splitname(news.author)}}
</span>
</v-col>
<v-col>1</v-col>
</v-row> -->
<!-- <div class="justify-self-start mt-1">
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
<span class="text-caption me-2">
{{splitname(news.author)}}
@@ -70,11 +80,78 @@
{{ news.gallery.length }}
</span>
</div>
</template>
</v-list-item>
<v-divider/>
</template> -->
<!-- </v-list-item> -->
</v-col>
</v-row>
<v-divider/>
<v-row class="ma-0 flex-grow-0">
<v-col
class="py-1 pl-4"
lg=5
md=12
sm=12
>
<v-icon size="x-small" class="me-1" icon="mdi-account"/>
<span class="text-caption me-2">
{{splitname(news.author)}}
</span>
</v-col>
<v-col
lg=7
md=12
sm=12
class="py-1 text-end pr-4">
<div class="justify-self-end">
<v-icon
size="x-small"
class="me-1"
:icon="news.scores.filter(e=> e.user==accountStore.user.login && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'"
@click="toggleIncrementLike(news.id, true)"
/>
<span class="subheading me-2">
{{news.scores.filter(e=> e.score==true).length}}
</span>
<span class="me-1">
·
</span>
<v-icon
size="x-small"
class="me-1"
:icon="news.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'"
@click="toggleIncrementLike(news.id, false)"
/>
<span class="subheading me-2">
{{news.scores.filter(e=> e.score==false).length}}
</span>
<span class="me-1">
·
</span>
<v-icon
size="x-small"
class="me-1"
icon="mdi-message-text-outline"
/>
<span class="subheading">
{{ news.comment.length }}
</span>
<span class="me-1">
·
</span>
<v-icon
size="x-small"
class="me-1 mb-1"
icon="mdi-image"
/>
<span class="subheading">
{{ news.gallery.length }}
</span>
</div>
</v-col>
</v-row>
<v-divider/>
<v-row class="ma-0 overflow-auto">
<v-col
class="py-0"
@@ -111,8 +188,10 @@ import {useAccountStore} from '@/store/AccountStore'
import { axiosApiInstance } from '@/utils/axios-api'
import {splitname} from '@/utils/universal_functions'
const accountStore = useAccountStore()
export default {
props: {
@@ -123,8 +202,12 @@ export default {
},
setup(props, {emit}){
const burl = baseURL.slice(0,-1)
const limitText=(text)=> {
let parser = new DOMParser().parseFromString(text, "text/html");
let doc = parser.body.textContent || ""
+11 -10
View File
@@ -1,12 +1,12 @@
<template>
<div>
<v-card
class="bg-white pa-3 px-0"
class="bg-white pa-1 px-0 "
width="550"
height="600"
>
<v-card
class="mx-auto overflow-auto mx-0 px-3"
class="mx-auto overflow-auto mx-0 px-0"
width="550"
height="600"
flat
@@ -20,14 +20,14 @@
</v-col>
</v-row>
<v-row>
<v-col class="pa-0 mb-3">
<v-col class="pa-0 mb-1">
<v-divider class=""/>
<v-text-field
v-model="searchname"
clearable
prepend-inner-icon="mdi-magnify"
hide-details
class="mx-0"
class="ma-0"
label="Поиск"
rows="1"
no-resize
@@ -44,7 +44,7 @@
<div
v-for="(x, key) in result"
:key="key"
class="px-3" >
class="px-3 ddd" >
<v-list class="py-0">
<v-list-subheader>{{key}} </v-list-subheader>
@@ -54,7 +54,7 @@ class="px-3" >
v-for="item in x"
:key="item"
class="bg-transparent"
class="bg-transparent "
density="compact"
:prepend-avatar="checkremote(`${spravURL}${item.login}.jpg`)"
:title="item.fio"
@@ -68,8 +68,8 @@ class="px-3" >
</div>
</v-card>
<v-divider/>
<v-card-actions class="align-self-end pb-0">
<v-divider class=""/>
<v-card-actions class="pb-0" style="place-content: end">
<v-btn
color="more_details_btn"
variant="text"
@@ -136,6 +136,7 @@ export default {
axiosApiInstance.get(`api/general_vacation/dailyload/?id=${props.idpos}`).then(data => {
t_dailyRound.value = data.data.daily
console.log(data.data.daily,'-------------------------');
+4 -1
View File
@@ -1,11 +1,14 @@
<template>
<v-row>
<v-col class="flex-column d-flex">
<v-row class="mt-0 h-0 overflow-auto">
<v-row class="mt-0 h-0 overflow-auto ">
<v-col
v-for="(x, key) in newsAll"
:key="key"
class="pb-1 pt-0"
lg=12
md=6
sm=6
>
<news-card :news="x"/>
+1 -1
View File
@@ -45,7 +45,7 @@
>
<v-card class="h-100 d-flex flex-column">
<v-row class="d-flex justify-md-center">
<v-col class="flex-column d-flex" lg="12" md="8" sm="11">
<v-col class="flex-column d-flex">
<news-home/>
</v-col>
</v-row>
+1 -1
View File
@@ -85,7 +85,7 @@ class roundExcel():
k=7
for i in sorted(self.df['department'].unique(), reverse=True):
for i in self.df['department'].unique():
ws.cell(row = k, column = 2).value = i
+3 -3
View File
@@ -42,8 +42,8 @@ class DailyRoundUpAPIView(APIView):
def get(self, request):
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'familyname', 'name', 'parentname')
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'familyname', 'name', 'parentname').order_by('id_dict_department__order_department')
print(user,' helloooooooooooo')
re = roundExcel(user)
file_path = getattr(re, request.GET.get("excel"))()
@@ -85,7 +85,7 @@ class DailyRoundUpAPIView(APIView):
class DailyloadAPIView(APIView):
def get(self, request):
try:
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'fio', 'post')
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'fio', 'post').order_by('id_dict_department__order_department')
dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position')
df_user = pd.DataFrame.from_records(user)
Binary file not shown.