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
f195c929
Commit
f195c929
authored
Jun 29, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'feature/chw'
# Conflicts: # src/components/table/index.vue
parents
38a398bb
67c2dcf2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
7 deletions
+81
-7
src/components/table/index.vue
src/components/table/index.vue
+39
-6
src/pages/system/view/log/login_log/form.vue
src/pages/system/view/log/login_log/form.vue
+3
-0
src/pages/system/view/log/login_log/index.vue
src/pages/system/view/log/login_log/index.vue
+31
-0
src/router/config.js
src/router/config.js
+8
-1
No files found.
src/components/table/index.vue
View file @
f195c929
...
...
@@ -9,7 +9,7 @@
<div
class=
"tw-text-right tw-mt-2"
>
<a-space>
<a-button
@
click=
"
queryForm =
{}
">重置
</a-button>
<a-button
@
click=
"
reset
"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"getData"
>
查询
</a-button>
</a-space>
</div>
...
...
@@ -25,7 +25,13 @@
</
template
>
</a-space>
<a-table
:data-source=
"data"
:loading=
"loading"
v-bind=
"$attrs"
:pagination=
"!noPage"
>
<a-table
:data-source=
"data"
:loading=
"loading"
v-bind=
"$attrs"
:pagination=
"pagination"
@
change=
"pageChange"
>
<slot
/>
</a-table>
</div>
...
...
@@ -62,6 +68,11 @@
<
script
>
import
{
request
,
METHOD
}
from
'
@/utils/requestUtil
'
;
const
initQuery
=
{
pageSize
:
10
,
pageNum
:
1
,
};
export
default
{
props
:
{
url
:
String
,
...
...
@@ -76,11 +87,10 @@ export default {
noPage
:
Boolean
,
},
data
()
{
this
.
initQuery
=
{
pageNum
:
1
,
pageSize
:
10
,
};
return
{
initQuery
:
{
...
initQuery
,
},
title
:
'
新增
'
,
data
:
[],
queryForm
:
{},
...
...
@@ -103,6 +113,7 @@ export default {
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
20
},
},
total
:
0
,
};
},
watch
:
{
...
...
@@ -114,6 +125,18 @@ export default {
this
.
getData
();
},
computed
:
{
pagination
()
{
return
this
.
noPage
?
false
:
{
current
:
this
.
initQuery
.
pageNum
,
pageSize
:
this
.
initQuery
.
pageSize
,
total
:
this
.
total
,
};
},
},
methods
:
{
async
getData
()
{
this
.
loading
=
true
;
...
...
@@ -132,6 +155,7 @@ export default {
async
getDataWithPage
()
{
const
res
=
await
request
(
this
.
url
,
METHOD
.
GET
,
{
...
this
.
initQuery
,
...
this
.
queryForm
});
this
.
total
=
res
.
total
;
if
(
this
.
formatData
)
this
.
data
=
this
.
formatData
(
res
);
else
this
.
data
=
res
.
records
;
},
...
...
@@ -169,6 +193,15 @@ export default {
this
.
noFooter
=
noFooter
;
this
.
addVisible
=
true
;
},
reset
()
{
this
.
queryForm
=
{};
this
.
initQuery
=
{
...
initQuery
};
this
.
getData
();
},
pageChange
(
page
)
{
this
.
initQuery
.
pageNum
=
page
.
current
;
this
.
getData
();
},
},
};
</
script
>
...
...
src/pages/system/view/log/login_log/form.vue
0 → 100644
View file @
f195c929
<
template
>
<h1>
Form
</h1>
</
template
>
src/pages/system/view/log/login_log/index.vue
0 → 100644
View file @
f195c929
<
template
>
<my-table
url=
"/api/v1/logger/login"
rowKey=
"logId"
ref=
"table"
>
<template
#search
="
{query}">
<a-form-model-item
label=
"登录IP"
>
<a-input
v-model=
"query.loginIp"
/>
</a-form-model-item>
</
template
>
<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>
</template>
<
script
>
export
default
{
data
()
{
return
{};
},
methods
:
{
refreshTable
()
{
this
.
$refs
.
table
.
getData
();
},
showDrawer
(
type
,
noFooter
)
{
this
.
$refs
[
'
table
'
].
show
({
type
,
noFooter
});
},
},
};
</
script
>
src/router/config.js
View file @
f195c929
...
...
@@ -107,7 +107,14 @@ const options = {
{
path
:
'
log_management
'
,
name
:
'
日志管理
'
,
component
:
()
=>
import
(
'
@/pages/system/view/log
'
),
component
:
BlankTemplateView
,
children
:
[
{
path
:
'
login_log
'
,
name
:
'
登录日志
'
,
component
:
()
=>
import
(
'
@/pages/system/view/log/login_log/index.vue
'
),
},
],
},
{
path
:
'
task_management
'
,
...
...
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