event Type异常

This commit is contained in:
lai
2024-12-06 18:10:06 +08:00
parent b1a699252b
commit 69dfc2a1f5

View File

@@ -415,7 +415,7 @@ onMounted(() => {
dict.ueAauthCode = resArr[0].value; dict.ueAauthCode = resArr[0].value;
} }
if (resArr[1].status === 'fulfilled') { if (resArr[1].status === 'fulfilled') {
const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1])); const ueEventType: any[] = JSON.parse(JSON.stringify(resArr[1].value));
dict.ueEventType = ueEventType.map(item => { dict.ueEventType = ueEventType.map(item => {
if (item.value === 'cm-state') { if (item.value === 'cm-state') {
item.label = item.label.replace('CM', 'ECM'); item.label = item.label.replace('CM', 'ECM');
@@ -467,71 +467,45 @@ onBeforeUnmount(() => {
<template> <template>
<PageContainer> <PageContainer>
<a-card <a-card v-show="tableState.seached" :bordered="false" :body-style="{ marginBottom: '24px', paddingBottom: 0 }">
v-show="tableState.seached"
:bordered="false"
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
>
<!-- 表格搜索栏 --> <!-- 表格搜索栏 -->
<a-form :model="queryParams" name="queryParams" layout="horizontal"> <a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item label="MME" name="neId "> <a-form-item label="MME" name="neId ">
<a-select <a-select v-model:value="queryParams.neId" :options="neOtions" :placeholder="t('common.selectPlease')" />
v-model:value="queryParams.neId"
:options="neOtions"
:placeholder="t('common.selectPlease')"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item <a-form-item :label="t('views.dashboard.ue.eventType')" name="eventType ">
:label="t('views.dashboard.ue.eventType')" <a-select v-model:value="eventTypes" mode="multiple" :options="dict.ueEventType"
name="eventType " :placeholder="t('common.selectPlease')" @change="fnQueryEventTypeChange"></a-select>
>
<a-select
v-model:value="eventTypes"
mode="multiple"
:options="dict.ueEventType"
:placeholder="t('common.selectPlease')"
@change="fnQueryEventTypeChange"
></a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="4" :md="12" :xs="24"> <a-col :lg="4" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi "> <a-form-item label="IMSI" name="imsi ">
<a-input <a-input v-model:value="queryParams.imsi" allow-clear :placeholder="t('common.inputPlease')"></a-input>
v-model:value="queryParams.imsi"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</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')" name="queryRangePicker">
:label="t('views.dashboard.cdr.time')" <a-range-picker v-model:value="queryRangePicker" allow-clear bordered :show-time="{ format: 'HH:mm:ss' }"
name="queryRangePicker" format="YYYY-MM-DD HH:mm:ss" value-format="x" style="width: 100%"></a-range-picker>
>
<a-range-picker
v-model:value="queryRangePicker"
allow-clear
bordered
:show-time="{ format: 'HH:mm:ss' }"
format="YYYY-MM-DD HH:mm:ss"
value-format="x"
style="width: 100%"
></a-range-picker>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item> <a-form-item>
<a-space :size="8"> <a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList(1)"> <a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template> <template #icon>
<SearchOutlined />
</template>
{{ t('common.search') }} {{ t('common.search') }}
</a-button> </a-button>
<a-button type="default" @click.prevent="fnQueryReset"> <a-button type="default" @click.prevent="fnQueryReset">
<template #icon><ClearOutlined /></template> <template #icon>
<ClearOutlined />
</template>
{{ t('common.reset') }} {{ t('common.reset') }}
</a-button> </a-button>
</a-space> </a-space>
@@ -545,19 +519,14 @@ onBeforeUnmount(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-popconfirm <a-popconfirm placement="bottomLeft" :title="!realTimeData
placement="bottomLeft"
:title="
!realTimeData
? t('views.dashboard.ue.realTimeDataStart') ? t('views.dashboard.ue.realTimeDataStart')
: t('views.dashboard.ue.realTimeDataStop') : t('views.dashboard.ue.realTimeDataStop')
" " ok-text="Yes" cancel-text="No" @confirm="fnRealTime()">
ok-text="Yes"
cancel-text="No"
@confirm="fnRealTime()"
>
<a-button type="primary" :danger="realTimeData"> <a-button type="primary" :danger="realTimeData">
<template #icon><FundOutlined /> </template> <template #icon>
<FundOutlined />
</template>
{{ {{
!realTimeData !realTimeData
? t('views.dashboard.ue.realTimeDataStart') ? t('views.dashboard.ue.realTimeDataStart')
@@ -566,19 +535,18 @@ onBeforeUnmount(() => {
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button <a-button type="default" danger :disabled="tableState.selectedRowKeys.length <= 0"
type="default" :loading="modalState.confirmLoading" @click.prevent="fnRecordDelete('0')">
danger <template #icon>
:disabled="tableState.selectedRowKeys.length <= 0" <DeleteOutlined />
:loading="modalState.confirmLoading" </template>
@click.prevent="fnRecordDelete('0')"
>
<template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
</a-button> </a-button>
<a-button type="dashed" @click.prevent="fnExportList()"> <a-button type="dashed" @click.prevent="fnExportList()">
<template #icon><ExportOutlined /></template> <template #icon>
<ExportOutlined />
</template>
{{ t('common.export') }} {{ t('common.export') }}
</a-button> </a-button>
</a-space> </a-space>
@@ -589,31 +557,27 @@ onBeforeUnmount(() => {
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template> <template #title>{{ t('common.searchBarText') }}</template>
<a-switch <a-switch v-model:checked="tableState.seached" :checked-children="t('common.switch.show')"
v-model:checked="tableState.seached" :un-checked-children="t('common.switch.hide')" size="small" :disabled="realTimeData" />
:checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')"
size="small"
:disabled="realTimeData"
/>
</a-tooltip> </a-tooltip>
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.reloadText') }}</template> <template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList()"> <a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template> <template #icon>
<ReloadOutlined />
</template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<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">
<a-button type="text"> <a-button type="text">
<template #icon><ColumnHeightOutlined /></template> <template #icon>
<ColumnHeightOutlined />
</template>
</a-button> </a-button>
<template #overlay> <template #overlay>
<a-menu <a-menu :selected-keys="[tableState.size as string]" @click="fnTableSize">
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default"> <a-menu-item key="default">
{{ t('common.size.default') }} {{ t('common.size.default') }}
</a-menu-item> </a-menu-item>
@@ -631,51 +595,34 @@ onBeforeUnmount(() => {
</template> </template>
<!-- 表格列表 --> <!-- 表格列表 -->
<a-table <a-table class="table" row-key="id" :columns="tableColumns" :loading="tableState.loading"
class="table" :data-source="tableState.data" :size="tableState.size" :pagination="tablePagination"
row-key="id" :scroll="{ x: tableColumns.length * 120, y: 'calc(100vh - 480px)' }" :row-selection="{
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
:pagination="tablePagination"
:scroll="{ x: tableColumns.length * 120, y: 'calc(100vh - 480px)' }"
:row-selection="{
type: 'checkbox', type: 'checkbox',
columnWidth: '48px', columnWidth: '48px',
selectedRowKeys: tableState.selectedRowKeys, selectedRowKeys: tableState.selectedRowKeys,
onChange: fnTableSelectedRowKeys, onChange: fnTableSelectedRowKeys,
}" }">
>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'eventType'"> <template v-if="column.key === 'eventType'">
<DictTag :options="dict.ueEventType" :value="record.eventType" /> <DictTag :options="dict.ueEventType" :value="record.eventType" />
</template> </template>
<template v-if="column.key === 'result'"> <template v-if="column.key === 'result'">
<span v-if="record.eventType === 'auth-result'"> <span v-if="record.eventType === 'auth-result'">
<DictTag <DictTag :options="dict.ueAauthCode" :value="record.eventJSON.result" />
:options="dict.ueAauthCode"
:value="record.eventJSON.result"
/>
</span> </span>
<span v-if="record.eventType === 'detach'"> <span v-if="record.eventType === 'detach'">
<span>{{ t('views.dashboard.ue.resultOk') }}</span> <span>{{ t('views.dashboard.ue.resultOk') }}</span>
</span> </span>
<span v-if="record.eventType === 'cm-state'"> <span v-if="record.eventType === 'cm-state'">
<DictTag <DictTag :options="dict.ueEventCmState" :value="record.eventJSON.result" />
:options="dict.ueEventCmState"
:value="record.eventJSON.result"
/>
</span> </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">
<a-tooltip> <a-tooltip>
<template #title>{{ t('common.deleteText') }}</template> <template #title>{{ t('common.deleteText') }}</template>
<a-button <a-button type="link" @click.prevent="fnRecordDelete(record.id)">
type="link"
@click.prevent="fnRecordDelete(record.id)"
>
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />
</template> </template>
@@ -711,19 +658,13 @@ onBeforeUnmount(() => {
<div> <div>
<span>{{ t('views.dashboard.ue.result') }}: </span> <span>{{ t('views.dashboard.ue.result') }}: </span>
<span v-if="record.eventType === 'auth-result'"> <span v-if="record.eventType === 'auth-result'">
<DictTag <DictTag :options="dict.ueAauthCode" :value="record.eventJSON.result" />
:options="dict.ueAauthCode"
:value="record.eventJSON.result"
/>
</span> </span>
<span v-if="record.eventType === 'detach'"> <span v-if="record.eventType === 'detach'">
{{ t('views.dashboard.ue.resultOk') }} {{ t('views.dashboard.ue.resultOk') }}
</span> </span>
<span v-if="record.eventType === 'cm-state'"> <span v-if="record.eventType === 'cm-state'">
<DictTag <DictTag :options="dict.ueEventCmState" :value="record.eventJSON.result" />
:options="dict.ueEventCmState"
:value="record.eventJSON.result"
/>
</span> </span>
</div> </div>
</div> </div>