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
261d8b2a
authored
Dec 30, 2023
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crm-客户:集成操作日志详情组件
parent
455688ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
10 deletions
+16
-10
src/api/crm/customer/index.ts
+2
-2
src/api/system/operatelog/index.ts
+4
-3
src/components/OperateLogV2/src/OperateLogV2.vue
+4
-4
src/views/crm/customer/detail/index.vue
+6
-1
No files found.
src/api/crm/customer/index.ts
View file @
261d8b2a
...
...
@@ -69,6 +69,6 @@ export const queryAllList = async () => {
}
// 查询客户操作日志
export
const
getOperateLog
=
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
`/crm/customer/operate-log?id=`
+
id
})
export
const
getOperateLog
Page
=
async
(
params
)
=>
{
return
await
request
.
get
({
url
:
'/crm/customer/operate-log-page'
,
params
})
}
src/api/system/operatelog/index.ts
View file @
261d8b2a
...
...
@@ -29,10 +29,11 @@ export type OperateLogV2VO = {
traceId
:
string
userType
:
number
userId
:
number
module
:
string
name
:
string
userName
:
string
type
:
string
subType
:
string
bizId
:
number
content
:
string
action
:
string
extra
:
string
requestMethod
:
string
requestUrl
:
string
...
...
src/components/OperateLogV2/src/OperateLogV2.vue
View file @
261d8b2a
...
...
@@ -4,14 +4,14 @@
<el-timeline-item
v-for=
"(log, index) in logDataList"
:key=
"index"
:timestamp=
"formatDate(log.createTime
!
)"
:timestamp=
"formatDate(log.createTime)"
placement=
"top"
>
<div
class=
"el-timeline-right-content"
>
<el-row>
<el-col
:span=
"24"
class=
"mb-10px"
>
=======================
<el-tag
class=
"mr-10px"
type=
"success"
>
{{
log
.
creato
rName
}}
</el-tag>
<el-tag
class=
"mr-10px"
type=
"success"
>
{{
log
.
use
rName
}}
</el-tag>
<span>
{{
log
.
title
}}
</span>
=======================
</el-col>
...
...
@@ -91,11 +91,11 @@ const renderTags = (content: string) => {
}
const
initLog
=
()
=>
{
logDataList
.
value
=
props
.
logList
.
map
((
logItem
)
=>
{
const
keyValue
=
renderTags
(
logItem
.
content
)
const
keyValue
=
renderTags
(
logItem
.
action
)
// 挂载数据
logItem
.
contentStrList
=
keyValue
[
0
]
if
(
keyValue
[
0
][
0
]
===
'从'
)
{
logItem
.
title
=
logItem
.
nam
e
logItem
.
title
=
logItem
.
subTyp
e
}
else
{
logItem
.
title
=
keyValue
[
0
][
0
]
logItem
.
contentStrList
.
splice
(
0
,
1
)
...
...
src/views/crm/customer/detail/index.vue
View file @
261d8b2a
...
...
@@ -66,7 +66,12 @@ const getOperateLog = async (customerId: number) => {
if
(
!
customerId
)
{
return
}
logList
.
value
=
await
CustomerApi
.
getOperateLog
(
customerId
)
const
data
=
await
CustomerApi
.
getOperateLogPage
({
pageNo
:
1
,
pageSize
:
10
,
bizId
:
customerId
})
logList
.
value
=
data
.
list
}
/** 初始化 */
const
{
delView
}
=
useTagsViewStore
()
// 视图操作
...
...
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