From 763a4f059ca4ea9a4e98a1a969c3315f7e8b55d0 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Tue, 31 Oct 2023 11:03:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82--=E4=B8=80=E9=94=AE=E8=AF=AF?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/AlertMock.ts | 10 +- src/components/alarm/alarmInfoDialog.vue | 2 +- src/pages/AlarmInfoList.vue | 221 +++++++++++++++++++++-- 3 files changed, 216 insertions(+), 17 deletions(-) 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" >