From 4cd0e6933ad120eb984679538085161f1420a665 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Thu, 23 May 2024 11:32:40 +0300 Subject: [PATCH] 38 fix1 --- src/back/accounts/views.py | 13 +- src/back/userauth/serializers.py | 1 + .../GeneralInformation.vue | 2 +- .../structure/StructureInspection.vue | 167 +++++++++--------- .../src/layouts/default/DefaultPortal.vue | 26 +-- 5 files changed, 106 insertions(+), 103 deletions(-) diff --git a/src/back/accounts/views.py b/src/back/accounts/views.py index 123f3cb5e..b3a72df86 100644 --- a/src/back/accounts/views.py +++ b/src/back/accounts/views.py @@ -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) diff --git a/src/back/userauth/serializers.py b/src/back/userauth/serializers.py index 41fa35c5f..feefe662a 100644 --- a/src/back/userauth/serializers.py +++ b/src/back/userauth/serializers.py @@ -127,6 +127,7 @@ class CardUserSerializer(serializers.ModelSerializer): return Committee2Serializer(obj.user_committe2.all(), many=True).data + class InfoUserCardSerializer(serializers.ModelSerializer): """ Собирает необходимую информацию о пользователе, содержит необходимые поля для отрисовки карточки информации о пользователе при клике на фамилию diff --git a/src/front/src/components/about_inspection/general_information/GeneralInformation.vue b/src/front/src/components/about_inspection/general_information/GeneralInformation.vue index 08f82126b..9625b3bfb 100644 --- a/src/front/src/components/about_inspection/general_information/GeneralInformation.vue +++ b/src/front/src/components/about_inspection/general_information/GeneralInformation.vue @@ -44,7 +44,7 @@

Государственный советник Российской Федерации 2 класса - + {{userlinks}}

diff --git a/src/front/src/components/about_inspection/structure/StructureInspection.vue b/src/front/src/components/about_inspection/structure/StructureInspection.vue index 708feb345..7f5aaa38c 100644 --- a/src/front/src/components/about_inspection/structure/StructureInspection.vue +++ b/src/front/src/components/about_inspection/structure/StructureInspection.vue @@ -13,7 +13,7 @@ - + - - - - - - - - - - {{ structure.post }} + + + + + + + + + {{ structure.post }} + + - - - - - - - - {{ structure.fio }} - - - - - - - - - - - - - - - - - {{ boss.name }} + + - - - - - Перейти на страницу отдела - - + + {{ structure.fio }} - - - - - - - - + + + + + + - - - - - - - + + + + + + + + + + {{ boss.name }} + + + + + + Перейти на страницу отдела + + + + + + + + + + + + + + -