Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1eefa02c
authored
Dec 30, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📖
操作日志的界面实现
parent
631c105f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
+8
-15
src/api/system/operatelog/index.ts
+1
-1
src/components/AppLinkInput/data.ts
+0
-12
src/components/OperateLogV2/src/OperateLogV2.vue
+7
-2
No files found.
src/api/system/operatelog/index.ts
View file @
1eefa02c
...
@@ -42,7 +42,7 @@ export type OperateLogV2VO = {
...
@@ -42,7 +42,7 @@ export type OperateLogV2VO = {
creator
:
string
creator
:
string
creatorName
:
string
creatorName
:
string
createTime
:
Date
createTime
:
Date
// 数据扩展
-
渲染时使用
// 数据扩展
,
渲染时使用
title
:
string
// 操作标题(如果为空则取 name 值)
title
:
string
// 操作标题(如果为空则取 name 值)
colSize
:
number
// 变更记录行数
colSize
:
number
// 变更记录行数
contentStrList
:
string
[]
contentStrList
:
string
[]
...
...
src/components/AppLinkInput/data.ts
View file @
1eefa02c
...
@@ -158,10 +158,6 @@ export const APP_LINK_GROUP_LIST = [
...
@@ -158,10 +158,6 @@ export const APP_LINK_GROUP_LIST = [
path
:
'/pages/commission/index'
path
:
'/pages/commission/index'
},
},
{
{
name
:
'申请分销商'
,
path
:
'/pages/commission/apply'
},
{
name
:
'推广商品'
,
name
:
'推广商品'
,
path
:
'/pages/commission/goods'
path
:
'/pages/commission/goods'
},
},
...
@@ -170,10 +166,6 @@ export const APP_LINK_GROUP_LIST = [
...
@@ -170,10 +166,6 @@ export const APP_LINK_GROUP_LIST = [
path
:
'/pages/commission/order'
path
:
'/pages/commission/order'
},
},
{
{
name
:
'分享记录'
,
path
:
'/pages/commission/share-log'
},
{
name
:
'我的团队'
,
name
:
'我的团队'
,
path
:
'/pages/commission/team'
path
:
'/pages/commission/team'
}
}
...
@@ -193,10 +185,6 @@ export const APP_LINK_GROUP_LIST = [
...
@@ -193,10 +185,6 @@ export const APP_LINK_GROUP_LIST = [
{
{
name
:
'申请提现'
,
name
:
'申请提现'
,
path
:
'/pages/pay/withdraw'
path
:
'/pages/pay/withdraw'
},
{
name
:
'提现记录'
,
path
:
'/pages/pay/withdraw-log'
}
}
]
]
},
},
...
...
src/components/OperateLogV2/src/OperateLogV2.vue
View file @
1eefa02c
...
@@ -49,10 +49,13 @@ import { formatDate } from '@/utils/formatTime'
...
@@ -49,10 +49,13 @@ import { formatDate } from '@/utils/formatTime'
import
{
DICT_TYPE
,
getDictLabel
,
getDictObj
}
from
'@/utils/dict'
import
{
DICT_TYPE
,
getDictLabel
,
getDictObj
}
from
'@/utils/dict'
import
{
ElTag
}
from
'element-plus'
import
{
ElTag
}
from
'element-plus'
defineOptions
({
name
:
'OperateLogV2'
})
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
logList
:
OperateLogV2VO
[]
// 操作日志列表
logList
:
OperateLogV2VO
[]
// 操作日志列表
}
>
()
}
>
()
defineOptions
({
name
:
'OperateLogV2'
})
const
logDataList
=
ref
<
OperateLogV2VO
[]
>
([])
// 操作日志列表
/** 获得 userType 颜色 */
/** 获得 userType 颜色 */
const
getUserTypeColor
=
(
type
:
number
)
=>
{
const
getUserTypeColor
=
(
type
:
number
)
=>
{
...
@@ -69,7 +72,7 @@ const getUserTypeColor = (type: number) => {
...
@@ -69,7 +72,7 @@ const getUserTypeColor = (type: number) => {
}
}
return
'#409EFF'
return
'#409EFF'
}
}
const
logDataList
=
ref
<
OperateLogV2VO
[]
>
([])
// 操作日志列表
// 提取 tag 所需内容和位置
// 提取 tag 所需内容和位置
const
renderTags
=
(
content
:
string
)
=>
{
const
renderTags
=
(
content
:
string
)
=>
{
let
newStr
=
unref
(
content
).
slice
()
// 去掉引用
let
newStr
=
unref
(
content
).
slice
()
// 去掉引用
...
@@ -89,6 +92,7 @@ const renderTags = (content: string) => {
...
@@ -89,6 +92,7 @@ const renderTags = (content: string) => {
})
})
return
[
newStr
.
split
(
fg
),
matchStr
]
return
[
newStr
.
split
(
fg
),
matchStr
]
}
}
const
initLog
=
()
=>
{
const
initLog
=
()
=>
{
logDataList
.
value
=
props
.
logList
.
map
((
logItem
)
=>
{
logDataList
.
value
=
props
.
logList
.
map
((
logItem
)
=>
{
const
keyValue
=
renderTags
(
logItem
.
action
)
const
keyValue
=
renderTags
(
logItem
.
action
)
...
@@ -105,6 +109,7 @@ const initLog = () => {
...
@@ -105,6 +109,7 @@ const initLog = () => {
return
logItem
return
logItem
})
})
}
}
watch
(
watch
(
()
=>
props
.
logList
.
length
,
()
=>
props
.
logList
.
length
,
(
newObj
)
=>
{
(
newObj
)
=>
{
...
...
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