blob: 9885aa700dcd04a35f5251c6cb3c71879c0485b0 [file] [log] [blame]
86133aaa3f5d2025-04-20 21:33:29 +08001import { request } from '@umijs/max';
2import { downLoadXlsx } from '@/utils/downloadfile';
3
4/**
5 * 定时任务调度日志 API
6 *
7 * @author whiteshader
8 * @date 2023-02-07
9 */
10
11// 查询定时任务调度日志列表
12export async function getJobLogList(params?: API.Monitor.JobLogListParams) {
13 return request<API.Monitor.JobLogPageResult>('/api/schedule/job/log/list', {
14 method: 'GET',
15 headers: {
16 'Content-Type': 'application/json;charset=UTF-8',
17 },
18 params
19 });
20}
21
22
23// 删除定时任务调度日志
24export async function removeJobLog(jobLogId: string) {
25 return request<API.Result>(`/api/schedule/job/log/${jobLogId}`, {
26 method: 'DELETE'
27 });
28}
29
30// 清空调度日志
31export function cleanJobLog() {
32 return request('/api/schedule/job/log/clean', {
33 method: 'delete'
34 })
35}
36
37// 导出定时任务调度日志
38export function exportJobLog(params?: API.Monitor.JobLogListParams) {
39 return downLoadXlsx(`/api/monitor/jobLog/export`, { params }, `joblog_${new Date().getTime()}.xlsx`);
40}