From 09d3fac3d3945123b6332957023f1827744cd197 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 27 Jul 2024 19:56:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E5=85=A8=E5=B1=80=EF=BC=9A=E6=8E=A5=E5=85=A5=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=97=A5=E5=BF=97=E7=9A=84=E6=93=8D=E4=BD=9C=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/apiAccessLog/index.ts | 6 ++- src/utils/dict.ts | 4 +- .../infra/apiAccessLog/apiAccessLog.data.ts | 37 ++++++++++++++++++- 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts index b76d00d8..7cdd57d1 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -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 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 8d4af3f3..e6e9386d 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -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', diff --git a/src/views/infra/apiAccessLog/apiAccessLog.data.ts b/src/views/infra/apiAccessLog/apiAccessLog.data.ts index 6dd2d376..9718080f 100644 --- a/src/views/infra/apiAccessLog/apiAccessLog.data.ts +++ b/src/views/infra/apiAccessLog/apiAccessLog.data.ts @@ -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) + }, + }, +] \ No newline at end of file