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({