feat:告警配置界面接口对接
This commit is contained in:
33
apps/web-antd/src/api/alert/alert.ts
Normal file
33
apps/web-antd/src/api/alert/alert.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user