feat: 添加CDR SIP响应代码类别类型字典
This commit is contained in:
@@ -5,7 +5,6 @@ import { message, Modal } from 'ant-design-vue/es';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
|
||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import {
|
import {
|
||||||
RESULT_CODE_ERROR,
|
RESULT_CODE_ERROR,
|
||||||
@@ -37,9 +36,12 @@ let dict: {
|
|||||||
cdrSipCode: DictType[];
|
cdrSipCode: DictType[];
|
||||||
/**CDR 呼叫类型 */
|
/**CDR 呼叫类型 */
|
||||||
cdrCallType: DictType[];
|
cdrCallType: DictType[];
|
||||||
|
/**CDR SIP响应代码类别类型 */
|
||||||
|
cdrSipCodeCause: DictType[];
|
||||||
} = reactive({
|
} = reactive({
|
||||||
cdrSipCode: [],
|
cdrSipCode: [],
|
||||||
cdrCallType: [],
|
cdrCallType: [],
|
||||||
|
cdrSipCodeCause: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
/**网元可选 */
|
/**网元可选 */
|
||||||
@@ -187,13 +189,6 @@ let tableColumns: ColumnsType = [
|
|||||||
return cdrJSON.calledParty;
|
return cdrJSON.calledParty;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: t('views.dashboard.cdr.result'),
|
|
||||||
dataIndex: 'cdrJSON',
|
|
||||||
key: 'cause',
|
|
||||||
align: 'left',
|
|
||||||
width: 150,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.duration'),
|
title: t('views.dashboard.cdr.duration'),
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
@@ -207,36 +202,50 @@ let tableColumns: ColumnsType = [
|
|||||||
: parseDuration(cdrJSON.callDuration);
|
: parseDuration(cdrJSON.callDuration);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t('views.dashboard.cdr.resultCode'),
|
||||||
|
dataIndex: 'cdrJSON',
|
||||||
|
key: 'code',
|
||||||
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('views.dashboard.cdr.resultCause'),
|
||||||
|
dataIndex: 'cdrJSON',
|
||||||
|
key: 'cause',
|
||||||
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.seizureTime'),
|
title: t('views.dashboard.cdr.seizureTime'),
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 250,
|
||||||
customRender(opt) {
|
customRender(opt) {
|
||||||
const cdrJSON = opt.value;
|
const cdrJSON = opt.value;
|
||||||
if (typeof cdrJSON.seizureTime === 'number') {
|
if (typeof cdrJSON.seizureTime === 'number') {
|
||||||
return parseDateToStr(+cdrJSON.seizureTime * 1000);
|
return parseDateToStr(+cdrJSON.seizureTime * 1000);
|
||||||
}
|
}
|
||||||
return cdrJSON.seizureTime;
|
return parseDateToStr(cdrJSON.seizureTime);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.releaseTime'),
|
title: t('views.dashboard.cdr.releaseTime'),
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 250,
|
||||||
customRender(opt) {
|
customRender(opt) {
|
||||||
const cdrJSON = opt.value;
|
const cdrJSON = opt.value;
|
||||||
if (typeof cdrJSON.releaseTime === 'number') {
|
if (typeof cdrJSON.releaseTime === 'number') {
|
||||||
return parseDateToStr(+cdrJSON.releaseTime * 1000);
|
return parseDateToStr(+cdrJSON.releaseTime * 1000);
|
||||||
}
|
}
|
||||||
return cdrJSON.releaseTime;
|
return parseDateToStr(cdrJSON.releaseTime);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.tenantName'),
|
title: t('views.dashboard.cdr.tenantName'),
|
||||||
dataIndex: 'tenantName',
|
dataIndex: 'tenantName',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
key: 'tenantName',
|
key: 'tenantName',
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
@@ -247,9 +256,6 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/**表格字段列排序 */
|
|
||||||
let tableColumnsDnd = ref<ColumnsType>([]);
|
|
||||||
|
|
||||||
/**表格分页器参数 */
|
/**表格分页器参数 */
|
||||||
let tablePagination = reactive({
|
let tablePagination = reactive({
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
@@ -510,16 +516,21 @@ function wsMessage(res: Record<string, any>) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 初始字典数据
|
||||||
Promise.allSettled([getDict('cdr_sip_code'), getDict('cdr_call_type')]).then(
|
Promise.allSettled([
|
||||||
resArr => {
|
getDict('cdr_sip_code'),
|
||||||
if (resArr[0].status === 'fulfilled') {
|
getDict('cdr_call_type'),
|
||||||
dict.cdrSipCode = resArr[0].value;
|
getDict('cdr_sip_code_cause'),
|
||||||
}
|
]).then(resArr => {
|
||||||
if (resArr[1].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
dict.cdrCallType = resArr[1].value;
|
dict.cdrSipCode = resArr[0].value;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
if (resArr[1].status === 'fulfilled') {
|
||||||
|
dict.cdrCallType = resArr[1].value;
|
||||||
|
}
|
||||||
|
if (resArr[2].status === 'fulfilled') {
|
||||||
|
dict.cdrSipCodeCause = resArr[2].value;
|
||||||
|
}
|
||||||
|
});
|
||||||
// 获取网元网元列表
|
// 获取网元网元列表
|
||||||
useNeInfoStore()
|
useNeInfoStore()
|
||||||
.fnNelist()
|
.fnNelist()
|
||||||
@@ -738,11 +749,6 @@ onBeforeUnmount(() => {
|
|||||||
<template #icon><ReloadOutlined /></template>
|
<template #icon><ReloadOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<TableColumnsDnd
|
|
||||||
cache-id="imsCdrData"
|
|
||||||
:columns="tableColumns"
|
|
||||||
v-model:columns-dnd="tableColumnsDnd"
|
|
||||||
></TableColumnsDnd>
|
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ t('common.sizeText') }}</template>
|
<template #title>{{ t('common.sizeText') }}</template>
|
||||||
<a-dropdown trigger="click" placement="bottomRight">
|
<a-dropdown trigger="click" placement="bottomRight">
|
||||||
@@ -774,12 +780,12 @@ onBeforeUnmount(() => {
|
|||||||
<a-table
|
<a-table
|
||||||
class="table"
|
class="table"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:columns="tableColumnsDnd"
|
:columns="tableColumns"
|
||||||
:loading="tableState.loading"
|
:loading="tableState.loading"
|
||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:pagination="tablePagination"
|
:pagination="tablePagination"
|
||||||
:scroll="{ x: tableColumns.length * 150, y: 'calc(100vh - 480px)' }"
|
:scroll="{ x: tableColumns.length * 160, y: 'calc(100vh - 480px)' }"
|
||||||
:row-selection="{
|
:row-selection="{
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
columnWidth: '48px',
|
columnWidth: '48px',
|
||||||
@@ -794,7 +800,7 @@ onBeforeUnmount(() => {
|
|||||||
:value="record.cdrJSON.callType"
|
:value="record.cdrJSON.callType"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'cause'">
|
<template v-if="column.key === 'code'">
|
||||||
<span v-if="record.cdrJSON.callType !== 'sms'">
|
<span v-if="record.cdrJSON.callType !== 'sms'">
|
||||||
<DictTag
|
<DictTag
|
||||||
:options="dict.cdrSipCode"
|
:options="dict.cdrSipCode"
|
||||||
@@ -806,6 +812,16 @@ onBeforeUnmount(() => {
|
|||||||
{{ t('views.dashboard.cdr.resultOk') }}
|
{{ t('views.dashboard.cdr.resultOk') }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === 'cause'">
|
||||||
|
<span v-if="record.cdrJSON.callType !== 'sms'">
|
||||||
|
<DictTag
|
||||||
|
:options="dict.cdrSipCodeCause"
|
||||||
|
:value="record.cdrJSON.cause"
|
||||||
|
value-default="0"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
<span v-else> Call failure for other reason </span>
|
||||||
|
</template>
|
||||||
<template v-if="column.key === 'id'">
|
<template v-if="column.key === 'id'">
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
|
|||||||
@@ -19,12 +19,15 @@ let dict: {
|
|||||||
ueEventType: DictType[];
|
ueEventType: DictType[];
|
||||||
/**UE 事件CM状态 */
|
/**UE 事件CM状态 */
|
||||||
ueEventCmState: DictType[];
|
ueEventCmState: DictType[];
|
||||||
|
/**CDR SIP响应代码类别类型 */
|
||||||
|
cdrSipCodeCause: DictType[];
|
||||||
} = reactive({
|
} = reactive({
|
||||||
cdrSipCode: [],
|
cdrSipCode: [],
|
||||||
cdrCallType: [],
|
cdrCallType: [],
|
||||||
ueAauthCode: [],
|
ueAauthCode: [],
|
||||||
ueEventType: [],
|
ueEventType: [],
|
||||||
ueEventCmState: [],
|
ueEventCmState: [],
|
||||||
|
cdrSipCodeCause: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -35,6 +38,7 @@ onMounted(() => {
|
|||||||
getDict('ue_auth_code'),
|
getDict('ue_auth_code'),
|
||||||
getDict('ue_event_type'),
|
getDict('ue_event_type'),
|
||||||
getDict('ue_event_cm_state'),
|
getDict('ue_event_cm_state'),
|
||||||
|
getDict('cdr_sip_code_cause'),
|
||||||
]).then(resArr => {
|
]).then(resArr => {
|
||||||
if (resArr[0].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
dict.cdrSipCode = resArr[0].value;
|
dict.cdrSipCode = resArr[0].value;
|
||||||
@@ -51,6 +55,9 @@ onMounted(() => {
|
|||||||
if (resArr[4].status === 'fulfilled') {
|
if (resArr[4].status === 'fulfilled') {
|
||||||
dict.ueEventCmState = resArr[4].value;
|
dict.ueEventCmState = resArr[4].value;
|
||||||
}
|
}
|
||||||
|
if (resArr[5].status === 'fulfilled') {
|
||||||
|
dict.cdrSipCodeCause = resArr[5].value;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -75,16 +82,7 @@ onMounted(() => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
<div>
|
<div></div>
|
||||||
{{ t('views.dashboard.overview.userActivity.time') }}:
|
|
||||||
<span :title="item.data.releaseTime">
|
|
||||||
{{
|
|
||||||
typeof item.data.releaseTime === 'number'
|
|
||||||
? parseDateToStr(+item.data.releaseTime * 1000)
|
|
||||||
: item.data.releaseTime
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-cdr-item">
|
<div class="card-cdr-item">
|
||||||
<div>
|
<div>
|
||||||
@@ -105,6 +103,16 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<div v-else></div>
|
<div v-else></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ t('views.dashboard.overview.userActivity.time') }}:
|
||||||
|
<span :title="item.data.releaseTime">
|
||||||
|
{{
|
||||||
|
typeof item.data.releaseTime === 'number'
|
||||||
|
? parseDateToStr(+item.data.releaseTime * 1000)
|
||||||
|
: parseDateToStr(item.data.releaseTime)
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ t('views.dashboard.overview.userActivity.result') }}:
|
{{ t('views.dashboard.overview.userActivity.result') }}:
|
||||||
<span v-if="item.data.callType !== 'sms'">
|
<span v-if="item.data.callType !== 'sms'">
|
||||||
@@ -112,6 +120,11 @@ onMounted(() => {
|
|||||||
:options="dict.cdrSipCode"
|
:options="dict.cdrSipCode"
|
||||||
:value="item.data.cause"
|
:value="item.data.cause"
|
||||||
value-default="0"
|
value-default="0"
|
||||||
|
/>
|
||||||
|
<DictTag
|
||||||
|
:options="dict.cdrSipCodeCause"
|
||||||
|
:value="item.data.cause"
|
||||||
|
value-default="0"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
@@ -135,15 +148,7 @@ onMounted(() => {
|
|||||||
<div>
|
<div>
|
||||||
IMSI: <span :title="item.data.imsi">{{ item.data.imsi }}</span>
|
IMSI: <span :title="item.data.imsi">{{ item.data.imsi }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div></div>
|
||||||
{{ t('views.dashboard.overview.userActivity.time') }}:
|
|
||||||
<template v-if="item.data?.time">
|
|
||||||
{{ item.data.time }}
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
{{ parseDateToStr(+item.data.timestamp * 1000) }}
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-ue-w33" v-if="item.type === 'auth-result'">
|
<div class="card-ue-w33" v-if="item.type === 'auth-result'">
|
||||||
@@ -157,7 +162,16 @@ onMounted(() => {
|
|||||||
TAC ID: <span>{{ item.data.tacID }}</span>
|
TAC ID: <span>{{ item.data.tacID }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ t('views.dashboard.overview.userActivity.time') }}:
|
||||||
|
<template v-if="item.data?.time">
|
||||||
|
{{ parseDateToStr(item.data.time) }}
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.data?.timestamp">
|
||||||
|
{{ parseDateToStr(+item.data.timestamp * 1000) }}
|
||||||
|
</template>
|
||||||
|
<template v-else> - </template>
|
||||||
|
</div>
|
||||||
<div v-if="item.type === 'auth-result'">
|
<div v-if="item.type === 'auth-result'">
|
||||||
{{ t('views.dashboard.overview.userActivity.result') }}:
|
{{ t('views.dashboard.overview.userActivity.result') }}:
|
||||||
<span>
|
<span>
|
||||||
@@ -198,16 +212,7 @@ onMounted(() => {
|
|||||||
<div>
|
<div>
|
||||||
IMSI: <span :title="item.data?.imsi">{{ item.data?.imsi }}</span>
|
IMSI: <span :title="item.data?.imsi">{{ item.data?.imsi }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div></div>
|
||||||
{{ t('views.dashboard.overview.userActivity.time') }}:
|
|
||||||
<span :title="item.data?.timestamp">
|
|
||||||
{{
|
|
||||||
typeof item.data?.timestamp === 'number'
|
|
||||||
? parseDateToStr(+item.data?.timestamp * 1000)
|
|
||||||
: item.data?.timestamp
|
|
||||||
}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-ue-w33" v-if="item.type === 'auth-result'">
|
<div class="card-ue-w33" v-if="item.type === 'auth-result'">
|
||||||
@@ -221,6 +226,20 @@ onMounted(() => {
|
|||||||
TAC ID: <span>{{ item.data.tacID }}</span>
|
TAC ID: <span>{{ item.data.tacID }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ t('views.dashboard.overview.userActivity.time') }}:
|
||||||
|
<template v-if="item.data?.time">
|
||||||
|
{{ parseDateToStr(item.data.time) }}
|
||||||
|
</template>
|
||||||
|
<template v-else-if="item.data?.timestamp">
|
||||||
|
{{
|
||||||
|
typeof item.data?.timestamp === 'number'
|
||||||
|
? parseDateToStr(+item.data?.timestamp * 1000)
|
||||||
|
: parseDateToStr(item.data?.timestamp)
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
<template v-else> - </template>
|
||||||
|
</div>
|
||||||
<div v-if="item.type === 'auth-result'">
|
<div v-if="item.type === 'auth-result'">
|
||||||
{{ t('views.dashboard.overview.userActivity.result') }}:
|
{{ t('views.dashboard.overview.userActivity.result') }}:
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
Reference in New Issue
Block a user