Skip to content

Commit 261d8b2

Browse files
author
puhui999
committed
crm-客户:集成操作日志详情组件
1 parent 455688e commit 261d8b2

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

src/api/crm/customer/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ export const queryAllList = async () => {
6969
}
7070

7171
// 查询客户操作日志
72-
export const getOperateLog = async (id: number) => {
73-
return await request.get({ url: `/crm/customer/operate-log?id=` + id })
72+
export const getOperateLogPage = async (params) => {
73+
return await request.get({ url: '/crm/customer/operate-log-page', params })
7474
}

src/api/system/operatelog/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ export type OperateLogV2VO = {
2929
traceId: string
3030
userType: number
3131
userId: number
32-
module: string
33-
name: string
32+
userName: string
33+
type: string
34+
subType: string
3435
bizId: number
35-
content: string
36+
action: string
3637
extra: string
3738
requestMethod: string
3839
requestUrl: string

src/components/OperateLogV2/src/OperateLogV2.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<el-timeline-item
55
v-for="(log, index) in logDataList"
66
:key="index"
7-
:timestamp="formatDate(log.createTime!)"
7+
:timestamp="formatDate(log.createTime)"
88
placement="top"
99
>
1010
<div class="el-timeline-right-content">
1111
<el-row>
1212
<el-col :span="24" class="mb-10px">
1313
=======================
14-
<el-tag class="mr-10px" type="success">{{ log.creatorName }}</el-tag>
14+
<el-tag class="mr-10px" type="success">{{ log.userName }}</el-tag>
1515
<span>{{ log.title }}</span>
1616
=======================
1717
</el-col>
@@ -91,11 +91,11 @@ const renderTags = (content: string) => {
9191
}
9292
const initLog = () => {
9393
logDataList.value = props.logList.map((logItem) => {
94-
const keyValue = renderTags(logItem.content)
94+
const keyValue = renderTags(logItem.action)
9595
// 挂载数据
9696
logItem.contentStrList = keyValue[0]
9797
if (keyValue[0][0] === '') {
98-
logItem.title = logItem.name
98+
logItem.title = logItem.subType
9999
} else {
100100
logItem.title = keyValue[0][0]
101101
logItem.contentStrList.splice(0, 1)

src/views/crm/customer/detail/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ const getOperateLog = async (customerId: number) => {
6666
if (!customerId) {
6767
return
6868
}
69-
logList.value = await CustomerApi.getOperateLog(customerId)
69+
const data = await CustomerApi.getOperateLogPage({
70+
pageNo: 1,
71+
pageSize: 10,
72+
bizId: customerId
73+
})
74+
logList.value = data.list
7075
}
7176
/** 初始化 */
7277
const { delView } = useTagsViewStore() // 视图操作

0 commit comments

Comments
 (0)