feat: mgroup增加查询条件

This commit is contained in:
caoqianming 2023-11-29 16:12:21 +08:00
parent ab0bc60c23
commit e07034919d
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ class MgroupViewSet(CustomModelViewSet):
queryset = Mgroup.objects.all()
serializer_class = MgroupSerializer
select_related_fields = ['create_by', 'belong_dept', 'process']
filterset_fields = ['belong_dept', 'process', 'cate', 'belong_dept__name']
filterset_fields = ['belong_dept', 'process',
'cate', 'belong_dept__name', 'name']
search_fields = ['number']
ordering = ['sort', 'create_time']