From a9cb35ba4f9b5380995688f17781ae80718da1d3 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 4 Jun 2025 15:16:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=91=8A=E8=AD=A6=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BA=A7=E7=94=9F=E7=9A=84=E6=94=B9?= =?UTF-8?q?=E6=8D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/faultManage/actAlarm.ts | 15 ++++++++++++++- src/views/faultManage/active-alarm/index.vue | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/api/faultManage/actAlarm.ts b/src/api/faultManage/actAlarm.ts index 0cf5cb4e..4d8f2dcc 100644 --- a/src/api/faultManage/actAlarm.ts +++ b/src/api/faultManage/actAlarm.ts @@ -211,7 +211,7 @@ export function getPass() { * @param data 鉴权对象 * @returns object */ -export function clearAlarm(data: Record) { +export function clearAlarm2(data: Record) { var time = new Date(); const userName = useUserStore().userName; let finalData = { @@ -232,6 +232,19 @@ export function clearAlarm(data: Record) { }); } +/** + * 清除告警信息 + * @param ids 记录ID + * @returns object + */ +export function clearAlarm(ids: string[]) { + return request({ + url: `/neData/alarm/clear`, + method: 'PUT', + data: { ids }, + }); +} + /** * 手工同步 * @param data 鉴权对象 diff --git a/src/views/faultManage/active-alarm/index.vue b/src/views/faultManage/active-alarm/index.vue index 474e988d..ba320443 100644 --- a/src/views/faultManage/active-alarm/index.vue +++ b/src/views/faultManage/active-alarm/index.vue @@ -558,7 +558,8 @@ function fnClear() { content: t('views.faultManage.activeAlarm.delSure'), onOk() { const hide = message.loading(t('common.loading'), 0); - clearAlarm(state.selectedRowKeys).then(res => { + const ids = state.selectedRowKeys.map(v => `${v}`); + clearAlarm(ids).then(res => { hide(); if (res.code === RESULT_CODE_SUCCESS) { message.success({