代码调整

This commit is contained in:
dong 2023-11-03 13:45:40 +08:00
parent ea54841d8a
commit f345c17a1d
2 changed files with 15 additions and 11 deletions

View File

@ -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 },
];

View File

@ -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<Ifilter>({
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 },
];
</script>