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