【功能优化】全局:接入访问日志的操作信息

pull/43/head
YunaiV 2024-07-27 19:56:27 +08:00
parent 59d2baad30
commit 09d3fac3d3
3 changed files with 41 additions and 6 deletions

View File

@ -8,11 +8,15 @@ export interface ApiAccessLogVO {
applicationName: string
requestMethod: string
requestParams: string
responseBody: string
requestUrl: string
userIp: string
userAgent: string
operateModule: string
operateName: string
operateType: number
beginTime: Date
endTIme: Date
endTime: Date
duration: number
resultCode: number
resultMsg: string

View File

@ -83,21 +83,18 @@ export enum DICT_TYPE {
SYSTEM_ROLE_TYPE = 'system_role_type',
SYSTEM_DATA_SCOPE = 'system_data_scope',
SYSTEM_NOTICE_TYPE = 'system_notice_type',
SYSTEM_OPERATE_TYPE = 'system_operate_type',
SYSTEM_LOGIN_TYPE = 'system_login_type',
SYSTEM_LOGIN_RESULT = 'system_login_result',
SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code',
SYSTEM_SMS_TEMPLATE_TYPE = 'system_sms_template_type',
SYSTEM_SMS_SEND_STATUS = 'system_sms_send_status',
SYSTEM_SMS_RECEIVE_STATUS = 'system_sms_receive_status',
SYSTEM_ERROR_CODE_TYPE = 'system_error_code_type',
SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type',
SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status',
SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type',
// ========== INFRA 模块 ==========
INFRA_BOOLEAN_STRING = 'infra_boolean_string',
INFRA_REDIS_TIMEOUT_TYPE = 'infra_redis_timeout_type',
INFRA_JOB_STATUS = 'infra_job_status',
INFRA_JOB_LOG_STATUS = 'infra_job_log_status',
INFRA_API_ERROR_LOG_PROCESS_STATUS = 'infra_api_error_log_process_status',
@ -106,6 +103,7 @@ export enum DICT_TYPE {
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
INFRA_FILE_STORAGE = 'infra_file_storage',
INFRA_OPERATE_TYPE = 'infra_operate_type',
// ========== BPM 模块 ==========
BPM_MODEL_CATEGORY = 'bpm_model_category',

View File

@ -2,7 +2,7 @@ import { h } from 'vue'
import type { BasicColumn, FormSchema } from '@/components/Table'
import { useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import type { DescItem } from '@/components/Description/index'
import type { DescItem } from '@/components/Description'
export const columns: BasicColumn[] = [
{
@ -64,6 +64,24 @@ export const columns: BasicColumn[] = [
return useRender.renderTag(success ? '成功' : '失败', success ? '#87d068' : '#f50')
},
},
{
title: '操作模块',
dataIndex: 'operateModule',
width: 200,
},
{
title: '操作名',
dataIndex: 'operateName',
width: 180,
},
{
title: '操作类型',
dataIndex: 'operateType',
width: 120,
customRender: ({ text }) => {
return useRender.renderDict(text, DICT_TYPE.INFRA_OPERATE_TYPE)
},
},
]
export const searchFormSchema: FormSchema[] = [
@ -219,4 +237,19 @@ export const infoSchema: DescItem[] = [
return useRender.renderText(String(value), 'ms')
},
},
{
field: 'operateModule',
label: '操作模块',
},
{
field: 'operateName',
label: '操作名',
},
{
field: 'operateType',
label: '操作类型',
render(value) {
return useRender.renderDict(value, DICT_TYPE.INFRA_OPERATE_TYPE)
},
},
]