60 lines
2.4 KiB
TypeScript
60 lines
2.4 KiB
TypeScript
/**
|
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
|
* No deletion without permission, or be held responsible to law.
|
|
* @author gaoxq
|
|
*/
|
|
import { defHttp } from '@jeesite/core/utils/http/axios';
|
|
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
|
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
|
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
|
import { UploadFileParams } from '@jeesite/types/axios';
|
|
import { AxiosProgressEvent } from 'axios';
|
|
|
|
const { ctxPath, adminPath } = useGlobSetting();
|
|
|
|
export interface BizWarningAlert extends BasicModel<BizWarningAlert> {
|
|
createTime: string; // 创建时间
|
|
alertCode: string; // 预警编码
|
|
alertType: string; // 预警类型
|
|
alertLevel: number; // 预警级别
|
|
alertTitle: string; // 预警标题
|
|
alertContent: string; // 预警详细内容
|
|
triggerTime: string; // 预警触发时间
|
|
sourceSystem?: string; // 来源系统
|
|
alertStatus: string; // 预警状态
|
|
handlerUser?: string; // 处理人员
|
|
handleTime: string; // 处理时间
|
|
handleNote: string; // 处理备注
|
|
updateTime?: string; // 更新时间
|
|
}
|
|
|
|
export const bizWarningAlertList = (params?: BizWarningAlert | any) =>
|
|
defHttp.get<BizWarningAlert>({ url: adminPath + '/biz/warningAlert/list', params });
|
|
|
|
export const bizWarningAlertListAll = (params?: BizWarningAlert | any) =>
|
|
defHttp.get<BizWarningAlert[]>({ url: adminPath + '/biz/warningAlert/listAll', params });
|
|
|
|
export const bizWarningAlertListData = (params?: BizWarningAlert | any) =>
|
|
defHttp.post<Page<BizWarningAlert>>({ url: adminPath + '/biz/warningAlert/listData', params });
|
|
|
|
export const bizWarningAlertForm = (params?: BizWarningAlert | any) =>
|
|
defHttp.get<BizWarningAlert>({ url: adminPath + '/biz/warningAlert/form', params });
|
|
|
|
export const bizWarningAlertSave = (params?: any, data?: BizWarningAlert | any) =>
|
|
defHttp.postJson<BizWarningAlert>({ url: adminPath + '/biz/warningAlert/save', params, data });
|
|
|
|
export const bizWarningAlertImportData = (
|
|
params: UploadFileParams,
|
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void,
|
|
) =>
|
|
defHttp.uploadFile<UploadApiResult>(
|
|
{
|
|
url: ctxPath + adminPath + '/biz/warningAlert/importData',
|
|
onUploadProgress,
|
|
},
|
|
params,
|
|
);
|
|
|
|
export const bizWarningAlertDelete = (params?: BizWarningAlert | any) =>
|
|
defHttp.get<BizWarningAlert>({ url: adminPath + '/biz/warningAlert/delete', params });
|