crm-客户:集成操作日志详情组件
This commit is contained in:
parent
455688eaa8
commit
261d8b2aa4
@ -69,6 +69,6 @@ export const queryAllList = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询客户操作日志
|
// 查询客户操作日志
|
||||||
export const getOperateLog = async (id: number) => {
|
export const getOperateLogPage = async (params) => {
|
||||||
return await request.get({ url: `/crm/customer/operate-log?id=` + id })
|
return await request.get({ url: '/crm/customer/operate-log-page', params })
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,11 @@ export type OperateLogV2VO = {
|
|||||||
traceId: string
|
traceId: string
|
||||||
userType: number
|
userType: number
|
||||||
userId: number
|
userId: number
|
||||||
module: string
|
userName: string
|
||||||
name: string
|
type: string
|
||||||
|
subType: string
|
||||||
bizId: number
|
bizId: number
|
||||||
content: string
|
action: string
|
||||||
extra: string
|
extra: string
|
||||||
requestMethod: string
|
requestMethod: string
|
||||||
requestUrl: string
|
requestUrl: string
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
<el-timeline-item
|
<el-timeline-item
|
||||||
v-for="(log, index) in logDataList"
|
v-for="(log, index) in logDataList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:timestamp="formatDate(log.createTime!)"
|
:timestamp="formatDate(log.createTime)"
|
||||||
placement="top"
|
placement="top"
|
||||||
>
|
>
|
||||||
<div class="el-timeline-right-content">
|
<div class="el-timeline-right-content">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="mb-10px">
|
<el-col :span="24" class="mb-10px">
|
||||||
=======================
|
=======================
|
||||||
<el-tag class="mr-10px" type="success">{{ log.creatorName }}</el-tag>
|
<el-tag class="mr-10px" type="success">{{ log.userName }}</el-tag>
|
||||||
<span>{{ log.title }}</span>
|
<span>{{ log.title }}</span>
|
||||||
=======================
|
=======================
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -91,11 +91,11 @@ const renderTags = (content: string) => {
|
|||||||
}
|
}
|
||||||
const initLog = () => {
|
const initLog = () => {
|
||||||
logDataList.value = props.logList.map((logItem) => {
|
logDataList.value = props.logList.map((logItem) => {
|
||||||
const keyValue = renderTags(logItem.content)
|
const keyValue = renderTags(logItem.action)
|
||||||
// 挂载数据
|
// 挂载数据
|
||||||
logItem.contentStrList = keyValue[0]
|
logItem.contentStrList = keyValue[0]
|
||||||
if (keyValue[0][0] === '从') {
|
if (keyValue[0][0] === '从') {
|
||||||
logItem.title = logItem.name
|
logItem.title = logItem.subType
|
||||||
} else {
|
} else {
|
||||||
logItem.title = keyValue[0][0]
|
logItem.title = keyValue[0][0]
|
||||||
logItem.contentStrList.splice(0, 1)
|
logItem.contentStrList.splice(0, 1)
|
||||||
|
@ -66,7 +66,12 @@ const getOperateLog = async (customerId: number) => {
|
|||||||
if (!customerId) {
|
if (!customerId) {
|
||||||
return
|
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() // 视图操作
|
const { delView } = useTagsViewStore() // 视图操作
|
||||||
|
Loading…
Reference in New Issue
Block a user