测试组/Test_platform/Interface_automation/backend/apps/lunarlink/views/project.py
@@ -9,6 +9,7 @@
"""
from typing import Dict
from django.contrib.auth.models import Group
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db import IntegrityError, transaction
from django.db.models import Count
@@ -167,6 +168,13 @@
        ser = self.get_serializer(obj, many=False)
        return Response(ser.data)
    @method_decorator(request_log(level="INFO"))
    def group_list(self, request):
        """获取所有分组列表"""
        groups = Group.objects.all()
        group_list = [{"id": group.id, "name": group.name} for group in groups]
        return Response(group_list)
class DashBoardView(APIView):
    """项目看板"""
@@ -281,7 +289,7 @@
            # 包含今天的前6天
            "recent_days": [get_day(n)[5:] for n in range(-5, 1)],
            "recent_months": [get_month_format(n) for n in range(-5, 1)],
            "recent_weeks": [get_week_format(n) for n in range(-5, 1)],
            "recent_weeks": [get_week_format(n) for n in range(-5, 1)]
        }
        return Response(res)