38 fix1
This commit is contained in:
1 parent
5e462e9e35
commit
4cd0e6933a
5 files changed
+106
-103
No files matched your search
@@ -17,12 +17,17 @@ class getuserAPIView(APIView):
|
||||
Параметр: userlogin
|
||||
Пример: GET /api/accounts/getuser/?userlogin=9966-00-107
|
||||
Результат: Выдает все данные о пользователе
|
||||
Если дать дополнительный параметр fullinfo = True, то будет выдаваться информация с комиссиями и ответсвенностью
|
||||
"""
|
||||
|
||||
resp = None
|
||||
fullinfo = request.query_params.get('fullinfo')
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||
if(fullinfo is None or fullinfo == False ):
|
||||
resp = InfoUserCardSerializer(queryset).data
|
||||
|
||||
|
||||
|
||||
return Response(CardUserSerializer(queryset).data)
|
||||
else:
|
||||
resp = CardUserSerializer(queryset).data
|
||||
|
||||
return Response(resp)
|
||||
|
||||
|
||||
@@ -127,6 +127,7 @@ class CardUserSerializer(serializers.ModelSerializer):
|
||||
return Committee2Serializer(obj.user_committe2.all(), many=True).data
|
||||
|
||||
|
||||
|
||||
class InfoUserCardSerializer(serializers.ModelSerializer):
|
||||
""" Собирает необходимую информацию о пользователе, содержит необходимые
|
||||
поля для отрисовки карточки информации о пользователе при клике на фамилию
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@
|
||||
<v-card-text class="text-center text-body-2">
|
||||
<p>
|
||||
Государственный советник Российской Федерации 2 класса
|
||||
|
||||
{{userlinks}}
|
||||
</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
<v-col class="d-flex ">
|
||||
<v-col class="d-flex">
|
||||
<v-row no-gutters :class="smAndDown ? ' flex-column' : ''">
|
||||
<v-col
|
||||
:md="mdAndDown ? '12' : ''"
|
||||
@@ -22,100 +22,95 @@
|
||||
v-for="structure in structures"
|
||||
:key="structure.id"
|
||||
>
|
||||
|
||||
<v-row no-gutters class="flex-grow-0">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row no-gutters class="mb-2 mt-1 justify-center d-flex mx-1">
|
||||
<v-card class="flex-column d-flex flex-grow-1" :elevation="10">
|
||||
<v-card-text class="pa-0">
|
||||
<v-col lg="12" class="pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col
|
||||
class="d-flex py-3 justify-center align-center font-weight-medium text-uppercase"
|
||||
>
|
||||
{{ structure.post }}
|
||||
<v-row no-gutters class="flex-grow-0">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row no-gutters class="mb-2 mt-1 justify-center d-flex mx-1">
|
||||
<v-card class="flex-column d-flex flex-grow-1" :elevation="10">
|
||||
<v-card-text class="pa-0">
|
||||
<v-col lg="12" class="pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col
|
||||
class="d-flex py-3 justify-center align-center font-weight-medium text-uppercase"
|
||||
>
|
||||
{{ structure.post }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-row no-gutters>
|
||||
<v-col lg="4" class="pa-1 heightfoto">
|
||||
<v-img
|
||||
class="h-100"
|
||||
:src="checkremote(`${spravURL}${structure.login}.jpg`)"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
<v-col
|
||||
class="text-center align-self-center font-weight-medium"
|
||||
>
|
||||
{{ structure.fio }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card> </v-row>
|
||||
</v-col>
|
||||
<!-- :class="mdAndDown ? 'flex-column gap' : ''" -->
|
||||
</v-row>
|
||||
|
||||
<v-row no-gutters :class="lgAndDown ?'':'gap h-0 overflow-auto'">
|
||||
<v-col lg=12 >
|
||||
<v-row
|
||||
no-gutters
|
||||
class="gap mb-1"
|
||||
v-for="boss in structure.deps"
|
||||
:key="boss.id"
|
||||
>
|
||||
<v-col class="d-flex flex-column">
|
||||
<v-card
|
||||
class="flex-column d-flex flex-grow-1 mx-1"
|
||||
:elevation="5"
|
||||
>
|
||||
<v-card-text class="pa-1 pt-3 px-3 flex-column">
|
||||
<v-col lg="12" class="minh pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col
|
||||
class="text-wrap text-center text-body-2 font-weight-medium text-uppercase"
|
||||
>
|
||||
{{ boss.name }}
|
||||
<v-col lg="4" class="pa-1 heightfoto">
|
||||
<v-img
|
||||
class="h-100"
|
||||
:src="
|
||||
checkremote(`${spravURL}${structure.login}.jpg`)
|
||||
"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-tooltip location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props">
|
||||
<v-icon
|
||||
size="large"
|
||||
color="green"
|
||||
icon="mdi-arrow-top-right"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<v-row>
|
||||
<v-col> Перейти на страницу отдела </v-col>
|
||||
</v-row>
|
||||
</v-tooltip>
|
||||
<v-col
|
||||
class="text-center align-self-center font-weight-medium"
|
||||
>
|
||||
{{ structure.fio }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-row no-gutters>
|
||||
<list-user :author="boss.chief_deps" />
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col> </v-row>
|
||||
</v-col>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<!-- :class="mdAndDown ? 'flex-column gap' : ''" -->
|
||||
</v-row>
|
||||
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
<!-- -->
|
||||
|
||||
<!-- -->
|
||||
<v-row no-gutters :class="lgAndDown ? '' : 'gap h-0 overflow-auto'">
|
||||
<v-col lg="12">
|
||||
<v-row
|
||||
no-gutters
|
||||
class="gap mb-1"
|
||||
v-for="boss in structure.deps"
|
||||
:key="boss.id"
|
||||
>
|
||||
<v-col class="d-flex flex-column">
|
||||
<v-card
|
||||
class="flex-column d-flex flex-grow-1 mx-1"
|
||||
:elevation="5"
|
||||
>
|
||||
<v-card-text class="pa-1 pt-3 px-3 flex-column">
|
||||
<v-col lg="12" class="minh pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col
|
||||
class="text-wrap text-center text-body-2 font-weight-medium text-uppercase"
|
||||
>
|
||||
{{ boss.name }}
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-tooltip location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props">
|
||||
<v-icon
|
||||
size="large"
|
||||
color="green"
|
||||
icon="mdi-arrow-top-right"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<v-row>
|
||||
<v-col> Перейти на страницу отдела </v-col>
|
||||
</v-row>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-row no-gutters>
|
||||
<list-user :author="boss.chief_deps" />
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -145,7 +140,7 @@ export default {
|
||||
spravURL,
|
||||
mdAndDown,
|
||||
lgAndDown,
|
||||
smAndDown
|
||||
smAndDown,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -372,6 +372,11 @@ export default {
|
||||
// ]
|
||||
|
||||
const navigations = ref([
|
||||
{
|
||||
name: "Новости",
|
||||
ico: "mdi-newspaper",
|
||||
path: "/news",
|
||||
},
|
||||
{
|
||||
name: "Структура",
|
||||
ico: "mdi-source-branch",
|
||||
@@ -407,15 +412,11 @@ export default {
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
|
||||
{
|
||||
name: "Новости",
|
||||
ico: "mdi-newspaper",
|
||||
path: "/news",
|
||||
},
|
||||
{
|
||||
name: "О портале",
|
||||
ico: "mdi-information-variant",
|
||||
path: "/portal",
|
||||
name: "Календарь",
|
||||
ico: "mdi-calendar",
|
||||
path: "/ical",
|
||||
},
|
||||
|
||||
{
|
||||
@@ -423,10 +424,11 @@ export default {
|
||||
ico: "mdi-city",
|
||||
path: "/inspection",
|
||||
},
|
||||
|
||||
{
|
||||
name: "ical",
|
||||
ico: "mdi-calendar",
|
||||
path: "/ical",
|
||||
name: "О портале",
|
||||
ico: "mdi-information-variant",
|
||||
path: "/portal",
|
||||
},
|
||||
|
||||
// {
|
||||
@@ -460,7 +462,7 @@ export default {
|
||||
ico: "mdi-security",
|
||||
submenu: response.data,
|
||||
};
|
||||
navigations.value.splice(5, 0, safetyMenu);
|
||||
navigations.value.splice(4, 0, safetyMenu);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user