feat:告警配置界面接口对接

This commit is contained in:
zhongzm
2025-08-11 11:21:10 +08:00
parent 2c6106c869
commit 9237488b17
5 changed files with 448 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace AlertApi {
export interface Alert {
id: number;
users: [];
days: [];
content: string;
status: number;
templateCode: string;
remark: string;
createTime: string;
}
export interface AlertPageReq extends PageParam {
reminderName?: string;
expireTime?: string;
reminderDays?: number;
}
}
// 获取告警列表
export function getAlertPage(params: PageParam) {
return requestClient.get<PageResult<AlertApi.Alert>>('/license/alert/page', {
params,
});
}
// 修改告警配置
export function updateAlert(data: AlertApi.Alert) {
return requestClient.put('/license/alert/update', data);
}