feat: event 支持批量删除

This commit is contained in:
caoqianming 2023-09-04 16:59:21 +08:00
parent 75533d41ed
commit 77e92062fb
1 changed files with 2 additions and 1 deletions

View File

@ -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