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
4b216178
Commit
4b216178
authored
Jul 26, 2021
by
shuiluo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 操作日志完成
parent
3d8385fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
40 deletions
+46
-40
src/local/system.js
src/local/system.js
+4
-1
src/pages/system/log/operation/form.vue
src/pages/system/log/operation/form.vue
+6
-2
src/pages/system/log/operation/index.vue
src/pages/system/log/operation/index.vue
+36
-37
No files found.
src/local/system.js
View file @
4b216178
...
@@ -41,5 +41,8 @@ export default {
...
@@ -41,5 +41,8 @@ export default {
fail
:
[
'
失败
'
,
'
Fail
'
],
fail
:
[
'
失败
'
,
'
Fail
'
],
success
:
[
'
成功
'
,
'
success
'
],
success
:
[
'
成功
'
,
'
success
'
],
'
log.userId
'
:
[
'
用户Id
'
,
'
UserId
'
],
'
log.userId
'
:
[
'
用户Id
'
,
'
UserId
'
],
'
log.loginTime
'
:
[
'
登录时间
'
,
'
LoginTime
'
]
'
log.loginTime
'
:
[
'
登录时间
'
,
'
LoginTime
'
],
'
log.businessModule
'
:
[
'
业务模块
'
,
'
Business Module
'
],
'
log.operationService
'
:
[
'
操作服务
'
,
'
Operation Service
'
],
'
log.operateTime
'
:
[
'
操作时间
'
,
'
Operate Time
'
],
};
};
src/pages/system/log/operation/form.vue
View file @
4b216178
<
template
>
<
template
>
<pre>
{{
data
.
operateContent
}}
</pre>
<Wraper
:hidden=
"hidden"
noFooter
>
<pre>
{{
row
?
row
.
operateContent
:
''
}}
</pre>
</Wraper>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
WraperMixins
}
from
'
@/components/table
'
;
export
default
{
export
default
{
props
:
[
'
data
'
],
mixins
:
[
WraperMixins
],
};
};
</
script
>
</
script
>
src/pages/system/log/operation/index.vue
View file @
4b216178
<
template
>
<
template
>
<
my-table
url=
"/api/v1/logger/operation"
rowKey=
"logId
"
ref=
"table"
>
<
Table
url=
"/api/v1/logger/operation"
rowKey=
"logId"
:buttons=
"buttons
"
ref=
"table"
>
<template
#drawer
>
<template
#drawer
="
drawer
"
>
<Form
:data=
"currentClickRow
"
/>
<Form
v-bind=
"drawer
"
/>
</
template
>
</
template
>
<
template
#search=
"{
query
}"
>
<
template
#search=
"{
query
}"
>
<
my-form-item
label=
"开始时间
"
>
<
MoreItem
:label=
"$t('select.startTime')
"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.startTime"
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</
my-form-i
tem>
</
MoreI
tem>
<
my-form-item
label=
"结束时间
"
>
<
MoreItem
:label=
"$t('select.endTime')
"
>
<a-date-picker
<a-date-picker
class=
"tw-w-full"
class=
"tw-w-full"
show-time
show-time
v-model=
"query.endTime"
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
/>
</
my-form-i
tem>
</
MoreI
tem>
<
my-form-item
label=
"操作用户Id
"
>
<
MoreItem
:label=
"$t('log.userId')
"
>
<a-input
v-model=
"query.operatorId"
/>
<a-input
v-model=
"query.operatorId"
:placeholder=
"$t('input.placeholder')"
/>
</
my-form-i
tem>
</
MoreI
tem>
<
my-form-item
label=
"业务模块
"
>
<
MoreItem
:label=
"$t('log.businessModule')
"
>
<a-select
v-model=
"query.loginType"
allowClear
>
<a-select
v-model=
"query.loginType"
allowClear
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"LOGIN"
>
登录系统
</a-select-option>
<a-select-option
value=
"LOGIN"
>
{{
$t
(
'
log.login
'
)
}}
</a-select-option>
<a-select-option
value=
"LOGOUT"
>
退出系统
</a-select-option>
<a-select-option
value=
"LOGOUT"
>
{{
$t
(
'
log.logout
'
)
}}
</a-select-option>
</a-select>
</a-select>
</my-form-item>
</MoreItem>
<my-form-item
label=
"操作服务"
>
</
template
>
<a-select
v-model=
"query.isSuccess"
allowClear
>
<
template
#moreSearch=
"{ query }"
>
<MoreItem
:label=
"$t('log.operationService')"
>
<a-select
v-model=
"query.isSuccess"
allowClear
:placeholder=
"$t('select.placeholder')"
>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
</a-select>
</a-select>
</
my-form-i
tem>
</
MoreI
tem>
</
template
>
</
template
>
<a-table-column
title=
"用户Id"
data-index=
"operatorId"
/>
<a-table-column
:title=
"$t('log.userId')"
data-index=
"operatorId"
/>
<a-table-column
title=
"用户名称"
data-index=
"operatorName"
/>
<a-table-column
:title=
"$t('user.name')"
data-index=
"operatorName"
/>
<a-table-column
title=
"业务模块"
data-index=
"moduleCode"
/>
<a-table-column
:title=
"$t('log.businessModule')"
data-index=
"moduleCode"
/>
<a-table-column
title=
"操作服务"
data-index=
"serviceCode"
/>
<a-table-column
:title=
"$t('log.operationService')"
data-index=
"serviceCode"
/>
<a-table-column
title=
"操作时间"
data-index=
"operateTime"
/>
<a-table-column
:title=
"$t('log.operateTime')"
data-index=
"operateTime"
/>
<a-table-column
title=
"操作"
>
</Table>
<
template
#default=
"row"
>
<a
@
click=
"() => view(row)"
>
详情
</a>
</
template
>
</a-table-column>
</my-table>
</template>
</template>
<
script
>
<
script
>
import
Form
from
'
./form.vue
'
;
import
Form
from
'
./form.vue
'
;
import
{
Table
,
MoreItem
}
from
'
@/components/table
'
;
export
default
{
export
default
{
components
:
{
Form
},
components
:
{
Form
,
Table
,
MoreItem
},
data
()
{
data
()
{
return
{
return
{
currentClickRow
:
{},
buttons
:
[
{
label
:
this
.
$t
(
'
table.view
'
),
click
:
this
.
view
,
},
],
};
};
},
},
methods
:
{
methods
:
{
showDrawer
(
type
,
noFooter
)
{
this
.
$refs
[
'
table
'
].
show
({
type
,
noFooter
});
},
view
(
row
)
{
view
(
row
)
{
this
.
currentClickRow
=
row
;
this
.
$refs
[
'
table
'
].
show
({
row
,
title
:
this
.
$t
(
'
table.view
'
)
});
this
.
showDrawer
(
2
,
true
);
},
},
},
},
};
};
...
...
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