1
1
<template >
2
- <Dialog
3
- title =" API 访问日志详细"
4
- v-model =" modelVisible"
5
- :scroll =" true"
6
- :max-height =" 500"
7
- width =" 800"
8
- >
2
+ <Dialog title =" 详情" v-model =" modelVisible" :scroll =" true" :max-height =" 500" width =" 800" >
9
3
<el-descriptions border :column =" 1" >
10
4
<el-descriptions-item label =" 日志主键" min-width =" 120" >
11
5
{{ detailData.id }}
17
11
{{ detailData.applicationName }}
18
12
</el-descriptions-item >
19
13
<el-descriptions-item label =" 用户信息" >
20
- {{ detailData.userId }} |
14
+ {{ detailData.userId }}
21
15
<dict-tag :type =" DICT_TYPE.USER_TYPE" :value =" detailData.userType" />
22
- | {{ detailData.userIp }} | {{ detailData.userAgent }}
16
+ </el-descriptions-item >
17
+ <el-descriptions-item label =" 用户 IP" >
18
+ {{ detailData.userIp }}
19
+ </el-descriptions-item >
20
+ <el-descriptions-item label =" 用户 UA" >
21
+ {{ detailData.userAgent }}
23
22
</el-descriptions-item >
24
23
<el-descriptions-item label =" 请求信息" >
25
- {{ detailData.requestMethod }} | {{ detailData.requestUrl }}
24
+ {{ detailData.requestMethod }} {{ detailData.requestUrl }}
26
25
</el-descriptions-item >
27
26
<el-descriptions-item label =" 请求参数" >
28
27
{{ detailData.requestParams }}
29
28
</el-descriptions-item >
30
- <el-descriptions-item label =" 开始时间 " >
29
+ <el-descriptions-item label =" 请求时间 " >
31
30
{{ formatDate(detailData.beginTime, 'YYYY-MM-DD HH:mm:ss') }} ~
32
- {{ formatDate(detailData.endTime, 'YYYY-MM-DD HH:mm:ss') }} | {{ detailData.duration }} ms
31
+ {{ formatDate(detailData.endTime, 'YYYY-MM-DD HH:mm:ss') }}
33
32
</el-descriptions-item >
33
+ <el-descriptions-item label =" 请求耗时" >{{ detailData.duration }} ms</el-descriptions-item >
34
34
<el-descriptions-item label =" 操作结果" >
35
35
<div v-if =" detailData.resultCode === 0" >正常</div >
36
36
<div v-else-if =" detailData.resultCode > 0"
@@ -51,7 +51,7 @@ const detailLoading = ref(false) // 表单地加载中
51
51
const detailData = ref () // 详情数据
52
52
53
53
/** 打开弹窗 */
54
- const openModal = async (data : ApiAccessLog .ApiAccessLogVO ) => {
54
+ const open = async (data : ApiAccessLog .ApiAccessLogVO ) => {
55
55
modelVisible .value = true
56
56
// 设置数据
57
57
detailLoading .value = true
@@ -62,5 +62,5 @@ const openModal = async (data: ApiAccessLog.ApiAccessLogVO) => {
62
62
}
63
63
}
64
64
65
- defineExpose ({ openModal }) // 提供 openModal 方法,用于打开弹窗
65
+ defineExpose ({ open }) // 提供 open 方法,用于打开弹窗
66
66
</script >
0 commit comments