fix: CDR-IMS显示呼叫-挂断时间

This commit is contained in:
TsMask
2024-11-02 15:46:05 +08:00
parent e12dce1f0f
commit df5072bae7
3 changed files with 95 additions and 63 deletions

View File

@@ -567,6 +567,8 @@ export default {
rowInfo: "Info",
type: "Type",
duration: "Duration",
seizureTime: "Call Start Time",
releaseTime: "Hangup Time",
caller: "Caller",
called: "Called",
result: "Result",

View File

@@ -567,6 +567,8 @@ export default {
rowInfo: "记录信息",
type: "记录类型",
duration: "通话时长",
seizureTime: "呼叫开始时间",
releaseTime: "挂断结束时间",
caller: "主叫",
called: "被叫",
result: "结果",

View File

@@ -161,6 +161,13 @@ let tableColumns: ColumnsType = [
return cdrJSON.calledParty;
},
},
{
title: t('views.dashboard.cdr.result'),
dataIndex: 'cdrJSON',
key: 'cause',
align: 'left',
width: 150,
},
{
title: t('views.dashboard.cdr.duration'),
dataIndex: 'cdrJSON',
@@ -175,20 +182,29 @@ let tableColumns: ColumnsType = [
},
},
{
title: t('views.dashboard.cdr.result'),
title: t('views.dashboard.cdr.seizureTime'),
dataIndex: 'cdrJSON',
key: 'cause',
align: 'left',
width: 150,
},
{
title: t('views.dashboard.cdr.time'),
dataIndex: 'cdrJSON',
align: 'center',
width: 150,
width: 200,
customRender(opt) {
const cdrJSON = opt.value;
if (typeof cdrJSON.seizureTime === 'number') {
return parseDateToStr(+cdrJSON.seizureTime * 1000);
}
return cdrJSON.seizureTime;
},
},
{
title: t('views.dashboard.cdr.releaseTime'),
dataIndex: 'cdrJSON',
align: 'left',
width: 200,
customRender(opt) {
const cdrJSON = opt.value;
if (typeof cdrJSON.releaseTime === 'number') {
return parseDateToStr(+cdrJSON.releaseTime * 1000);
}
return cdrJSON.releaseTime;
},
},
{
@@ -725,7 +741,8 @@ onBeforeUnmount(() => {
</template>
</template>
<template #expandedRowRender="{ record }">
<div style="width: 46%; padding-left: 32px; padding-bottom: 16px">
<a-row :gutter="16">
<a-col :lg="5" :md="12" :xs="24">
<a-divider orientation="left">
{{ t('views.dashboard.cdr.cdrInfo') }}
</a-divider>
@@ -741,6 +758,8 @@ onBeforeUnmount(() => {
<span>{{ t('views.dashboard.cdr.time') }}: </span>
<span>{{ parseDateToStr(+record.timestamp * 1000) }}</span>
</div>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-divider orientation="left">
{{ t('views.dashboard.cdr.rowInfo') }}
</a-divider>
@@ -779,7 +798,16 @@ onBeforeUnmount(() => {
{{ t('views.dashboard.cdr.resultOk') }}
</span>
</div>
<div>
<span>{{ t('views.dashboard.cdr.seizureTime') }}: </span>
<span>{{ record.cdrJSON.seizureTime }}</span>
</div>
<div>
<span>{{ t('views.dashboard.cdr.releaseTime') }}: </span>
<span>{{ record.cdrJSON.releaseTime }}</span>
</div>
</a-col>
</a-row>
</template>
</a-table>
</a-card>