优化私聊记录
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TableHelper from '@/utils/bootstrap-table-helper';
|
import TableHelper from '@/utils/bootstrap-table-helper';
|
||||||
import { cleanArray } from '@/utils/maintainer';
|
import { apiResult, cleanArray } from '@/utils/maintainer';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserChatMsgRecordView",
|
name: "UserChatMsgRecordView",
|
||||||
@@ -107,23 +107,6 @@ export default {
|
|||||||
{ field: 'fromNick', title: '搜索人昵称', align: 'center', width: '5%' },
|
{ field: 'fromNick', title: '搜索人昵称', align: 'center', width: '5%' },
|
||||||
{ field: 'toErBanNo', title: '聊天对象ID', align: 'center', width: '5%' },
|
{ field: 'toErBanNo', title: '聊天对象ID', align: 'center', width: '5%' },
|
||||||
{ field: 'toNick', title: '聊天对象昵称', 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',
|
field: 'handle',
|
||||||
title: '查看详情',
|
title: '查看详情',
|
||||||
@@ -204,11 +187,35 @@ export default {
|
|||||||
const toErBanNo = currentData.toErBanNo;
|
const toErBanNo = currentData.toErBanNo;
|
||||||
const toNick = currentData.toNick;
|
const toNick = currentData.toNick;
|
||||||
$("#detailModal").modal('show');
|
$("#detailModal").modal('show');
|
||||||
$('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录');
|
|
||||||
var fromUid = currentData.fromUid;
|
var fromUid = currentData.fromUid;
|
||||||
var toUid = currentData.toUid;
|
var toUid = currentData.toUid;
|
||||||
$('#fromUid').val(fromUid);
|
$('#fromUid').val(fromUid);
|
||||||
$('#toUid').val(toUid);
|
$('#toUid').val(toUid);
|
||||||
|
let firstTouchTime = '';
|
||||||
|
let isInitiative = 0;
|
||||||
|
let chatMsgNum = 0;
|
||||||
|
$.ajax({
|
||||||
|
type: "get",
|
||||||
|
url: "/admin/userChatMsgRecord/getDetail",
|
||||||
|
dataType: "json",
|
||||||
|
data: {
|
||||||
|
fromUid: fromUid,
|
||||||
|
toUid: toUid,
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val(),
|
||||||
|
},
|
||||||
|
async: false,
|
||||||
|
success: function (json) {
|
||||||
|
apiResult(json);
|
||||||
|
let data = json.data;
|
||||||
|
if (data) {
|
||||||
|
firstTouchTime = data.firstTouchTime;
|
||||||
|
isInitiative = data.isInitiative;
|
||||||
|
chatMsgNum = data.chatMsgNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#modalLabel').html(fromNick + '(' + fromErBanNo + ')与' + toNick + '(' + toErBanNo + ')的聊天记录 首次接触时间:' + firstTouchTime + ' 首次接触情况:' + (isInitiative ? '被动回复' : '主动发起') + ' 聊天条目数:' + chatMsgNum);
|
||||||
$('#detailTable').bootstrapTable('destroy');
|
$('#detailTable').bootstrapTable('destroy');
|
||||||
$('#detailTable').bootstrapTable({
|
$('#detailTable').bootstrapTable({
|
||||||
columns: [
|
columns: [
|
||||||
|
Reference in New Issue
Block a user