feat: 调整SMF在线用户列表数据补充显示imsi备注标记

This commit is contained in:
TsMask
2024-09-19 11:49:30 +08:00
parent 678ff2d09d
commit af1ce32063
2 changed files with 30 additions and 19 deletions

View File

@@ -40,3 +40,16 @@ export function exportSMFDataCDR(data: Record<string, any>) {
timeout: 60_000, timeout: 60_000,
}); });
} }
/**
* SMF-在线订阅用户列表信息
* @param query 查询参数
* @returns object
*/
export function listSMFSubscribers(query: Record<string, any>) {
return request({
url: '/neData/smf/subscribers',
method: 'get',
params: query,
});
}

View File

@@ -5,7 +5,7 @@ import { message } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider'; import { SizeType } from 'ant-design-vue/lib/config-provider';
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/lib/table'; import { ColumnsType } from 'ant-design-vue/lib/table';
import { listUEInfoBySMF } from '@/api/neUser/smf'; import { listSMFSubscribers } from '@/api/neData/smf';
import useNeInfoStore from '@/store/modules/neinfo'; import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -51,8 +51,6 @@ type TabeStateType = {
seached: boolean; seached: boolean;
/**记录数据 */ /**记录数据 */
data: object[]; data: object[];
/**勾选记录 */
selectedRowKeys: (string | number)[];
}; };
/**表格状态 */ /**表格状态 */
@@ -61,7 +59,6 @@ let tableState: TabeStateType = reactive({
size: 'middle', size: 'middle',
seached: true, seached: true,
data: [], data: [],
selectedRowKeys: [],
}); });
/**表格字段列 */ /**表格字段列 */
@@ -69,7 +66,7 @@ let tableColumns: ColumnsType = [
{ {
title: 'IMSI', title: 'IMSI',
dataIndex: 'imsi', dataIndex: 'imsi',
align: 'center', align: 'left',
sorter: (a: any, b: any) => Number(a.imsi) - Number(b.imsi), sorter: (a: any, b: any) => Number(a.imsi) - Number(b.imsi),
customRender(opt) { customRender(opt) {
const idx = opt.value.lastIndexOf('-'); const idx = opt.value.lastIndexOf('-');
@@ -83,7 +80,7 @@ let tableColumns: ColumnsType = [
{ {
title: 'MSISDN', title: 'MSISDN',
dataIndex: 'msisdn', dataIndex: 'msisdn',
align: 'center', align: 'left',
sorter: (a: any, b: any) => Number(a.msisdn) - Number(b.msisdn), sorter: (a: any, b: any) => Number(a.msisdn) - Number(b.msisdn),
customRender(opt) { customRender(opt) {
const idx = opt.value.lastIndexOf('-'); const idx = opt.value.lastIndexOf('-');
@@ -97,7 +94,7 @@ let tableColumns: ColumnsType = [
{ {
title: 'RAT Type', title: 'RAT Type',
dataIndex: 'ratType', dataIndex: 'ratType',
align: 'center', align: 'left',
width: 100, width: 100,
}, },
{ {
@@ -116,12 +113,18 @@ let tableColumns: ColumnsType = [
} }
return ''; return '';
}, },
width: 150, width: 200,
}, },
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'imsi', key: 'imsi',
align: 'left', align: 'left',
width: 100,
},
{
title: 'Remark',
dataIndex: 'remark',
align: 'left',
}, },
]; ];
@@ -220,12 +223,8 @@ function fnGetList(pageNum?: number) {
if (pageNum) { if (pageNum) {
queryParams.pageNum = pageNum; queryParams.pageNum = pageNum;
} }
listUEInfoBySMF(toRaw(queryParams)).then(res => { listSMFSubscribers(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.total; tablePagination.total = res.total;
tableState.data = res.rows; tableState.data = res.rows;
if ( if (
@@ -286,7 +285,7 @@ onMounted(() => {
<!-- 表格搜索栏 --> <!-- 表格搜索栏 -->
<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="8" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.neUser.ue.neType')" name="neId "> <a-form-item :label="t('views.neUser.ue.neType')" name="neId ">
<a-select <a-select
v-model:value="queryParams.neId" v-model:value="queryParams.neId"
@@ -295,18 +294,17 @@ onMounted(() => {
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item label="IMSI" name="imsi"> <a-form-item label="IMSI" name="imsi">
<a-input v-model:value="queryParams.imsi" allow-clear></a-input> <a-input v-model:value="queryParams.imsi" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item label="MSISDN" name="msisdn"> <a-form-item label="MSISDN" name="msisdn">
<a-input v-model:value="queryParams.msisdn" allow-clear></a-input> <a-input v-model:value="queryParams.msisdn" allow-clear></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-col :lg="8" :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)">
@@ -382,7 +380,7 @@ onMounted(() => {
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ x: 1000, y: 400 }" :scroll="{ x: true, y: 400 }"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'imsi'"> <template v-if="column.key === 'imsi'">