Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
3d8385fb
Commit
3d8385fb
authored
Jul 23, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 登录日志完成
parent
d7d2f4bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
37 deletions
+42
-37
src/local/system.js
src/local/system.js
+10
-0
src/pages/system/log/login_log/index.vue
src/pages/system/log/login_log/index.vue
+32
-37
No files found.
src/local/system.js
View file @
3d8385fb
...
...
@@ -32,4 +32,14 @@ export default {
'
task.invalidTip
'
:
[
'
确认是否失效
'
,
'
Confirm Whether To Disable It
'
],
'
task.taskNameError
'
:
[
'
请输入 @:system.jobName
'
,
'
Please Input @:system.jobName
'
],
'
task.taskRuleError
'
:
[
'
请输入 @:task.schedulingRules
'
,
'
Please Input @:task.schedulingRules
'
],
'
log.loginIp
'
:
[
'
登录IP
'
,
'
LoginIp
'
],
'
log.loginUser
'
:
[
'
登录用户
'
,
'
LoginUser
'
],
'
log.eventType
'
:
[
'
事件类型
'
,
'
EventType
'
],
'
log.login
'
:
[
'
登录系统
'
,
'
Login
'
],
'
log.logout
'
:
[
'
退出系统
'
,
'
Logout
'
],
'
log.eventStatus
'
:
[
'
事件状态
'
,
'
EventStatus
'
],
fail
:
[
'
失败
'
,
'
Fail
'
],
success
:
[
'
成功
'
,
'
success
'
],
'
log.userId
'
:
[
'
用户Id
'
,
'
UserId
'
],
'
log.loginTime
'
:
[
'
登录时间
'
,
'
LoginTime
'
]
};
src/pages/system/log/login_log/index.vue
View file @
3d8385fb
<
template
>
<
my-table
url=
"/api/v1/logger/login"
rowKey=
"logId"
ref=
"table
"
>
<template
#search
="
{
query
}">
<
my-form-item
label=
"开始时间
"
>
<
Table
url=
"/api/v1/logger/login"
rowKey=
"logId
"
>
<template
#search
="
{
query
}">
<
MoreItem
:label=
"$t('select.startTime')
"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</
my-form-i
tem>
<
my-form-item
label=
"结束时间
"
>
</
MoreI
tem>
<
MoreItem
:label=
"$t('select.endTime')
"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</
my-form-i
tem>
<
my-form-item
label=
"登录用户
"
>
</
MoreI
tem>
<
MoreItem
:label=
"$t('log.loginUser')
"
>
<a-input
v-model=
"query.userId"
/>
</
my-form-i
tem>
<
my-form-item
label=
"登录IP
"
>
</
MoreI
tem>
<
MoreItem
:label=
"$t('log.loginIp')
"
>
<a-input
v-model=
"query.loginIp"
/>
</my-form-item>
<my-form-item
label=
"事件类型"
>
</MoreItem>
</
template
>
<
template
#moreSearch=
"{ query }"
>
<MoreItem
:label=
"$t('log.eventType')"
>
<a-select
v-model=
"query.loginType"
allowClear
>
<a-select-option
value=
"LOGIN"
>
登录系统
</a-select-option>
<a-select-option
value=
"LOGOUT"
>
退出系统
</a-select-option>
<a-select-option
value=
"LOGIN"
>
{{
$t
(
'
log.login
'
)
}}
</a-select-option>
<a-select-option
value=
"LOGOUT"
>
{{
$t
(
'
log.logout
'
)
}}
</a-select-option>
</a-select>
</
my-form-i
tem>
<
my-form-item
label=
"事件状态
"
>
</
MoreI
tem>
<
MoreItem
:label=
"$t('log.eventStatus')
"
>
<a-select
v-model=
"query.isSuccess"
allowClear
>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
<a-select-option
value=
"0"
>
{{
$t
(
'
fail
'
)
}}
</a-select-option>
<a-select-option
value=
"1"
>
{{
$t
(
'
success
'
)
}}
</a-select-option>
</a-select>
</
my-form-i
tem>
</
MoreI
tem>
</
template
>
<a-table-column
title=
"用户Id"
data-index=
"userId"
/>
<a-table-column
title=
"登录用户"
data-index=
"userName"
/>
<a-table-column
title=
"登录IP"
data-index=
"loginIp"
/>
<a-table-column
title=
"事件类型"
data-index=
"loginTypeName"
/>
<a-table-column
title=
"事件状态"
data-index=
"isSuccessName"
/>
<a-table-column
title=
"登录时间"
data-index=
"loginTime"
/>
<a-table-column
title=
"说明"
data-index=
"logResultContent"
/>
</my-table>
<a-table-column
:title=
"$t('log.userId')"
data-index=
"userId"
/>
<a-table-column
:title=
"$t('log.loginUser')"
data-index=
"userName"
/>
<a-table-column
:title=
"$t('log.loginIp')"
data-index=
"loginIp"
/>
<a-table-column
:title=
"$t('log.eventType')"
data-index=
"loginTypeName"
/>
<a-table-column
:title=
"$t('log.eventStatus')"
data-index=
"isSuccessName"
/>
<a-table-column
:title=
"$t('log.loginTime')"
data-index=
"loginTime"
/>
<a-table-column
:title=
"$t('table.remark')"
data-index=
"logResultContent"
/>
</Table>
</template>
<
script
>
import
{
Table
,
MoreItem
}
from
'
@/components/table
'
;
export
default
{
data
()
{
return
{};
},
methods
:
{
refreshTable
()
{
this
.
$refs
.
table
.
getData
();
},
showDrawer
(
type
,
noFooter
)
{
this
.
$refs
[
'
table
'
].
show
({
type
,
noFooter
});
},
},
components
:
{
Table
,
MoreItem
},
};
</
script
>
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