From 6b6f455249c09eadc81562fb3b222169eb11270f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 12 May 2021 00:59:48 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=8A=9F=E8=83=BD(=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E7=BB=84=E4=BB=B6=E5=B0=81=E8=A3=85):=20=E5=B0=81?= =?UTF-8?q?=E8=A3=85=E9=83=A8=E9=97=A8=E9=80=89=E6=8B=A9=E5=99=A8=E3=80=81?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=80=89=E6=8B=A9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dvadmin-ui/src/components/DeptTree/index.vue | 55 ++++++++++++++++++ dvadmin-ui/src/components/UsersTree/index.vue | 56 +++++++++++++++++++ dvadmin-ui/src/main.js | 4 ++ 3 files changed, 115 insertions(+) create mode 100644 dvadmin-ui/src/components/DeptTree/index.vue create mode 100644 dvadmin-ui/src/components/UsersTree/index.vue diff --git a/dvadmin-ui/src/components/DeptTree/index.vue b/dvadmin-ui/src/components/DeptTree/index.vue new file mode 100644 index 0000000..4c4c465 --- /dev/null +++ b/dvadmin-ui/src/components/DeptTree/index.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/dvadmin-ui/src/components/UsersTree/index.vue b/dvadmin-ui/src/components/UsersTree/index.vue new file mode 100644 index 0000000..faaf109 --- /dev/null +++ b/dvadmin-ui/src/components/UsersTree/index.vue @@ -0,0 +1,56 @@ + + + + + + diff --git a/dvadmin-ui/src/main.js b/dvadmin-ui/src/main.js index e589237..0716514 100755 --- a/dvadmin-ui/src/main.js +++ b/dvadmin-ui/src/main.js @@ -30,6 +30,8 @@ import Pagination from "@/components/Pagination"; // 自定义表格工具扩展 import RightToolbar from "@/components/RightToolbar" import SmallDialog from '@/components/SmallDialog'; +import DeptTree from '@/components/DeptTree'; +import UsersTree from '@/components/UsersTree'; import CommonIcon from '@/components/CommonIcon'; import CommonStaticTable from '@/components/CommonStaticTable'; import {getCrontabData, getIntervalData} from "./utils/validate"; // 通用图标组件 @@ -67,6 +69,8 @@ Vue.prototype.msgInfo = function (msg) { } // 自定义组件 Vue.component('small-dialog', SmallDialog); +Vue.component('dept-tree', DeptTree); +Vue.component('users-tree', UsersTree); // 全局组件挂载 Vue.component('Pagination', Pagination) Vue.component('RightToolbar', RightToolbar) From 9121e7ad29f60165bbfd447e3f55f825997e1c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 12 May 2021 01:01:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG(=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=AE=A1=E7=90=86=E5=91=98=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AFBUG):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dvadmin-backend/apps/vadmin/permission/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvadmin-backend/apps/vadmin/permission/serializers.py b/dvadmin-backend/apps/vadmin/permission/serializers.py index 6d1fd7a..f93212c 100644 --- a/dvadmin-backend/apps/vadmin/permission/serializers.py +++ b/dvadmin-backend/apps/vadmin/permission/serializers.py @@ -235,7 +235,7 @@ class UserProfileSerializer(CustomModelSerializer): class Meta: model = UserProfile depth = 1 - exclude = ('password', 'secret', 'user_permissions', 'groups', 'is_superuser', 'date_joined') + exclude = ('password', 'secret', 'user_permissions', 'groups', 'is_superuser', 'date_joined', 'creator') class ExportUserProfileSerializer(CustomModelSerializer): From 89a0c66455945914a2e819d6be540b98429de32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Wed, 12 May 2021 19:57:00 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96(?= =?UTF-8?q?=E6=A1=86=E6=9E=B6-=E5=88=86=E9=A1=B5=E5=99=A8):=20=E5=8F=AF?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E8=87=AA=E5=AE=9A=E4=B9=89=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dvadmin-backend/application/settings.py | 2 +- dvadmin-backend/apps/vadmin/op_drf/generics.py | 2 +- dvadmin-backend/apps/vadmin/op_drf/viewsets.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dvadmin-backend/application/settings.py b/dvadmin-backend/application/settings.py index 7e19586..75411de 100644 --- a/dvadmin-backend/application/settings.py +++ b/dvadmin-backend/application/settings.py @@ -283,7 +283,7 @@ REST_FRAMEWORK = { ), 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema', - 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'DEFAULT_PAGINATION_CLASS': 'vadmin.op_drf.pagination.JsonPagination', 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), 'EXCEPTION_HANDLER': 'apps.vadmin.utils.exceptions.op_exception_handler', } diff --git a/dvadmin-backend/apps/vadmin/op_drf/generics.py b/dvadmin-backend/apps/vadmin/op_drf/generics.py index f508c38..802c111 100644 --- a/dvadmin-backend/apps/vadmin/op_drf/generics.py +++ b/dvadmin-backend/apps/vadmin/op_drf/generics.py @@ -45,7 +45,7 @@ class GenericAPIView(CustomAPIView): filter_backends = api_settings.DEFAULT_FILTER_BACKENDS # The style to use for queryset pagination. - pagination_class = Pagination + pagination_class = api_settings.DEFAULT_PAGINATION_CLASS def get_queryset(self): """ diff --git a/dvadmin-backend/apps/vadmin/op_drf/viewsets.py b/dvadmin-backend/apps/vadmin/op_drf/viewsets.py index d707526..5119aa0 100644 --- a/dvadmin-backend/apps/vadmin/op_drf/viewsets.py +++ b/dvadmin-backend/apps/vadmin/op_drf/viewsets.py @@ -29,7 +29,7 @@ def get_object_or_404(queryset, *filter_args, **filter_kwargs): class GenericViewSet(ViewSetMixin, GenericAPIView): extra_filter_backends = [] - pagination_class = Pagination + pagination_class = api_settings.DEFAULT_PAGINATION_CLASS filter_backends = [DjangoFilterBackend, OrderingFilter, SearchFilter, AdvancedSearchFilter] view_logger_classes = (CustomerModelViewLogger,) From 9044a2d137afba9d35c94bbf603b244d6d170abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Thu, 13 May 2021 09:02:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96(?= =?UTF-8?q?=E6=A1=86=E6=9E=B6-=E5=88=86=E9=A1=B5=E5=99=A8):=20=E5=8F=AF?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E8=87=AA=E5=AE=9A=E4=B9=89=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dvadmin-backend/application/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvadmin-backend/application/settings.py b/dvadmin-backend/application/settings.py index 75411de..05a9015 100644 --- a/dvadmin-backend/application/settings.py +++ b/dvadmin-backend/application/settings.py @@ -283,7 +283,7 @@ REST_FRAMEWORK = { ), 'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema', - 'DEFAULT_PAGINATION_CLASS': 'vadmin.op_drf.pagination.JsonPagination', + 'DEFAULT_PAGINATION_CLASS': 'vadmin.op_drf.pagination.Pagination', 'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',), 'EXCEPTION_HANDLER': 'apps.vadmin.utils.exceptions.op_exception_handler', }