Merge branch 'II' into Alex
This commit is contained in:
commit
e3d245e769
22 files changed
+126
-140
No files matched your search
Binary file not shown.
@@ -70,7 +70,7 @@
|
||||
v-model="dailyfiles"
|
||||
variant="underlined"
|
||||
density="compact"
|
||||
label="Выберите ф-л"
|
||||
|
||||
hide-details
|
||||
class="pt-2 ml-0 text-white"
|
||||
/>
|
||||
@@ -84,7 +84,7 @@
|
||||
variant="text"
|
||||
color="teal-darken-4"
|
||||
:disabled="dailyfiles==0?true:false"
|
||||
@click="onPickFile"
|
||||
@click="onPickFile('roundfilse')"
|
||||
/>
|
||||
|
||||
<!-- </v-col> -->
|
||||
@@ -183,10 +183,10 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
const onPickFile = () => {
|
||||
const onPickFile = (ex) => {
|
||||
const sdata = new FormData()
|
||||
sdata.append('dailyfiles', dailyfiles.value[0])
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/`, sdata).then(result => {
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
|
||||
info.value = result.data
|
||||
dailyfun()
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</v-col>
|
||||
|
||||
<v-col class=" flex-column d-flex">
|
||||
<v-row class="flex-grow-0 align-self-end">
|
||||
<!-- <v-row class="flex-grow-0 align-self-end">
|
||||
<v-col>
|
||||
<v-icon
|
||||
class="pt-2"
|
||||
@@ -52,8 +52,8 @@
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row>
|
||||
</v-row> -->
|
||||
<!-- <v-row>
|
||||
|
||||
<v-col>
|
||||
<v-file-input
|
||||
@@ -74,7 +74,7 @@
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-row> -->
|
||||
|
||||
|
||||
|
||||
@@ -91,59 +91,7 @@
|
||||
</v-row> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- <v-row class="flex-grow-0">
|
||||
<v-col class="bg-red">
|
||||
1
|
||||
</v-col>
|
||||
<v-col class="bg-yellow">
|
||||
2
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
|
||||
|
||||
<!-- <v-row class="justify-center align-center ma-3">
|
||||
|
||||
<v-col cols="1" class="px-0 pt-5">
|
||||
|
||||
|
||||
<v-icon icon="mdi-file-excel"
|
||||
|
||||
color="green-darken-3"
|
||||
|
||||
@click="excelOp"/>
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col
|
||||
cols="10"
|
||||
class="text-h6 text-grey text-center d-flex align-baseline align-self-center text--lighten-1 font-weight-light px-0"
|
||||
>
|
||||
|
||||
<v-file-input
|
||||
|
||||
accept=".xlsx"
|
||||
v-model="dailyfiles"
|
||||
variant="underlined"
|
||||
density="compact"
|
||||
label="Выберите файл"
|
||||
hide-details
|
||||
class="mr-2"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
<v-col cols="1" class="px-0 pb-0 pt-7">
|
||||
<v-icon icon="mdi-download"
|
||||
|
||||
color="blue-grey-darken-2"
|
||||
|
||||
@click="onPickFile"/>
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row> -->
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.login && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
|
||||
<span class="subheading me-2">{{x.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" @click="openComent(x.id)"/>
|
||||
<span class="pointer subheading">{{ x.comment.length }}</span>
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-message-text-outline"/>
|
||||
<span class="subheading">{{ x.comment.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
@@ -83,7 +83,6 @@ export default {
|
||||
divs.value = []
|
||||
})
|
||||
const newss=ref([])
|
||||
const dialogCommentShow = ref(false)
|
||||
const burl = baseURL.slice(0,-1)
|
||||
const textcomment = ref('')
|
||||
const idnews = ref(0)
|
||||
@@ -107,8 +106,7 @@ export default {
|
||||
|
||||
const addComment = () => {
|
||||
axiosApiInstance.post(`api/navigation/news/`, {news: idnews.value, text: textcomment.value}).then(result => {
|
||||
dialogCommentShow.value=!dialogCommentShow.value
|
||||
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
|
||||
newss.value.result[newss.value.result.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment
|
||||
})
|
||||
textcomment.value=""
|
||||
}
|
||||
@@ -144,7 +142,6 @@ export default {
|
||||
|
||||
|
||||
const openComent = (news) => {
|
||||
dialogCommentShow.value=!dialogCommentShow.value
|
||||
idnews.value = news
|
||||
}
|
||||
|
||||
@@ -169,8 +166,7 @@ export default {
|
||||
burl,
|
||||
limitText,
|
||||
toggleIncrementLike,
|
||||
dialogCommentShow,
|
||||
accountStore,
|
||||
accountStore,
|
||||
dateformat,
|
||||
splitname,
|
||||
textcomment,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
v-for="(x, i) in newss.result" :key=i>
|
||||
|
||||
|
||||
<v-list-item class="w-100 pl-4 py-2 pt-3">
|
||||
|
||||
<template v-slot:prepend>
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||
|
||||
<v-list-item-subtitle>Участник</v-list-item-subtitle>
|
||||
<!-- <v-list-item-subtitle>Участник</v-list-item-subtitle> -->
|
||||
<!-- <my-helper :pretext="route.path == '/news' && 'id' in route.query"/> -->
|
||||
</v-list-item>
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<my-helper :pretext="onlineuser"/>
|
||||
<v-list-item v-for="x in onlineuser"
|
||||
:key="x"
|
||||
:prepend-avatar="checkremote( `${spravURL}${x}.jpg`)"
|
||||
title="x"
|
||||
nav
|
||||
@click="whatuser(x)">
|
||||
|
||||
</v-list-item>
|
||||
<v-dialog
|
||||
v-model="menuGetUserDialog"
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
:title="x.name"
|
||||
:value="x.name"
|
||||
:href="x.link"
|
||||
:disabled="x.path=='/securyty'"
|
||||
:to="x.path"
|
||||
color="navigation">
|
||||
|
||||
@@ -390,11 +391,11 @@ export default {
|
||||
name: 'Справочник',
|
||||
link: 'http://10.252.44.33/accounting6/members.php'
|
||||
},
|
||||
{
|
||||
name: 'О пользователе',
|
||||
ico: 'mdi-account',
|
||||
path: "/userinfo"
|
||||
},
|
||||
// {
|
||||
// name: 'О пользователе',
|
||||
// ico: 'mdi-account',
|
||||
// path: "/userinfo"
|
||||
// },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- -->
|
||||
|
||||
<v-carousel
|
||||
|
||||
cover
|
||||
@@ -21,8 +21,7 @@
|
||||
cover
|
||||
eager
|
||||
>
|
||||
|
||||
|
||||
|
||||
<v-container
|
||||
fill-height
|
||||
fluid
|
||||
@@ -30,41 +29,62 @@
|
||||
class="flex-column h-100 d-flex"
|
||||
>
|
||||
<v-card class="bgCard h-100 d-flex flex-column">
|
||||
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
|
||||
<v-row>
|
||||
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
|
||||
</v-col>
|
||||
|
||||
<v-col class="flex-grow-0 pa-0 pr-1">
|
||||
<v-img
|
||||
|
||||
width="50"
|
||||
:aspect-ratio="1"
|
||||
:src="`${burl}${x.sender}`"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
</v-card-title>
|
||||
<v-card-text class="ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto ">
|
||||
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
|
||||
<v-row>
|
||||
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
|
||||
</v-col>
|
||||
|
||||
<v-col class="flex-grow-0 pa-0 pr-1">
|
||||
<v-img
|
||||
|
||||
width="50"
|
||||
:aspect-ratio="1"
|
||||
:src="`${burl}${x.sender}`"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
</v-card-title>
|
||||
<v-card-text v-if="'text' in x && x.text.length>0" class="ml-2 mb-0 mb-2 flex-grow-0 pb-3 text-h6 overflow-auto ">
|
||||
<v-row>
|
||||
|
||||
|
||||
<v-col cols=6 class=" bgText">
|
||||
<v-textarea
|
||||
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
|
||||
:model-value=x.text
|
||||
variant='plain'
|
||||
readonly
|
||||
auto-grow
|
||||
rows="1"
|
||||
|
||||
hide-details
|
||||
|
||||
|
||||
|
||||
|
||||
/>
|
||||
|
||||
</v-card-text>
|
||||
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
|
||||
:model-value=x.text
|
||||
variant='plain'
|
||||
readonly
|
||||
auto-grow
|
||||
rows="1"
|
||||
|
||||
hide-details
|
||||
|
||||
|
||||
|
||||
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
|
||||
|
||||
<v-col cols=6 class=" bgText">
|
||||
<v-img
|
||||
|
||||
|
||||
:aspect-ratio="1"
|
||||
:src="`${burl}${x.link2}`"
|
||||
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
|
||||
|
||||
</v-row>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
|
||||
@@ -80,7 +100,7 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import {getfromserver} from '@/utils/universal_functions'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
|
||||
|
||||
|
||||
@@ -90,8 +110,15 @@
|
||||
const burl = baseURL.slice(0,-1)
|
||||
const carous=ref([{link: ""}])
|
||||
|
||||
|
||||
getfromserver("api/navigation/carousels/", carous)
|
||||
axiosApiInstance.get(`api/fns/links/`).then(data => {
|
||||
carous.value= data.data
|
||||
|
||||
// t_dailyRound.value = data.data
|
||||
|
||||
// result.value=JSON.parse(JSON.stringify(data.data.daily))
|
||||
|
||||
})
|
||||
// getfromserver("api/fns/links/", carous)
|
||||
|
||||
const carushi = computed(()=> {
|
||||
console.log(window.innerHeight, window.innerHeight-50);
|
||||
@@ -116,7 +143,7 @@
|
||||
|
||||
.bgText {
|
||||
background: #ffffffb0;
|
||||
line-height: 2.1rem!important;
|
||||
line-height: 3.1rem!important;
|
||||
|
||||
}
|
||||
|
||||
@@ -127,6 +154,6 @@
|
||||
|
||||
.textareas .v-field__input {
|
||||
|
||||
font-size: 1.3em!important;
|
||||
font-size: 3.3em!important;
|
||||
}
|
||||
</style>
|
||||
@@ -32,4 +32,4 @@ class MultiDBModelAdmin(admin.ModelAdmin):
|
||||
db_field, request, using=self.using, **kwargs
|
||||
)
|
||||
|
||||
# admin.site.register(Carousels, MultiDBModelAdmin)
|
||||
admin.site.register(Carousels, MultiDBModelAdmin)
|
||||
+10
-7
@@ -8,11 +8,14 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
# class Carousels(models.Model):
|
||||
# title = models.CharField(max_length=255)
|
||||
# text = models.TextField(blank=True, null=True)
|
||||
# link = models.ImageField(upload_to='fns/%Y/%m/%d', null=True, verbose_name='Изображение', db_comment = 'Картинка к новости')
|
||||
|
||||
# class Meta:
|
||||
# managed = False
|
||||
# db_table = 'carousels'
|
||||
|
||||
class Carousels(models.Model):
|
||||
title = models.CharField(max_length=255)
|
||||
text = models.TextField(blank=True, null=True)
|
||||
link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
|
||||
order = models.IntegerField(blank=True, null=True)
|
||||
link2 = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка2')
|
||||
class Meta:
|
||||
managed = False
|
||||
db_table = 'carousels'
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
|
||||
|
||||
|
||||
class CarouselsSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
||||
model = Carousels
|
||||
fields = '__all__'
|
||||
+1
-1
@@ -10,7 +10,7 @@ from rest_framework_simplejwt.views import (
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
# path('links/', CaorusAPIView.as_view(), name='LinkAPIView'),
|
||||
path('links/', CaorusAPIView.as_view(), name='CaorusAPIView'),
|
||||
|
||||
|
||||
]
|
||||
@@ -1,3 +1,11 @@
|
||||
from django.shortcuts import render
|
||||
from rest_framework.generics import ListAPIView
|
||||
from .models import *
|
||||
from rest_framework.response import Response
|
||||
from .serializers import *
|
||||
|
||||
# class CaorusAPIView(CarouselsAPIView(ListAPIView):)
|
||||
class CaorusAPIView(ListAPIView):
|
||||
def get(self, request):
|
||||
queryset = Carousels.objects.using('add_base').all().order_by('order')
|
||||
print(queryset, '----------------queryset')
|
||||
return Response(CarouselsSerializer(queryset, many=True).data)
|
||||
@@ -70,16 +70,7 @@ class DailyRoundUpAPIView(APIView):
|
||||
mess = 'Файл не найден'
|
||||
try:
|
||||
getattr(re, request.GET.get("excel"))()
|
||||
print(request.GET.get("excel"), 'request.GET.get("excel")----------------')
|
||||
# if request.GET.get("excel") == 'round':
|
||||
|
||||
# re.roundfilse()
|
||||
# mess = "Файл загружен"
|
||||
# if request.GET.get("excel") == 'vacation':
|
||||
# re.vacationsExcel()
|
||||
# print(request.data['dailyfiles'], 'request.data[dailyfiles]--------------------')
|
||||
# mess = 'Файл в обраотке'
|
||||
# pos=''
|
||||
|
||||
except Exception as e:
|
||||
print(e, '-----------------------------')
|
||||
pass
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 414 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 414 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 413 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 413 KiB |
@@ -123,7 +123,7 @@ class CarouselsAPIView(ListAPIView):
|
||||
for k in nowday:
|
||||
|
||||
birthday.append({
|
||||
"title":'Поздравляем!',
|
||||
"title":'Сегодня поздравляем!',
|
||||
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
"published": 'true',
|
||||
|
||||
@@ -118,4 +118,4 @@ class ShortUserSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
||||
model = DictEmployee
|
||||
fields = ['familyname', 'name', 'parentname', 'id']
|
||||
fields = ['familyname', 'name', 'parentname', 'id', 'login']
|
||||
Reference in new issue
Block a user