diff --git a/apps/ecm/views.py b/apps/ecm/views.py index 0ff5288c..76e5f947 100644 --- a/apps/ecm/views.py +++ b/apps/ecm/views.py @@ -26,6 +26,7 @@ from apps.ecm.service import update_remind_read from apps.utils.viewsets import CustomGenericViewSet, CustomModelViewSet from apps.utils.export import export_excel_img from apps.ecm.tasks import monitor_check +from apps.utils.mixins import BulkDestroyModelMixin obj_cate_dict = {'people': '人员', 'opl': '作业', 'other': '其他'} mark_dict = {10: '正常', 20: '误报'} @@ -89,7 +90,7 @@ class NotifySettingViewSet(CustomModelViewSet): ordering = ['sort', 'create_time'] -class EventViewSet(ListModelMixin, RetrieveModelMixin, DestroyModelMixin, CustomGenericViewSet): +class EventViewSet(ListModelMixin, RetrieveModelMixin, BulkDestroyModelMixin, CustomGenericViewSet): perms_map = {'get': '*', 'delete': 'event.delete'} queryset = Event.objects.all() serializer_class = EventSerializer