Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
757281ce
authored
Apr 03, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】增强访问日志,支持是否记录、脱敏、操作信息等功能
parent
ffc81621
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
src/api/infra/apiAccessLog/index.ts
+5
-1
src/views/infra/apiAccessLog/ApiAccessLogDetail.vue
+12
-0
src/views/infra/apiAccessLog/index.vue
+11
-4
No files found.
src/api/infra/apiAccessLog/index.ts
View file @
757281ce
...
...
@@ -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
endT
I
me
:
Date
endT
i
me
:
Date
duration
:
number
resultCode
:
number
resultMsg
:
string
...
...
src/views/infra/apiAccessLog/ApiAccessLogDetail.vue
View file @
757281ce
...
...
@@ -26,6 +26,9 @@
<el-descriptions-item
label=
"请求参数"
>
{{
detailData
.
requestParams
}}
</el-descriptions-item>
<el-descriptions-item
label=
"请求结果"
>
{{
detailData
.
responseBody
}}
</el-descriptions-item>
<el-descriptions-item
label=
"请求时间"
>
{{
formatDate
(
detailData
.
beginTime
)
}}
~
{{
formatDate
(
detailData
.
endTime
)
}}
</el-descriptions-item>
...
...
@@ -36,6 +39,15 @@
失败 |
{{
detailData
.
resultCode
}}
|
{{
detailData
.
resultMsg
}}
</div>
</el-descriptions-item>
<el-descriptions-item
label=
"操作模块"
>
{{
detailData
.
operateModule
}}
</el-descriptions-item>
<el-descriptions-item
label=
"操作名"
>
{{
detailData
.
operateName
}}
</el-descriptions-item>
<el-descriptions-item
label=
"操作名"
>
<dict-tag
:type=
"DICT_TYPE.SYSTEM_OPERATE_TYPE"
:value=
"detailData.operateType"
/>
</el-descriptions-item>
</el-descriptions>
</Dialog>
</
template
>
...
...
src/views/infra/apiAccessLog/index.vue
View file @
757281ce
...
...
@@ -91,16 +91,16 @@
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"日志编号"
align=
"center"
prop=
"id"
width=
"100"
fix=
"right"
/>
<el-table-column
label=
"用户编号"
align=
"center"
prop=
"userId"
/>
<el-table-column
label=
"用户类型"
align=
"center"
prop=
"userType"
>
<template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.USER_TYPE"
:value=
"scope.row.userType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"应用名"
align=
"center"
prop=
"applicationName"
/>
<el-table-column
label=
"应用名"
align=
"center"
prop=
"applicationName"
width=
"150"
/>
<el-table-column
label=
"请求方法"
align=
"center"
prop=
"requestMethod"
width=
"80"
/>
<el-table-column
label=
"请求地址"
align=
"center"
prop=
"requestUrl"
width=
"
25
0"
/>
<el-table-column
label=
"请求地址"
align=
"center"
prop=
"requestUrl"
width=
"
50
0"
/>
<el-table-column
label=
"请求时间"
align=
"center"
prop=
"beginTime"
width=
"180"
>
<
template
#
default=
"scope"
>
<span>
{{
formatDate
(
scope
.
row
.
beginTime
)
}}
</span>
...
...
@@ -114,7 +114,14 @@
{{
scope
.
row
.
resultCode
===
0
?
'成功'
:
'失败('
+
scope
.
row
.
resultMsg
+
')'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作模块"
align=
"center"
prop=
"operateModule"
width=
"180"
/>
<el-table-column
label=
"操作名"
align=
"center"
prop=
"operateName"
width=
"180"
/>
<el-table-column
label=
"操作类型"
align=
"center"
prop=
"operateType"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.SYSTEM_OPERATE_TYPE"
:value=
"scope.row.operateType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"60"
>
<
template
#
default=
"scope"
>
<el-button
link
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment