fix: SMSC-CDR添加结果原因说明
This commit is contained in:
@@ -33,10 +33,10 @@ const queue = new PQueue({ concurrency: 1, autoStart: true });
|
|||||||
|
|
||||||
/**字典数据 */
|
/**字典数据 */
|
||||||
let dict: {
|
let dict: {
|
||||||
/**CDR 响应原因代码类别类型 */
|
/**CDR SMSC 响应原因代码类别类型 */
|
||||||
cdrCauseCode: DictType[];
|
cdrSMSCCauseCode: DictType[];
|
||||||
} = reactive({
|
} = reactive({
|
||||||
cdrCauseCode: [],
|
cdrSMSCCauseCode: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
/**网元可选 */
|
/**网元可选 */
|
||||||
@@ -186,12 +186,19 @@ let tableColumns: ColumnsType = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.result'),
|
title: t('views.dashboard.cdr.resultCode'),
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
key: 'cause',
|
key: 'cause',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t('views.dashboard.cdr.resultCause'),
|
||||||
|
dataIndex: 'cdrJSON',
|
||||||
|
key: 'result',
|
||||||
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t('views.dashboard.cdr.time'),
|
title: t('views.dashboard.cdr.time'),
|
||||||
dataIndex: 'cdrJSON',
|
dataIndex: 'cdrJSON',
|
||||||
@@ -472,9 +479,9 @@ function wsMessage(res: Record<string, any>) {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始字典数据
|
// 初始字典数据
|
||||||
Promise.allSettled([getDict('cdr_cause_code')]).then(resArr => {
|
Promise.allSettled([getDict('cdr_cause_smsc')]).then(resArr => {
|
||||||
if (resArr[0].status === 'fulfilled') {
|
if (resArr[0].status === 'fulfilled') {
|
||||||
dict.cdrCauseCode = resArr[0].value;
|
dict.cdrSMSCCauseCode = resArr[0].value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -712,17 +719,15 @@ onBeforeUnmount(() => {
|
|||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'cause'">
|
<template v-if="column.key === 'cause'">
|
||||||
<span v-if="record.cdrJSON.result === 0">
|
<span v-if="record.cdrJSON.result === 0"> FAILED </span>
|
||||||
{{ t('views.dashboard.cdr.resultFail') }},
|
<span v-else> SUCCESS </span>
|
||||||
<DictTag
|
</template>
|
||||||
:options="dict.cdrCauseCode"
|
<template v-if="column.key === 'result'">
|
||||||
:value="record.cdrJSON.cause"
|
<DictTag
|
||||||
value-default="0"
|
:options="dict.cdrSMSCCauseCode"
|
||||||
/>
|
:value="record.cdrJSON.cause"
|
||||||
</span>
|
value-default="0"
|
||||||
<span v-else>
|
/>
|
||||||
{{ t('views.dashboard.cdr.resultOk') }}
|
|
||||||
</span>
|
|
||||||
</template>
|
</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">
|
||||||
@@ -794,18 +799,19 @@ onBeforeUnmount(() => {
|
|||||||
<span>{{ record.cdrJSON.calledParty }}</span>
|
<span>{{ record.cdrJSON.calledParty }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>{{ t('views.dashboard.cdr.result') }}: </span>
|
<span>{{ t('views.dashboard.cdr.resultCode') }}: </span>
|
||||||
<span v-if="record.cdrJSON.result === 0">
|
<span v-if="record.cdrJSON.result === 0"> FAILED </span>
|
||||||
{{ t('views.dashboard.cdr.resultFail') }},
|
<span v-else> SUCCESS </span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>{{ t('views.dashboard.cdr.resultCause') }}: </span>
|
||||||
|
<span>
|
||||||
<DictTag
|
<DictTag
|
||||||
:options="dict.cdrCauseCode"
|
:options="dict.cdrSMSCCauseCode"
|
||||||
:value="record.cdrJSON.cause"
|
:value="record.cdrJSON.cause"
|
||||||
value-default="0"
|
value-default="0"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
|
||||||
{{ t('views.dashboard.cdr.resultOk') }}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col
|
||||||
|
|||||||
Reference in New Issue
Block a user