From 56df854368cfb45f5d02173bf6f6369e1e61c4f3 Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Thu, 4 Jan 2024 19:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A7=81=E8=81=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/msg/UserChatMsgRecordView.vue | 40 ++++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/views/msg/UserChatMsgRecordView.vue b/src/views/msg/UserChatMsgRecordView.vue index d785d0c..176a6d3 100644 --- a/src/views/msg/UserChatMsgRecordView.vue +++ b/src/views/msg/UserChatMsgRecordView.vue @@ -107,23 +107,6 @@ export default { { field: 'fromNick', title: '搜索人昵称', align: 'center', width: '5%' }, { field: 'toErBanNo', title: '聊天对象ID', align: 'center', width: '5%' }, { field: 'toNick', title: '聊天对象昵称', align: 'center', width: '5%' }, - { field: 'firstTouchTime', title: '首次接触时间', align: 'center', width: '5%' }, - { - field: 'isInitiative', - title: '首次接触情况', - align: 'center', - width: '5%', - formatter: function (val, row, index) { - var value = ''; - if (val == 0) { - value = '被动回复'; - } else if (val == 1) { - value = '主动发起'; - } - return value; - } - }, - { field: 'chatMsgNum', title: '聊天条目数', align: 'center', width: '5%' }, { field: 'handle', title: '查看详情', @@ -204,11 +187,32 @@ export default { const toErBanNo = currentData.toErBanNo; const toNick = currentData.toNick; $("#detailModal").modal('show'); - $('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录'); var fromUid = currentData.fromUid; var toUid = currentData.toUid; $('#fromUid').val(fromUid); $('#toUid').val(toUid); + $('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录 首次接触时间: 首次接触情况: 聊天条目数:0'); + $.ajax({ + type: "get", + url: "/admin/userChatMsgRecord/getDetail", + dataType: "json", + data: { + fromUid: fromUid, + toUid: toUid, + startTime: $('#startTime').val(), + endTime: $('#endTime').val(), + }, + success: function (json) { + apiResult(json); + let data = json.data; + if (data) { + let firstTouchTime = data.firstTouchTime; + let isInitiative = data.isInitiative; + let chatMsgNum = data.chatMsgNum; + $('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录 首次接触时间:' + firstTouchTime + ' 首次接触情况:' + (isInitiative ? '被动回复' : '主动发起') + ' 聊天条目数:' + chatMsgNum); + } + } + }); $('#detailTable').bootstrapTable('destroy'); $('#detailTable').bootstrapTable({ columns: [