5 changed files with 82 additions and 12 deletions
@ -0,0 +1,34 @@ |
|||||||
|
/** |
||||||
|
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||||
|
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||||
|
* author entfrm开发团队-王翔 |
||||||
|
*/ |
||||||
|
import type { OperLogParams, OperLog, OperLogResult } from '/@/api/platform/monitor/entity/operLog'; |
||||||
|
import { defHttp } from '/@/utils/http/axios'; |
||||||
|
|
||||||
|
enum Api { |
||||||
|
list = '/system_proxy/system/dict/list', |
||||||
|
add = '/system_proxy/system/dict/save', |
||||||
|
get = '/system_proxy/system/dict', |
||||||
|
edit = '/system_proxy/system/dict/update', |
||||||
|
del = '/system_proxy/system/dict/remove', |
||||||
|
changeStatus='/system_proxy/system/dict/changeStatus' |
||||||
|
} |
||||||
|
|
||||||
|
/** 查询配置列表 */ |
||||||
|
export const listDict = (params?: Partial<DictParams>) => defHttp.get<DictResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||||
|
|
||||||
|
/** 新增配置 */ |
||||||
|
export const addDict = (params: Partial<Dict>) => defHttp.post({ url: Api.add, data: params }); |
||||||
|
|
||||||
|
/** 修改配置 */ |
||||||
|
export const editDict = (params: Partial<Dict>) => defHttp.put({ url: Api.edit, data: params }); |
||||||
|
|
||||||
|
/** 查询配置详细 */ |
||||||
|
export const getDict = (id: string) => defHttp.get<Dict>({ url: `${Api.get}/${id}` }); |
||||||
|
|
||||||
|
/** 删除配置 */ |
||||||
|
export const delDict = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
||||||
|
|
||||||
|
/** 修改字典状态 */ |
||||||
|
export const changeStatus = (id: string, status: string) => defHttp.put({ url: Api.changeStatus, data: { id: id, status: status } }); |
@ -0,0 +1,36 @@ |
|||||||
|
/** |
||||||
|
* @program: kicc-ui |
||||||
|
* @description: 操作日志实体类 |
||||||
|
* 类型定义 |
||||||
|
* @author: entfrm开发团队-王翔 |
||||||
|
* @create: 2022/4/8 |
||||||
|
*/ |
||||||
|
import { R } from '/#/axios'; |
||||||
|
import { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||||
|
|
||||||
|
/** 操作日志查询参数 */ |
||||||
|
export type OperLogParams = Page & OperLog; |
||||||
|
|
||||||
|
/** 操作日志对象 */ |
||||||
|
export interface OperLog extends CommonEntity { |
||||||
|
id: string; |
||||||
|
title: string; |
||||||
|
type: string; |
||||||
|
method: string; |
||||||
|
userAgent: string; |
||||||
|
operName: string; |
||||||
|
clientId: string; |
||||||
|
operUrl: string; |
||||||
|
operIp: string; |
||||||
|
operAddr: string; |
||||||
|
operParam: string; |
||||||
|
status: string; |
||||||
|
errorMsg: string; |
||||||
|
executeTime: string; |
||||||
|
operTime: string; |
||||||
|
serviceId: string; |
||||||
|
[key: string]: any; |
||||||
|
} |
||||||
|
|
||||||
|
/** 操作日志响应对象 */ |
||||||
|
export type OperLogResult = R<OperLog[]>; |
Loading…
Reference in new issue