Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_sys_web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
91isoft_sys_web
Commits
cdf0265d
Commit
cdf0265d
authored
Jul 07, 2022
by
zhuangxinwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志
parent
c2dead9b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
83 deletions
+134
-83
errorLog.js
src/api/monitor/errorLog.js
+10
-5
loginInfo.js
src/api/monitor/loginInfo.js
+10
-5
operLog.js
src/api/monitor/operLog.js
+10
-5
index.vue
src/views/monitor/errorLog/index.vue
+38
-27
index.vue
src/views/monitor/loginInfo/index.vue
+28
-15
index.vue
src/views/monitor/operLog/index.vue
+38
-26
No files found.
src/api/monitor/errorLog.js
View file @
cdf0265d
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询异常日志列表
export
function
list
(
query
)
{
...
...
@@ -10,18 +11,22 @@ export function list(query) {
}
// 删除异常日志
export
function
delErrLog
(
operId
)
{
export
function
delErrLog
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/errorLog/'
+
operId
,
method
:
'delete'
url
:
'/monitor/errorLog/delete'
,
method
:
'post'
,
data
})
}
// 清空异常日志
export
function
cleanErrLog
()
{
export
function
cleanErrLog
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/errorLog/clean'
,
method
:
'delete'
method
:
'post'
,
data
})
}
...
...
src/api/monitor/loginInfo.js
View file @
cdf0265d
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询登录日志列表
export
function
list
(
query
)
{
...
...
@@ -10,18 +11,22 @@ export function list(query) {
}
// 删除登录日志
export
function
delLogininfo
(
infoId
)
{
export
function
delLogininfo
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/loginInfo/'
+
infoId
,
method
:
'delete'
url
:
'/monitor/loginInfo/delete'
,
method
:
'post'
,
data
})
}
// 清空登录日志
export
function
cleanLogininfo
()
{
export
function
cleanLogininfo
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/loginInfo/clean'
,
method
:
'delete'
method
:
'post'
,
data
})
}
...
...
src/api/monitor/operLog.js
View file @
cdf0265d
import
request
from
'@/utils/request'
import
Qs
from
'qs'
// 查询操作日志列表
export
function
list
(
query
)
{
...
...
@@ -10,18 +11,22 @@ export function list(query) {
}
// 删除操作日志
export
function
delOperLog
(
operId
)
{
export
function
delOperLog
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/operLog/'
+
operId
,
method
:
'delete'
url
:
'/monitor/operLog/delete'
,
method
:
'post'
,
data
})
}
// 清空操作日志
export
function
cleanOperLog
()
{
export
function
cleanOperLog
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/monitor/operLog/clean'
,
method
:
'delete'
method
:
'post'
,
data
})
}
...
...
src/views/monitor/errorLog/index.vue
View file @
cdf0265d
...
...
@@ -66,7 +66,7 @@
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"日志编号"
width=
"100"
align=
"center"
prop=
"businessId"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
oper
Id
||
'-'
}}
{{
scope
.
row
.
business
Id
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"系统模块"
align=
"center"
prop=
"systemMode"
>
...
...
@@ -207,21 +207,27 @@ export default {
getList
()
{
this
.
loading
=
true
list
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
list
=
response
.
rows
.
map
(
item
=>
{
const
title
=
item
.
title
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
systemMode
=
temp
.
filter
((
item
,
index
)
=>
{
return
index
<
temp
.
length
-
1
}).
join
(
'-'
)
item
.
systemMode
=
systemMode
item
.
optionName
=
temp
[
temp
.
length
-
1
]
}
else
{
item
.
systemMode
=
undefined
item
.
optionName
=
undefined
}
return
item
})
this
.
total
=
response
.
total
this
.
loading
=
false
if
(
response
.
code
===
200
)
{
this
.
list
=
[]
this
.
total
=
0
this
.
loading
=
false
}
else
{
this
.
list
=
response
.
rows
.
map
(
item
=>
{
const
title
=
item
.
title
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
systemMode
=
temp
.
filter
((
item
,
index
)
=>
{
return
index
<
temp
.
length
-
1
}).
join
(
'-'
)
item
.
systemMode
=
systemMode
item
.
optionName
=
temp
[
temp
.
length
-
1
]
}
else
{
item
.
systemMode
=
undefined
item
.
optionName
=
undefined
}
return
item
})
this
.
total
=
response
.
total
this
.
loading
=
false
}
}
)
},
...
...
@@ -246,7 +252,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
oper
Id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
business
Id
)
},
/** 详细按钮操作 */
handleView
(
row
)
{
...
...
@@ -260,12 +266,14 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
return
delErrLog
(
this
.
ids
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
ids
=
[]
this
.
multiple
=
true
const
data
=
{
deleteIds
:
this
.
ids
,
loginTime
:
this
.
queryParams
.
loginTime
}
delErrLog
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(
function
()
{})
},
/** 清空按钮操作 */
...
...
@@ -274,11 +282,14 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
cleanErrLog
()
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
const
data
=
{
loginTime
:
this
.
queryParams
.
loginTime
}
cleanErrLog
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
})
}).
catch
(
function
()
{})
},
/** 导出按钮操作 */
...
...
src/views/monitor/loginInfo/index.vue
View file @
cdf0265d
...
...
@@ -116,7 +116,7 @@
<!-- <!– </el-table-column>–>-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"访问编号"
align=
"center"
prop=
"
info
Id"
/>
<el-table-column
label=
"访问编号"
align=
"center"
prop=
"
business
Id"
/>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"username"
/>
<el-table-column
label=
"登录地址"
align=
"center"
prop=
"ipaddr"
width=
"130"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"登录地点"
align=
"center"
prop=
"loginLocation"
:show-overflow-tooltip=
"true"
/>
...
...
@@ -204,9 +204,15 @@ export default {
// const query = Object.assign({}, this.queryParams)
// query.loginTime = query.loginTime ? this.$parseDate(new Date(query.loginTime), 'YYYY-MM-DD HH:mm:ss') : ''
list
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
list
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
if
(
response
.
code
===
200
)
{
this
.
list
=
[]
this
.
total
=
0
this
.
loading
=
false
}
else
{
this
.
list
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
}
})
},
// 登录状态字典翻译
...
...
@@ -226,7 +232,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
info
Id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
business
Id
)
this
.
multiple
=
!
selection
.
length
},
/** 删除按钮操作 */
...
...
@@ -236,12 +242,16 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
return
delLogininfo
(
this
.
ids
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
ids
=
[]
this
.
multiple
=
true
const
data
=
{
deleteIds
:
this
.
ids
,
loginTime
:
this
.
queryParams
.
loginTime
}
delLogininfo
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
ids
=
[]
this
.
multiple
=
true
})
}).
catch
(
function
()
{})
},
/** 清空按钮操作 */
...
...
@@ -250,11 +260,14 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
cleanLogininfo
()
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
const
data
=
{
loginTime
:
this
.
queryParams
.
loginTime
}
cleanLogininfo
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
})
}).
catch
(
function
()
{})
},
/** 导出按钮操作 */
...
...
src/views/monitor/operLog/index.vue
View file @
cdf0265d
...
...
@@ -64,9 +64,9 @@
<div
class=
"mb12 font-small-bold"
>
操作日志列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"日志编号"
width=
"100"
align=
"center"
prop=
"
oper
Id"
>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"日志编号"
width=
"100"
align=
"center"
prop=
"
business
Id"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
oper
Id
||
'-'
}}
{{
scope
.
row
.
business
Id
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
label=
"系统模块"
align=
"center"
prop=
"systemMode"
>
...
...
@@ -96,7 +96,7 @@
</el-table-column>
<el-table-column
label=
"操作时间"
align=
"center"
prop=
"operTime"
width=
"180"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
operTime
|
transformDateByFormat
(
'
YYYY-MM
'
)
}}
</span>
<span>
{{
scope
.
row
.
operTime
|
transformDateByFormat
(
'
yyyy-MM-DD HH:mm:ss
'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
...
...
@@ -147,6 +147,7 @@
<
script
>
import
{
list
,
delOperLog
,
cleanOperLog
,
exportOperLog
}
from
'@/api/monitor/operLog'
import
{
delErrLog
}
from
'@/api/monitor/errorLog'
export
default
{
name
:
'Operlog'
,
...
...
@@ -215,21 +216,27 @@ export default {
// const query = Object.assign({}, this.queryParams)
// query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYY-MM-DD HH:mm:ss') : ''
list
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
this
.
list
=
response
.
rows
.
map
(
item
=>
{
const
title
=
item
.
title
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
systemMode
=
temp
.
filter
((
item
,
index
)
=>
{
return
index
<
temp
.
length
-
1
}).
join
(
'-'
)
item
.
systemMode
=
systemMode
item
.
optionName
=
temp
[
temp
.
length
-
1
]
}
else
{
item
.
systemMode
=
undefined
item
.
optionName
=
undefined
}
return
item
})
this
.
total
=
response
.
total
this
.
loading
=
false
if
(
response
.
code
===
200
)
{
this
.
list
=
[]
this
.
total
=
0
this
.
loading
=
false
}
else
{
this
.
list
=
response
.
rows
.
map
(
item
=>
{
const
title
=
item
.
title
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
systemMode
=
temp
.
filter
((
item
,
index
)
=>
{
return
index
<
temp
.
length
-
1
}).
join
(
'-'
)
item
.
systemMode
=
systemMode
item
.
optionName
=
temp
[
temp
.
length
-
1
]
}
else
{
item
.
systemMode
=
undefined
item
.
optionName
=
undefined
}
return
item
})
this
.
total
=
response
.
total
this
.
loading
=
false
}
}
)
},
...
...
@@ -254,7 +261,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
oper
Id
)
this
.
ids
=
selection
.
map
(
item
=>
item
.
business
Id
)
},
/** 详细按钮操作 */
handleView
(
row
)
{
...
...
@@ -268,12 +275,14 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
return
delOperLog
(
this
.
ids
)
}).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
ids
=
[]
this
.
multiple
=
true
const
data
=
{
deleteIds
:
this
.
ids
,
loginTime
:
this
.
queryParams
.
loginTime
}
delOperLog
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
})
}).
catch
(
function
()
{})
},
/** 清空按钮操作 */
...
...
@@ -283,7 +292,10 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
cleanOperLog
().
then
(()
=>
{
const
data
=
{
loginTime
:
this
.
queryParams
.
loginTime
}
cleanOperLog
(
data
).
then
(()
=>
{
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
}).
catch
(
function
()
{})
...
...
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