Blame view

Yi.Vben5.Vue3/apps/web-antd/src/api/monitor/operlog/index.ts 1.03 KB
515fceeb   “wangming”   框架初始化
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  import type { OperationLog } from './model';
  
  import type { IDS, PageQuery, PageResult } from '#/api/common';
  
  import { commonExport } from '#/api/helper';
  import { requestClient } from '#/api/request';
  
  enum Api {
    operLogClean = '/operation-log/clean',
    operLogExport = '/operation-log/export',
    root = '/operation-log',
  }
  
  /**
   * 操作日志分页
   * @param params 查询参数
   * @returns 分页结果
   */
  export function operLogList(params?: PageQuery) {
    return requestClient.get<PageResult<OperationLog>>(Api.root, {
      params,
    });
  }
  
  /**
   * 删除操作日志
   * @param operIds id/ids
   */
  export function operLogRemove(operIds: IDS) {
    return requestClient.deleteWithMsg<void>(Api.root, {
      params: { ids: operIds.join(',') },
    });
  }
  
  /**
   * 清空全部分页日志
   */
  export function operLogClean() {
    return requestClient.deleteWithMsg<void>(Api.operLogClean);
  }
  
  /**
   * 导出操作日志
   * @param data 查询参数
   */
  export function operLogExport(data: Partial<OperationLog>) {
    return commonExport(Api.operLogExport, data);
  }