diff --git a/src/api/AlertMock.ts b/src/api/AlertMock.ts index 8ce3a5a..4a6c0e0 100644 --- a/src/api/AlertMock.ts +++ b/src/api/AlertMock.ts @@ -48,9 +48,11 @@ export interface DeviceConfigItem { export class PagingQueryParams extends PageQueryDto { alertType?: string; lineId?: number; + beginDateTime?: string; + endDateTime?: string; } -interface Item { +export interface Item { id: number; alertType: string; timeType: string; @@ -67,7 +69,7 @@ interface Item { export async function alarmInfoListQuery( params: PagingQueryParams ): Promise> { - const response = await api.get('/api/alertRecord/page/detail', { + const response = await api.post('/api/alertRecord/page/detail', { params: params, }); return response.data; @@ -93,8 +95,8 @@ export function recordConfirmAlarmInfoByTipType( * 错误报警处理 * @param recordId 推送的警告信息的id */ -export function recordFailAlarmInfoById(id: number) { - return api.get(`/api/alertRecord/fail/${id}`); +export function recordFailAlarmInfoById(recordId: number[]) { + return api.post('/api/alertRecord/fail', recordId); } export interface IReportParams { diff --git a/src/components/alarm/alarmInfoDialog.vue b/src/components/alarm/alarmInfoDialog.vue index a5c7180..6e4d075 100644 --- a/src/components/alarm/alarmInfoDialog.vue +++ b/src/components/alarm/alarmInfoDialog.vue @@ -167,7 +167,7 @@ function submitChooseType() { function falsePositives() { showDialog.value = false; - recordFailAlarmInfoById(+messageUse.id).then(() => { + recordFailAlarmInfoById([+messageUse.id]).then(() => { lineNetStore.alarmInfoListTable?.requestServerInteraction(); }); } diff --git a/src/pages/AlarmInfoList.vue b/src/pages/AlarmInfoList.vue index 4f4486d..a4c59bc 100644 --- a/src/pages/AlarmInfoList.vue +++ b/src/pages/AlarmInfoList.vue @@ -12,6 +12,8 @@ :loading="loading" binary-state-sort @request="onRequest" + selection="multiple" + v-model:selected="selected" >