diff --git a/src/api/crm/customer/index.ts b/src/api/crm/customer/index.ts index bedb61f5..50eebd64 100644 --- a/src/api/crm/customer/index.ts +++ b/src/api/crm/customer/index.ts @@ -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 getOperateLogPage = async (params) => { + return await request.get({ url: '/crm/customer/operate-log-page', params }) } diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts index 49dbe1bb..6e352727 100644 --- a/src/api/system/operatelog/index.ts +++ b/src/api/system/operatelog/index.ts @@ -37,10 +37,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 diff --git a/src/components/OperateLogV2/src/OperateLogV2.vue b/src/components/OperateLogV2/src/OperateLogV2.vue index dd9e8cdf..cb5663b2 100644 --- a/src/components/OperateLogV2/src/OperateLogV2.vue +++ b/src/components/OperateLogV2/src/OperateLogV2.vue @@ -4,14 +4,14 @@
======================= - {{ log.creatorName }} + {{ log.userName }} {{ log.title }} ======================= @@ -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.name + logItem.title = logItem.subType } else { logItem.title = keyValue[0][0] logItem.contentStrList.splice(0, 1) diff --git a/src/views/crm/customer/detail/index.vue b/src/views/crm/customer/detail/index.vue index 626d30ae..e8d73582 100644 --- a/src/views/crm/customer/detail/index.vue +++ b/src/views/crm/customer/detail/index.vue @@ -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() // 视图操作