fix: queries continue running after page unmounted

This commit is contained in:
yangsy
2025-08-25 23:32:25 +08:00
parent 59a14cb9e1
commit 3cfb829608
20 changed files with 98 additions and 112 deletions

View File

@@ -2,7 +2,7 @@
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
import { ndmDeviceAlarmLogDefaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests';
import { JAVA_INTEGER_MAX_VALUE } from '@/constants';
import { DeviceType, DeviceTypeName, type DeviceTypeCode } from '@/enums/device-type';
import { DeviceType, DeviceTypeName, type DeviceTypeVal } from '@/enums/device-type';
import { useStationStore } from '@/stores/station';
import { downloadByData } from '@/utils/download';
import { useMutation } from '@tanstack/vue-query';
@@ -49,7 +49,7 @@ const tableColumns: DataTableColumns<NdmDeviceAlarmLogResultVO> = [
title: '设备类型',
key: 'deviceType',
render: (rowData) => {
return DeviceTypeName[(rowData.deviceType ?? DeviceType.Camera) as DeviceTypeCode];
return DeviceTypeName[(rowData.deviceType ?? DeviceType.Camera) as DeviceTypeVal];
},
},
{ title: '设备名称', key: 'deviceName' },