Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-template
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
张伯涛
web-template
Commits
059591b3
Commit
059591b3
authored
Dec 29, 2020
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志修改 和 彻底干掉zt
parent
ddb944e7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
138 additions
and
112 deletions
+138
-112
banner.js
src/api/banner.js
+6
-6
internal.js
src/api/internal.js
+6
-6
errorLog.js
src/api/monitor/errorLog.js
+4
-4
loginInfo.js
src/api/monitor/loginInfo.js
+7
-7
operLog.js
src/api/monitor/operLog.js
+7
-7
data.js
src/api/system/dict/data.js
+1
-1
index.vue
src/components/Pagination/index.vue
+2
-2
main.js
src/main.js
+2
-2
dictCons.js
src/utils/dictCons.js
+7
-0
index.vue
src/views/monitor/errorLog/index.vue
+6
-6
index.vue
src/views/monitor/loginInfo/index.vue
+79
-60
index.vue
src/views/monitor/operLog/index.vue
+11
-11
No files found.
src/api/banner.js
View file @
059591b3
...
@@ -43,9 +43,9 @@ export function listRole(query) {
...
@@ -43,9 +43,9 @@ export function listRole(query) {
})
})
}
}
export
function
queryInAdhibitions
()
{
//
export function queryInAdhibitions() {
return
request
({
//
return request({
url
:
'/authority/system/app/queryInAdhibitions/'
+
'zt'
,
//
url: '/authority/system/app/queryInAdhibitions/' + 'zt',
method
:
'get'
//
method: 'get'
})
//
})
}
//
}
src/api/internal.js
View file @
059591b3
...
@@ -5,9 +5,9 @@ import request from '@/utils/request'
...
@@ -5,9 +5,9 @@ import request from '@/utils/request'
* @param params
* @param params
* @returns {AxiosPromise}
* @returns {AxiosPromise}
*/
*/
export
function
queryInAdhibitions
(
params
)
{
//
export function queryInAdhibitions(params) {
return
request
({
//
return request({
url
:
'/authority/system/app/queryInAdhibitions/'
+
params
.
businessId
,
//
url: '/authority/system/app/queryInAdhibitions/' + params.businessId,
method
:
'get'
//
method: 'get'
})
//
})
}
//
}
src/api/monitor/errorLog.js
View file @
059591b3
...
@@ -3,7 +3,7 @@ import request from '@/utils/request'
...
@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询异常日志列表
// 查询异常日志列表
export
function
list
(
query
)
{
export
function
list
(
query
)
{
return
request
({
return
request
({
url
:
'/
authority/monitor/operl
og/list'
,
url
:
'/
monitor/operL
og/list'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
...
@@ -12,7 +12,7 @@ export function list(query) {
...
@@ -12,7 +12,7 @@ export function list(query) {
// 删除异常日志
// 删除异常日志
export
function
delErrLog
(
operId
)
{
export
function
delErrLog
(
operId
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/'
+
operId
,
url
:
'/authority/monitor/oper
L
og/'
+
operId
,
method
:
'delete'
method
:
'delete'
})
})
}
}
...
@@ -20,7 +20,7 @@ export function delErrLog(operId) {
...
@@ -20,7 +20,7 @@ export function delErrLog(operId) {
// 清空异常日志
// 清空异常日志
export
function
cleanErrLog
()
{
export
function
cleanErrLog
()
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/clean/1'
,
url
:
'/authority/monitor/oper
L
og/clean/1'
,
method
:
'delete'
method
:
'delete'
})
})
}
}
...
@@ -28,7 +28,7 @@ export function cleanErrLog() {
...
@@ -28,7 +28,7 @@ export function cleanErrLog() {
// 导出异常日志
// 导出异常日志
export
function
exportErrLog
(
query
)
{
export
function
exportErrLog
(
query
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/export'
,
url
:
'/authority/monitor/oper
L
og/export'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
...
...
src/api/monitor/loginInfo.js
View file @
059591b3
...
@@ -3,32 +3,32 @@ import request from '@/utils/request'
...
@@ -3,32 +3,32 @@ import request from '@/utils/request'
// 查询登录日志列表
// 查询登录日志列表
export
function
list
(
query
)
{
export
function
list
(
query
)
{
return
request
({
return
request
({
url
:
'/
authority/monitor/logininfor
/list'
,
url
:
'/
monitor/loginInfo
/list'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
}
}
// 删除登录日志
// 删除登录日志
export
function
delLogininfo
r
(
infoId
)
{
export
function
delLogininfo
(
infoId
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/logininfo
r
/'
+
infoId
,
url
:
'/authority/monitor/logininfo/'
+
infoId
,
method
:
'delete'
method
:
'delete'
})
})
}
}
// 清空登录日志
// 清空登录日志
export
function
cleanLogininfo
r
()
{
export
function
cleanLogininfo
()
{
return
request
({
return
request
({
url
:
'/authority/monitor/logininfo
r
/clean'
,
url
:
'/authority/monitor/logininfo/clean'
,
method
:
'delete'
method
:
'delete'
})
})
}
}
// 导出登录日志
// 导出登录日志
export
function
exportLogininfo
r
(
query
)
{
export
function
exportLogininfo
(
query
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/logininfo
r
/export'
,
url
:
'/authority/monitor/logininfo/export'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
...
...
src/api/monitor/operLog.js
View file @
059591b3
...
@@ -3,32 +3,32 @@ import request from '@/utils/request'
...
@@ -3,32 +3,32 @@ import request from '@/utils/request'
// 查询操作日志列表
// 查询操作日志列表
export
function
list
(
query
)
{
export
function
list
(
query
)
{
return
request
({
return
request
({
url
:
'/
authority/monitor/operl
og/list'
,
url
:
'/
monitor/operL
og/list'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
}
}
// 删除操作日志
// 删除操作日志
export
function
delOper
l
og
(
operId
)
{
export
function
delOper
L
og
(
operId
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/'
+
operId
,
url
:
'/authority/monitor/oper
L
og/'
+
operId
,
method
:
'delete'
method
:
'delete'
})
})
}
}
// 清空操作日志
// 清空操作日志
export
function
cleanOper
l
og
()
{
export
function
cleanOper
L
og
()
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/clean/0'
,
url
:
'/authority/monitor/oper
L
og/clean/0'
,
method
:
'delete'
method
:
'delete'
})
})
}
}
// 导出操作日志
// 导出操作日志
export
function
exportOper
l
og
(
query
)
{
export
function
exportOper
L
og
(
query
)
{
return
request
({
return
request
({
url
:
'/authority/monitor/oper
l
og/export'
,
url
:
'/authority/monitor/oper
L
og/export'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
params
:
query
})
})
...
...
src/api/system/dict/data.js
View file @
059591b3
...
@@ -20,7 +20,7 @@ export function getData(dictCode) {
...
@@ -20,7 +20,7 @@ export function getData(dictCode) {
// 根据字典类型查询字典数据信息
// 根据字典类型查询字典数据信息
export
function
getDicts
(
dictType
)
{
export
function
getDicts
(
dictType
)
{
return
request
({
return
request
({
url
:
'/
authority/
system/dict/data/type/'
+
dictType
,
url
:
'/system/dict/data/type/'
+
dictType
,
method
:
'get'
method
:
'get'
})
})
}
}
...
...
src/components/Pagination/index.vue
View file @
059591b3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
:current-page
.
sync=
"currentPage"
:current-page
.
sync=
"currentPage"
:page-size
.
sync=
"pageSize"
:page-size
.
sync=
"pageSize"
:layout=
"layout"
:layout=
"layout"
:page-sizes=
"
pageSize
s"
:page-sizes=
"
row
s"
:total=
"total"
:total=
"total"
v-bind=
"$attrs"
v-bind=
"$attrs"
@
size-change=
"handleSizeChange"
@
size-change=
"handleSizeChange"
...
@@ -32,7 +32,7 @@ export default {
...
@@ -32,7 +32,7 @@ export default {
type
:
Number
,
type
:
Number
,
default
:
20
default
:
20
},
},
pageSize
s
:
{
row
s
:
{
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
return
[
10
,
20
,
50
,
100
]
return
[
10
,
20
,
50
,
100
]
...
...
src/main.js
View file @
059591b3
...
@@ -66,7 +66,7 @@ Vue.prototype.$parseDate = (value, format) => {
...
@@ -66,7 +66,7 @@ Vue.prototype.$parseDate = (value, format) => {
if
(
!
value
||
value
===
''
)
{
if
(
!
value
||
value
===
''
)
{
return
'-'
return
'-'
}
}
return
moment
(
value
).
format
(
format
||
'YYYY-MM-DD HH:mm'
)
return
moment
(
value
).
format
(
format
||
'YYYY-MM-DD HH:mm
:ss
'
)
}
}
// 如果想要中文版 element-ui,按如下方式声明
// 如果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
// Vue.use(ElementUI)
...
@@ -89,5 +89,5 @@ Vue.filter('transformDateByFormat', (value, format) => {
...
@@ -89,5 +89,5 @@ Vue.filter('transformDateByFormat', (value, format) => {
if
(
!
value
||
value
===
''
)
{
if
(
!
value
||
value
===
''
)
{
return
'-'
return
'-'
}
}
return
moment
(
value
).
format
(
format
||
'YYYY-MM-DD HH:mm'
)
return
moment
(
value
).
format
(
format
||
'YYYY-MM-DD HH:mm
:ss
'
)
})
})
src/utils/dictCons.js
0 → 100644
View file @
059591b3
export
default
{
'USER_SEX'
:
'sys_user_sex'
,
// 用户性别
'SHOW_HIDE'
:
'sys_show_hide'
,
// 菜单状态
'NORMAL_DISABLE'
:
'sys_normal_disable'
,
// 系统开关
'OPER_TYPE'
:
'sys_oper_type'
,
// 操作类型
'COMMON_STATUS'
:
'sys_common_status'
// 系统状态
}
src/views/monitor/errorLog/index.vue
View file @
059591b3
...
@@ -237,7 +237,7 @@ export default {
...
@@ -237,7 +237,7 @@ export default {
pu
:
1
,
pu
:
1
,
ps
:
10
,
ps
:
10
,
status
:
1
,
status
:
1
,
operTime
:
''
,
//
operTime: '',
title
:
undefined
,
title
:
undefined
,
operName
:
undefined
operName
:
undefined
// businessType: undefined
// businessType: undefined
...
@@ -245,7 +245,7 @@ export default {
...
@@ -245,7 +245,7 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
queryParams
.
operTime
=
this
.
$parseDate
(
new
Date
(),
'YYYY-MM'
)
//
this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM')
this
.
getList
()
this
.
getList
()
this
.
getDicts
(
'sys_oper_type'
.
toUpperCase
()).
then
(
response
=>
{
this
.
getDicts
(
'sys_oper_type'
.
toUpperCase
()).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
this
.
typeOptions
=
response
.
data
...
@@ -259,9 +259,9 @@ export default {
...
@@ -259,9 +259,9 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
const
query
=
Object
.
assign
({},
this
.
queryParams
)
const
query
=
Object
.
assign
({},
this
.
queryParams
)
query
.
operTime
=
query
.
operTime
?
this
.
$parseDate
(
new
Date
(
query
.
operTime
),
'YYYYMM'
)
:
''
//
query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYYMM') : ''
list
(
query
).
then
(
response
=>
{
list
(
query
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
sysOperLog
s
.
map
(
item
=>
{
this
.
list
=
response
.
row
s
.
map
(
item
=>
{
const
title
=
item
.
title
const
title
=
item
.
title
if
(
title
)
{
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
temp
=
title
.
split
(
'-'
)
...
@@ -274,7 +274,7 @@ export default {
...
@@ -274,7 +274,7 @@ export default {
}
}
return
item
return
item
})
})
this
.
total
=
response
.
data
.
totals
this
.
total
=
response
.
total
this
.
loading
=
false
this
.
loading
=
false
}
}
)
)
...
@@ -337,7 +337,7 @@ export default {
...
@@ -337,7 +337,7 @@ export default {
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
queryParams
.
operTime
=
queryParams
.
operTime
?
this
.
$parseDate
(
new
Date
(
queryParams
.
operTime
),
'YYYYMM'
)
:
''
//
queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYYMM') : ''
delete
queryParams
.
pu
delete
queryParams
.
pu
delete
queryParams
.
ps
delete
queryParams
.
ps
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
...
...
src/views/monitor/loginInfo/index.vue
View file @
059591b3
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
label-width=
"68px"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
label-width=
"68px"
>
<!--
<el-form-item
label=
"登录地址"
prop=
"ipaddr"
>
-->
<!--
<el-form-item
label=
"登录地址"
prop=
"ipaddr"
>
-->
<!--
<el-input-->
<!--
<el-input-->
<!-- v-model="queryParams.ipaddr"-->
<!-- v-model="queryParams.ipaddr"-->
...
@@ -38,36 +38,39 @@
...
@@ -38,36 +38,39 @@
<!-- />-->
<!-- />-->
<!--
</el-select>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"登录
月份
"
>
<el-form-item
label=
"登录
时间
"
>
<el-date-picker
<el-date-picker
v-model=
"
queryParams.loginTim
e"
v-model=
"
dateRang
e"
size=
"small"
size=
"small"
style=
"width: 240px"
style=
"width: 240px"
type=
"month"
type=
"daterange"
value-format=
"yyyy-MM"
range-separator=
"-"
placeholder=
"请选择月份"
value-format=
"yyyy-MM-dd"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
type=
"cyan"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<el-form-item>
<el-form-item>
<!-- v-hasPermi="['zt:loginlog:delete']"-->
<el-button
<el-button
v-hasPermi=
"['zt:loginlog:delete']"
type=
"danger"
type=
"danger"
size=
"small"
size=
"small"
:disabled=
"multiple"
:disabled=
"multiple"
@
click=
"handleDelete"
@
click=
"handleDelete"
>
删除
</el-button>
>
删除
</el-button>
<!-- v-hasPermi="['zt:loginlog:clear']"-->
<el-button
<el-button
v-hasPermi=
"['zt:loginlog:clear']"
type=
"danger"
type=
"danger"
size=
"small"
size=
"small"
@
click=
"handleClean"
@
click=
"handleClean"
>
清空
</el-button>
>
清空
</el-button>
<!-- v-hasPermi="['zt:loginlog:export']"-->
<el-button
<el-button
v-hasPermi=
"['zt:loginlog:export']"
type=
"success"
type=
"success"
size=
"small"
size=
"small"
@
click=
"handleExport"
@
click=
"handleExport"
...
@@ -80,39 +83,53 @@
...
@@ -80,39 +83,53 @@
<div
style=
"padding:10px"
>
<div
style=
"padding:10px"
>
<div
class=
"mb12 font-small-bold"
>
登录日志列表
</div>
<div
class=
"mb12 font-small-bold"
>
登录日志列表
</div>
<el-table
v-loading=
"loading"
border
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
border
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
-->
<!-- <!–
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
–>
-->
<!--
<el-table-column
label=
"访问编号"
width=
"100"
align=
"center"
prop=
"infoId"
show-overflow-tooltip
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
{{
scope
.
row
.
infoId
||
'-'
}}
-->
<!--
</
template
>
-->
<!-- </el-table-column>-->
<!-- <el-table-column label="用户名称" align="center" prop="userName" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.userName || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="登录地址" align="center" prop="ipaddr" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.ipaddr || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作信息" align="center" prop="msg" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.msg || '-' }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <!– <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" />-->
<!-- <!– <el-table-column label="浏览器" align="center" prop="browser" show-overflow-tooltip>–>-->
<!-- <!– <template slot-scope="scope">–>-->
<!-- <!– {{ scope.row.browser || '-' }}–>-->
<!-- <!– </template>–>-->
<!-- <!– </el-table-column>–>-->
<!-- <!– <el-table-column label="操作系统" align="center" prop="os" show-overflow-tooltip>–>-->
<!-- <!– <template slot-scope="scope">–>-->
<!-- <!– {{ scope.row.os || '-' }}–>-->
<!-- <!– </template>–>-->
<!-- <!– </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
type=
"selection"
width=
"55"
align=
"center"
/>
<!--
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
-->
<el-table-column
label=
"访问编号"
align=
"center"
prop=
"infoId"
/>
<el-table-column
label=
"访问编号"
width=
"100"
align=
"center"
prop=
"infoId"
show-overflow-tooltip
>
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"username"
/>
<template
slot-scope=
"scope"
>
<el-table-column
label=
"登录地址"
align=
"center"
prop=
"ipaddr"
width=
"130"
:show-overflow-tooltip=
"true"
/>
{{
scope
.
row
.
infoId
||
'-'
}}
<el-table-column
label=
"登录地点"
align=
"center"
prop=
"loginLocation"
:show-overflow-tooltip=
"true"
/>
</
template
>
<!-- <el-table-column label="浏览器" align="center" prop="browser" />
</el-table-column>
<el-table-column label="操作系统" align="center" prop="os" />-->
<el-table-column
label=
"用户名称"
align=
"center"
prop=
"userName"
show-overflow-tooltip
>
<el-table-column
label=
"登录状态"
align=
"center"
prop=
"status"
:formatter=
"statusFormat"
/>
<
template
slot-scope=
"scope"
>
<el-table-column
label=
"操作信息"
align=
"center"
prop=
"msg"
/>
{{
scope
.
row
.
userName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作信息"
align=
"center"
prop=
"msg"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
msg
||
'-'
}}
</
template
>
</el-table-column>
<!-- <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" />-->
<el-table-column
label=
"浏览器"
align=
"center"
prop=
"browser"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
browser
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作系统"
align=
"center"
prop=
"os"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
os
||
'-'
}}
</
template
>
</el-table-column>
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column
label=
"登录时间"
align=
"center"
prop=
"loginTime"
width=
"180"
show-overflow-tooltip
>
<el-table-column
label=
"登录时间"
align=
"center"
prop=
"loginTime"
width=
"180"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
loginTime
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
loginTime
)
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm:ss'
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -120,16 +137,16 @@
...
@@ -120,16 +137,16 @@
<pagination
<pagination
v-show=
"total>0"
v-show=
"total>0"
:total=
"total"
:total=
"total"
:page
.
sync=
"queryParams.p
u
"
:page
.
sync=
"queryParams.p
age
"
:limit
.
sync=
"queryParams.
p
s"
:limit
.
sync=
"queryParams.
row
s"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
list
,
delLogininfo
r
,
cleanLogininfor
,
exportLogininfor
}
from
'@/api/monitor/loginInfo'
import
{
list
,
delLogininfo
,
cleanLogininfo
,
exportLogininfo
}
from
'@/api/monitor/loginInfo'
import
dictCons
from
'@/utils/dictCons'
export
default
{
export
default
{
name
:
'LoginInfo'
,
name
:
'LoginInfo'
,
data
()
{
data
()
{
...
@@ -140,6 +157,8 @@ export default {
...
@@ -140,6 +157,8 @@ export default {
ids
:
[],
ids
:
[],
// 非多个禁用
// 非多个禁用
multiple
:
true
,
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
// 总条数
total
:
0
,
total
:
0
,
// 表格数据
// 表格数据
...
@@ -150,16 +169,16 @@ export default {
...
@@ -150,16 +169,16 @@ export default {
dateRange
:
''
,
dateRange
:
''
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
p
u
:
1
,
p
age
:
1
,
ps
:
10
,
rows
:
10
loginTime
:
''
//
loginTime: ''
}
}
}
}
},
},
created
()
{
created
()
{
this
.
queryParams
.
loginTime
=
this
.
$parseDate
(
new
Date
(),
'YYYY-MM
'
)
// this.queryParams.loginTime = this.$parseDate(new Date(), 'YYYY-MM-DD HH:mm:ss
')
this
.
getList
()
this
.
getList
()
this
.
getDicts
(
'sys_common_status'
.
toUpperCase
()
).
then
(
response
=>
{
this
.
getDicts
(
dictCons
[
'COMMON_STATUS'
]
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
this
.
statusOptions
=
response
.
data
})
})
},
},
...
@@ -168,10 +187,10 @@ export default {
...
@@ -168,10 +187,10 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
const
query
=
Object
.
assign
({},
this
.
queryParams
)
const
query
=
Object
.
assign
({},
this
.
queryParams
)
query
.
loginTime
=
query
.
loginTime
?
this
.
$parseDate
(
new
Date
(
query
.
loginTime
),
'YYYYMM
'
)
:
''
// query.loginTime = query.loginTime ? this.$parseDate(new Date(query.loginTime), 'YYYY-MM-DD HH:mm:ss
') : ''
list
(
query
).
then
(
response
=>
{
list
(
query
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
logininfor
s
this
.
list
=
response
.
row
s
this
.
total
=
response
.
data
.
totals
this
.
total
=
response
.
total
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
...
@@ -181,7 +200,7 @@ export default {
...
@@ -181,7 +200,7 @@ export default {
},
},
/** 查询按钮操作 */
/** 查询按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
p
u
=
1
this
.
queryParams
.
p
age
=
1
this
.
getList
()
this
.
getList
()
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
...
@@ -202,7 +221,7 @@ export default {
...
@@ -202,7 +221,7 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
return
delLogininfo
r
(
this
.
ids
)
return
delLogininfo
(
this
.
ids
)
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
$message
.
success
(
'删除成功'
)
...
@@ -217,7 +236,7 @@ export default {
...
@@ -217,7 +236,7 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
cleanLogininfo
r
()
return
cleanLogininfo
()
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
this
.
$message
.
success
(
'清空成功'
)
...
@@ -226,11 +245,11 @@ export default {
...
@@ -226,11 +245,11 @@ export default {
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
queryParams
.
loginTime
=
queryParams
.
loginTime
?
this
.
$parseDate
(
new
Date
(
queryParams
.
loginTime
),
'YYYYMM
'
)
:
''
// queryParams.loginTime = queryParams.loginTime ? this.$parseDate(new Date(queryParams.loginTime), 'YYYY-MM-DD HH:mm:ss
') : ''
delete
queryParams
.
p
u
delete
queryParams
.
p
age
delete
queryParams
.
p
s
delete
queryParams
.
row
s
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
exportLogininfo
r
(
queryParams
).
then
(
response
=>
{
exportLogininfo
(
queryParams
).
then
(
response
=>
{
this
.
download
(
response
.
msg
)
this
.
download
(
response
.
msg
)
}).
catch
(
function
()
{})
}).
catch
(
function
()
{})
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
...
@@ -238,7 +257,7 @@ export default {
...
@@ -238,7 +257,7 @@ export default {
// cancelButtonText: '取消',
// cancelButtonText: '取消',
// type: 'warning'
// type: 'warning'
// }).then(function() {
// }).then(function() {
// return exportLogininfo
r
(queryParams)
// return exportLogininfo(queryParams)
// })
// })
}
}
}
}
...
...
src/views/monitor/operLog/index.vue
View file @
059591b3
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
list
,
delOper
log
,
cleanOperlog
,
exportOperl
og
}
from
'@/api/monitor/operLog'
import
{
list
,
delOper
Log
,
cleanOperLog
,
exportOperL
og
}
from
'@/api/monitor/operLog'
export
default
{
export
default
{
name
:
'Operlog'
,
name
:
'Operlog'
,
...
@@ -237,7 +237,7 @@ export default {
...
@@ -237,7 +237,7 @@ export default {
pu
:
1
,
pu
:
1
,
ps
:
10
,
ps
:
10
,
status
:
0
,
status
:
0
,
operTime
:
''
,
//
operTime: '',
title
:
undefined
,
title
:
undefined
,
operName
:
undefined
operName
:
undefined
// businessType: undefined
// businessType: undefined
...
@@ -245,7 +245,7 @@ export default {
...
@@ -245,7 +245,7 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
queryParams
.
operTime
=
this
.
$parseDate
(
new
Date
(),
'YYYY-MM'
)
//
this.queryParams.operTime = this.$parseDate(new Date(), 'YYYY-MM')
this
.
getList
()
this
.
getList
()
this
.
getDicts
(
'sys_oper_type'
.
toUpperCase
()).
then
(
response
=>
{
this
.
getDicts
(
'sys_oper_type'
.
toUpperCase
()).
then
(
response
=>
{
this
.
typeOptions
=
response
.
data
this
.
typeOptions
=
response
.
data
...
@@ -259,9 +259,9 @@ export default {
...
@@ -259,9 +259,9 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
const
query
=
Object
.
assign
({},
this
.
queryParams
)
const
query
=
Object
.
assign
({},
this
.
queryParams
)
query
.
operTime
=
query
.
operTime
?
this
.
$parseDate
(
new
Date
(
query
.
operTime
),
'YYYYMM
'
)
:
''
// query.operTime = query.operTime ? this.$parseDate(new Date(query.operTime), 'YYYY-MM-DD HH:mm:ss
') : ''
list
(
query
).
then
(
response
=>
{
list
(
query
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
sysOperLog
s
.
map
(
item
=>
{
this
.
list
=
response
.
row
s
.
map
(
item
=>
{
const
title
=
item
.
title
const
title
=
item
.
title
if
(
title
)
{
if
(
title
)
{
const
temp
=
title
.
split
(
'-'
)
const
temp
=
title
.
split
(
'-'
)
...
@@ -274,7 +274,7 @@ export default {
...
@@ -274,7 +274,7 @@ export default {
}
}
return
item
return
item
})
})
this
.
total
=
response
.
data
.
totals
this
.
total
=
response
.
total
this
.
loading
=
false
this
.
loading
=
false
}
}
)
)
...
@@ -314,7 +314,7 @@ export default {
...
@@ -314,7 +314,7 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delOper
l
og
(
this
.
ids
.
join
(
','
)).
then
(()
=>
{
delOper
L
og
(
this
.
ids
.
join
(
','
)).
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
$message
.
success
(
'删除成功'
)
this
.
$message
.
success
(
'删除成功'
)
this
.
ids
=
[]
this
.
ids
=
[]
...
@@ -328,7 +328,7 @@ export default {
...
@@ -328,7 +328,7 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
cleanOper
l
og
().
then
(()
=>
{
cleanOper
L
og
().
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
$message
.
success
(
'清空成功'
)
this
.
$message
.
success
(
'清空成功'
)
}).
catch
(
function
()
{})
}).
catch
(
function
()
{})
...
@@ -337,11 +337,11 @@ export default {
...
@@ -337,11 +337,11 @@ export default {
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
const
queryParams
=
Object
.
assign
({},
this
.
queryParams
)
queryParams
.
operTime
=
queryParams
.
operTime
?
this
.
$parseDate
(
new
Date
(
queryParams
.
operTime
),
'YYYYMM
'
)
:
''
// queryParams.operTime = queryParams.operTime ? this.$parseDate(new Date(queryParams.operTime), 'YYYY-MM-DD HH:mm:ss
') : ''
delete
queryParams
.
pu
delete
queryParams
.
pu
delete
queryParams
.
ps
delete
queryParams
.
ps
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
queryParams
.
ids
=
this
.
ids
.
join
(
','
)
||
null
exportOper
l
og
(
queryParams
).
then
(
response
=>
{
exportOper
L
og
(
queryParams
).
then
(
response
=>
{
this
.
download
(
response
.
msg
)
this
.
download
(
response
.
msg
)
}).
catch
(
function
()
{})
}).
catch
(
function
()
{})
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
// this.$confirm('是否确认导出所有操作日志数据项?', '提示', {
...
@@ -349,7 +349,7 @@ export default {
...
@@ -349,7 +349,7 @@ export default {
// cancelButtonText: '取消',
// cancelButtonText: '取消',
// type: 'warning'
// type: 'warning'
// }).then(() => {
// }).then(() => {
// exportOper
l
og(queryParams)
// exportOper
L
og(queryParams)
// }).catch()
// }).catch()
}
}
}
}
...
...
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