Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
shop-vite-main
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
front-base-project
shop-vite-main
Commits
dc4635f7
提交
dc4635f7
authored
12月 20, 2024
作者:
郁骅焌
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
操作日志
上级
14310e6f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
163 行增加
和
1 行删除
+163
-1
components.d.ts
library/build/unplugin/components.d.ts
+1
-0
operatorLog.ts
src/api/operatorLog.ts
+26
-0
main.ts
src/main.ts
+3
-1
index.ts
src/utils/index.ts
+44
-0
loginLog.vue
src/views/system/logManagement/loginLog.vue
+0
-0
operatorLog.vue
src/views/system/logManagement/operatorLog.vue
+0
-0
OperatorDetail.vue
...system/logManagement/vabAutoComponents/OperatorDetail.vue
+89
-0
没有找到文件。
library/build/unplugin/components.d.ts
浏览文件 @
dc4635f7
...
@@ -149,6 +149,7 @@ declare module 'vue' {
...
@@ -149,6 +149,7 @@ declare module 'vue' {
MenuManagementEdit2
:
typeof
import
(
'./../../../src/views/system/menuManagement/vabAutoComponents/MenuManagementEdit2.vue'
)[
'default'
]
MenuManagementEdit2
:
typeof
import
(
'./../../../src/views/system/menuManagement/vabAutoComponents/MenuManagementEdit2.vue'
)[
'default'
]
NodePanel
:
typeof
import
(
'./../../../src/views/other/workflow/vabAutoComponents/lFComponents/NodePanel.vue'
)[
'default'
]
NodePanel
:
typeof
import
(
'./../../../src/views/other/workflow/vabAutoComponents/lFComponents/NodePanel.vue'
)[
'default'
]
NoticeManagementEdit
:
typeof
import
(
'./../../../src/views/system/noticeManagement/vabAutoComponents/NoticeManagementEdit.vue'
)[
'default'
]
NoticeManagementEdit
:
typeof
import
(
'./../../../src/views/system/noticeManagement/vabAutoComponents/NoticeManagementEdit.vue'
)[
'default'
]
OperatorDetail
:
typeof
import
(
'./../../../src/views/system/logManagement/vabAutoComponents/OperatorDetail.vue'
)[
'default'
]
PageHeader
:
typeof
import
(
'./../../../src/views/index/vabAutoComponents/PageHeader.vue'
)[
'default'
]
PageHeader
:
typeof
import
(
'./../../../src/views/index/vabAutoComponents/PageHeader.vue'
)[
'default'
]
Pending
:
typeof
import
(
'./../../../src/views/index/vabAutoComponents/Pending.vue'
)[
'default'
]
Pending
:
typeof
import
(
'./../../../src/views/index/vabAutoComponents/Pending.vue'
)[
'default'
]
PortalDivider
:
typeof
import
(
'./../../../src/views/portal/vabAutoComponents/PortalDivider.vue'
)[
'default'
]
PortalDivider
:
typeof
import
(
'./../../../src/views/portal/vabAutoComponents/PortalDivider.vue'
)[
'default'
]
...
...
src/api/operatorLog.ts
0 → 100644
浏览文件 @
dc4635f7
import
request
from
'/@/utils/request'
/** 查询操作日志列表 */
export
function
getList
(
params
?:
any
)
{
return
request
({
url
:
'/monitor/operlog/list'
,
method
:
'get'
,
params
,
})
}
// 删除操作日志
export
const
doDelete
=
(
operId
:
any
)
=>
{
return
request
({
url
:
`/monitor/operlog/
${
operId
}
`
,
method
:
'delete'
,
})
}
// 清空操作日志
export
function
cleanOperlog
()
{
return
request
({
url
:
'/monitor/operlog/clean'
,
method
:
'delete'
,
})
}
src/main.ts
浏览文件 @
dc4635f7
...
@@ -7,7 +7,7 @@ import { setupStore } from '/@/store'
...
@@ -7,7 +7,7 @@ import { setupStore } from '/@/store'
// 全局方法
// 全局方法
import
{
useDict
}
from
'./utils/dict'
import
{
useDict
}
from
'./utils/dict'
import
{
download
}
from
'/@/utils/download'
import
{
download
}
from
'/@/utils/download'
import
{
addDateRange
,
handleTree
,
resetForm
}
from
'/@/utils/index'
import
{
addDateRange
,
handleTree
,
resetForm
,
selectDictLabel
,
selectDictLabels
}
from
'/@/utils/index'
// svg图标
// svg图标
import
elementIcons
from
'/@/icon/elementIcon'
import
elementIcons
from
'/@/icon/elementIcon'
...
@@ -19,6 +19,8 @@ app.config.globalProperties.useDict = useDict
...
@@ -19,6 +19,8 @@ app.config.globalProperties.useDict = useDict
app
.
config
.
globalProperties
.
resetForm
=
resetForm
app
.
config
.
globalProperties
.
resetForm
=
resetForm
app
.
config
.
globalProperties
.
addDateRange
=
addDateRange
app
.
config
.
globalProperties
.
addDateRange
=
addDateRange
app
.
config
.
globalProperties
.
handleTree
=
handleTree
app
.
config
.
globalProperties
.
handleTree
=
handleTree
app
.
config
.
globalProperties
.
selectDictLabel
=
selectDictLabel
app
.
config
.
globalProperties
.
selectDictLabels
=
selectDictLabels
setupVab
(
app
)
setupVab
(
app
)
setupI18n
(
app
)
setupI18n
(
app
)
...
...
src/utils/index.ts
浏览文件 @
dc4635f7
...
@@ -326,3 +326,47 @@ export function handleTree(data: any, id: any, parentId: any, children: any) {
...
@@ -326,3 +326,47 @@ export function handleTree(data: any, id: any, parentId: any, children: any) {
}
}
return
tree
return
tree
}
}
// 回显数据字典
export
function
selectDictLabel
(
datas
:
any
,
value
:
any
)
{
if
(
value
===
undefined
)
{
return
''
}
const
actions
=
[]
Object
.
keys
(
datas
).
some
((
key
)
=>
{
if
(
datas
[
key
].
value
==
`
${
value
}
`
)
{
actions
.
push
(
datas
[
key
].
label
)
return
true
}
})
if
(
actions
.
length
===
0
)
{
actions
.
push
(
value
)
}
return
actions
.
join
(
''
)
}
// 回显数据字典(字符串数组)
export
function
selectDictLabels
(
datas
:
any
,
value
:
any
,
separator
:
any
)
{
if
(
value
===
undefined
||
value
.
length
===
0
)
{
return
''
}
if
(
Array
.
isArray
(
value
))
{
value
=
value
.
join
(
','
)
}
const
actions
:
any
=
[]
const
currentSeparator
=
undefined
===
separator
?
','
:
separator
const
temp
=
value
.
split
(
currentSeparator
)
Object
.
keys
(
value
.
split
(
currentSeparator
)).
some
((
val
)
=>
{
let
match
=
false
Object
.
keys
(
datas
).
some
((
key
)
=>
{
if
(
datas
[
key
].
value
==
`
${
temp
[
val
]}
`
)
{
actions
.
push
(
datas
[
key
].
label
+
currentSeparator
)
match
=
true
}
})
if
(
!
match
)
{
actions
.
push
(
temp
[
val
]
+
currentSeparator
)
}
})
return
actions
.
join
(
''
).
substring
(
0
,
actions
.
join
(
''
).
length
-
1
)
}
src/views/system/logManagement/loginLog.vue
0 → 100644
浏览文件 @
dc4635f7
src/views/system/logManagement/operatorLog.vue
0 → 100644
浏览文件 @
dc4635f7
差异被折叠。
点击展开。
src/views/system/logManagement/vabAutoComponents/OperatorDetail.vue
0 → 100644
浏览文件 @
dc4635f7
<
template
>
<vab-dialog
v-model=
"dialogFormVisible"
append-to-body
:title=
"title"
width=
"800px"
@
close=
"close"
>
<el-form
ref=
"formRef"
label-width=
"100px"
:model=
"form"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作模块:"
>
{{
form
.
title
}}
/
{{
typeFormat
(
form
)
}}
</el-form-item>
<el-form-item
label=
"登录信息:"
>
{{
form
.
operName
}}
/
{{
form
.
operIp
}}
/
{{
form
.
operLocation
}}
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"请求地址:"
>
{{
form
.
operUrl
}}
</el-form-item>
<el-form-item
label=
"请求方式:"
>
{{
form
.
requestMethod
}}
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"操作方法:"
>
{{
form
.
method
}}
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"请求参数:"
>
{{
form
.
operParam
}}
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"返回参数:"
>
{{
form
.
jsonResult
}}
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作状态:"
>
<div
v-if=
"form.status === 0"
>
正常
</div>
<div
v-else-if=
"form.status === 1"
>
失败
</div>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"消耗时间:"
>
{{
form
.
costTime
}}
毫秒
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作时间:"
>
{{
parseTime
(
form
.
operTime
)
}}
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
v-if=
"form.status === 1"
label=
"异常信息:"
>
{{
form
.
errorMsg
}}
</el-form-item>
</el-col>
</el-row>
</el-form>
<template
#
footer
>
<el-button
@
click=
"close"
>
关 闭
</el-button>
</
template
>
</vab-dialog>
</template>
<
script
lang=
"ts"
setup
>
import
type
{
FormInstance
}
from
'element-plus'
defineOptions
({
name
:
'OperatorDetail'
,
})
const
{
proxy
}
=
getCurrentInstance
()
as
any
const
{
sys_oper_type
}
=
proxy
.
useDict
(
'sys_oper_type'
)
const
formRef
=
ref
<
FormInstance
>
()
const
form
=
ref
<
any
>
({})
const
title
=
ref
<
string
>
(
'操作日志详细'
)
const
dialogFormVisible
=
ref
<
boolean
>
(
false
)
/** 操作日志类型字典翻译 */
function
typeFormat
(
row
:
any
)
{
return
proxy
.
selectDictLabel
(
sys_oper_type
.
value
,
row
.
businessType
)
}
const
show
=
(
row
?:
any
)
=>
{
form
.
value
=
Object
.
assign
({},
row
)
dialogFormVisible
.
value
=
true
}
const
close
=
()
=>
{
dialogFormVisible
.
value
=
false
}
defineExpose
({
show
,
})
</
script
>
<
style
lang=
"scss"
scoped
>
:deep
()
{
.el-select
{
width
:
100%
;
}
.el-form-item__content
{
word-break
:
break-all
;
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论