diff --git a/src/components/alarm/alarmInfoEnum.ts b/src/components/alarm/alarmInfoEnum.ts index 9b7afbd..cf825f7 100644 --- a/src/components/alarm/alarmInfoEnum.ts +++ b/src/components/alarm/alarmInfoEnum.ts @@ -120,3 +120,11 @@ export function isArraysEqual(arr1: string[], arr2: string[]) { } return arr1.sort().join(',') === arr2.sort().join(','); } + +export const alertStatusOptions = [ + { label: '全部', value: 999 }, + { label: '未处理', value: -1 }, + { label: '误报', value: 0 }, + { label: '确认', value: 1 }, + { label: '人工接警', value: 2 }, +]; diff --git a/src/components/alarm/alarmStatistics.vue b/src/components/alarm/alarmStatistics.vue index d71e9bc..f663eff 100644 --- a/src/components/alarm/alarmStatistics.vue +++ b/src/components/alarm/alarmStatistics.vue @@ -199,7 +199,11 @@ import DraggableDialog from '../common/DraggableDialog.vue'; import { ref, reactive, computed } from 'vue'; import { useQuasar, type QTableColumn, QForm, date } from 'quasar'; import { IReportParams, recordAlarmReport } from 'src/api/AlertMock'; -import { showAlertTypeData, saveAlertTypeData } from './alarmInfoEnum'; +import { + showAlertTypeData, + saveAlertTypeData, + alertStatusOptions, +} from './alarmInfoEnum'; const $q = useQuasar(); const dialogWidth = window.screen.width * 0.6; @@ -252,7 +256,7 @@ const filter = reactive({ lineId: 3, beginDateTime: '', endDateTime: '', - alertStatus: 3, + alertStatus: 999, }); const loading = ref(false); const pagination = ref({ @@ -278,7 +282,7 @@ function onRequest() { if (filter.endDateTime) { Object.assign(params, { endDateTime: filter.endDateTime }); } - if (filter.alertStatus != 3) { + if (filter.alertStatus != 999) { Object.assign(params, { alertStatus: filter.alertStatus }); } const response = await recordAlarmReport(filter.lineId, params); @@ -351,12 +355,4 @@ function timeRangeValidation() { errorMessageEndTime.value = ''; return true; } - -const alertStatusOptions = [ - { label: '全部', value: 3 }, - { label: '未处理', value: -1 }, - { label: '误报', value: 0 }, - { label: '确认', value: 1 }, - { label: '人工接警', value: 2 }, -];