fix: CDR时间转换问题

This commit is contained in:
TsMask
2024-12-05 14:50:46 +08:00
parent 1c07167f1a
commit f66454256b
3 changed files with 40 additions and 14 deletions

View File

@@ -589,15 +589,12 @@ onBeforeUnmount(() => {
<a-select <a-select
v-model:value="recordTypes" v-model:value="recordTypes"
mode="multiple" mode="multiple"
:options=" :options="['MOC', 'MTC'].map(v => ({ value: v }))"
['MOC', 'MTC', 'MOSM', 'MTSM'].map(v => ({ value: v }))
"
:placeholder="t('common.selectPlease')" :placeholder="t('common.selectPlease')"
@change="fnQueryRecordTypeChange" @change="fnQueryRecordTypeChange"
></a-select> ></a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="8" :md="12" :xs="24">
<a-form-item <a-form-item
:label="t('views.dashboard.cdr.time')" :label="t('views.dashboard.cdr.time')"
@@ -805,7 +802,13 @@ onBeforeUnmount(() => {
</div> </div>
<div> <div>
<span>{{ t('views.dashboard.cdr.time') }}: </span> <span>{{ t('views.dashboard.cdr.time') }}: </span>
<span>{{ parseDateToStr(+record.timestamp * 1000) }}</span> <span>
{{
typeof record.cdrJSON.releaseTime === 'number'
? parseDateToStr(+record.cdrJSON.releaseTime * 1000)
: record.cdrJSON.releaseTime
}}
</span>
</div> </div>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
@@ -849,11 +852,23 @@ onBeforeUnmount(() => {
</div> </div>
<div> <div>
<span>{{ t('views.dashboard.cdr.seizureTime') }}: </span> <span>{{ t('views.dashboard.cdr.seizureTime') }}: </span>
<span>{{ record.cdrJSON.seizureTime }}</span> <span>
{{
typeof record.cdrJSON.seizureTime === 'number'
? parseDateToStr(+record.cdrJSON.seizureTime * 1000)
: record.cdrJSON.seizureTime
}}
</span>
</div> </div>
<div> <div>
<span>{{ t('views.dashboard.cdr.releaseTime') }}: </span> <span>{{ t('views.dashboard.cdr.releaseTime') }}: </span>
<span>{{ record.cdrJSON.releaseTime }}</span> <span>
{{
typeof record.cdrJSON.releaseTime === 'number'
? parseDateToStr(+record.cdrJSON.releaseTime * 1000)
: record.cdrJSON.releaseTime
}}
</span>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -739,7 +739,7 @@ onBeforeUnmount(() => {
</div> </div>
<div> <div>
<span>{{ t('views.dashboard.cdr.time') }}: </span> <span>{{ t('views.dashboard.cdr.time') }}: </span>
<span>{{ parseDateToStr(+record.timestamp * 1000) }}</span> <span>{{ record.cdrJSON.invocationTimestamp }}</span>
</div> </div>
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.dashboard.cdr.rowInfo') }} {{ t('views.dashboard.cdr.rowInfo') }}
@@ -854,10 +854,12 @@ onBeforeUnmount(() => {
</div> </div>
<div> <div>
<span>Network Function IPv4: </span> <span>Network Function IPv4: </span>
<span>{{ <span>
record.cdrJSON.nFunctionConsumerInformation {{
.networkFunctionIPv4Address record.cdrJSON.nFunctionConsumerInformation
}}</span> ?.networkFunctionIPv4Address
}}
</span>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -183,7 +183,10 @@ let tableColumns: ColumnsType = [
width: 150, width: 150,
customRender(opt) { customRender(opt) {
const cdrJSON = opt.value; const cdrJSON = opt.value;
return parseDateToStr(+cdrJSON.updateTime * 1000); if (typeof cdrJSON.updateTime === 'number') {
return parseDateToStr(+cdrJSON.updateTime * 1000);
}
return cdrJSON.updateTime;
}, },
}, },
{ {
@@ -755,7 +758,13 @@ onBeforeUnmount(() => {
</div> </div>
<div> <div>
<span>{{ t('views.dashboard.cdr.time') }}: </span> <span>{{ t('views.dashboard.cdr.time') }}: </span>
<span>{{ parseDateToStr(+record.timestamp * 1000) }}</span> <span>
{{
typeof record.cdrJSON.updateTime === 'number'
? parseDateToStr(+record.cdrJSON.updateTime * 1000)
: record.cdrJSON.updateTime
}}
</span>
</div> </div>
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.dashboard.cdr.rowInfo') }} {{ t('views.dashboard.cdr.rowInfo') }}