fix: 告警清除自定义产生的改换接口

This commit is contained in:
TsMask
2025-06-04 15:16:45 +08:00
parent 7e21e25cf3
commit a9cb35ba4f
2 changed files with 16 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ export function getPass() {
* @param data 鉴权对象
* @returns object
*/
export function clearAlarm(data: Record<string, any>) {
export function clearAlarm2(data: Record<string, any>) {
var time = new Date();
const userName = useUserStore().userName;
let finalData = {
@@ -232,6 +232,19 @@ export function clearAlarm(data: Record<string, any>) {
});
}
/**
* 清除告警信息
* @param ids 记录ID
* @returns object
*/
export function clearAlarm(ids: string[]) {
return request({
url: `/neData/alarm/clear`,
method: 'PUT',
data: { ids },
});
}
/**
* 手工同步
* @param data 鉴权对象

View File

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