租户SMF在线信息无需再选具体网元
This commit is contained in:
@@ -19,6 +19,8 @@ let neOtions = ref<Record<string, any>[]>([]);
|
|||||||
|
|
||||||
/**查询参数 */
|
/**查询参数 */
|
||||||
let queryParams = reactive({
|
let queryParams = reactive({
|
||||||
|
/**所有SMF */
|
||||||
|
totalType: <Record<string, any>[]>[],
|
||||||
/**网元ID */
|
/**网元ID */
|
||||||
neId: undefined,
|
neId: undefined,
|
||||||
/**IMSI */
|
/**IMSI */
|
||||||
@@ -29,20 +31,21 @@ let queryParams = reactive({
|
|||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
/**每页条数 */
|
/**每页条数 */
|
||||||
pageSize: 20,
|
pageSize: 200,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**查询参数重置 */
|
/**查询参数重置 */
|
||||||
function fnQueryReset() {
|
function fnQueryReset() {
|
||||||
queryParams = Object.assign(queryParams, {
|
queryParams = Object.assign(queryParams, {
|
||||||
|
totalType: [],
|
||||||
imsi: '',
|
imsi: '',
|
||||||
msisdn: '',
|
msisdn: '',
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20,
|
pageSize: 200,
|
||||||
});
|
});
|
||||||
tablePagination.current = 1;
|
tablePagination.current = 1;
|
||||||
tablePagination.pageSize = 20;
|
tablePagination.pageSize = 20;
|
||||||
fnGetList();
|
fnGetAllList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**表格状态类型 */
|
/**表格状态类型 */
|
||||||
@@ -156,7 +159,7 @@ let tablePagination = reactive({
|
|||||||
tablePagination.pageSize = pageSize;
|
tablePagination.pageSize = pageSize;
|
||||||
queryParams.pageNum = page;
|
queryParams.pageNum = page;
|
||||||
queryParams.pageSize = pageSize;
|
queryParams.pageSize = pageSize;
|
||||||
fnGetList();
|
fnGetAllList();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -224,34 +227,59 @@ function fnModalCancel() {
|
|||||||
modalState.visibleByView = false;
|
modalState.visibleByView = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//接收响应信息
|
||||||
|
let promises = ref<any[]>([]);
|
||||||
|
|
||||||
/**查询列表, pageNum初始页数 */
|
/**查询列表, pageNum初始页数 */
|
||||||
function fnGetList(pageNum?: number) {
|
function fnGetAllList(pageNum?: number) {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
if (pageNum) {
|
if (pageNum) {
|
||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listUEInfoBySMF(toRaw(queryParams)).then(res => {
|
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
tableState.data = [];
|
||||||
// 取消勾选
|
promises.value = [];
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
|
||||||
tableState.selectedRowKeys = [];
|
//同时获取45G基站信息 且在每条信息中添加45G字段(原始数据没有) 已经筛选后的
|
||||||
}
|
queryParams.totalType.map((item: any) => {
|
||||||
tablePagination.total = res.total;
|
promises.value.push(
|
||||||
tableState.data = res.rows;
|
listUEInfoBySMF({
|
||||||
if (
|
neId: item.neId,
|
||||||
tablePagination.total <=
|
imsi: queryParams.imsi,
|
||||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
msisdn: queryParams.msisdn,
|
||||||
queryParams.pageNum !== 1
|
pageNum: queryParams.pageNum,
|
||||||
) {
|
pageSize: 10000,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
Promise.allSettled(promises.value).then(results => {
|
||||||
|
results.forEach(result => {
|
||||||
|
if (result.status === 'fulfilled') {
|
||||||
|
const allUeData = result.value;
|
||||||
|
if (
|
||||||
|
allUeData.code === RESULT_CODE_SUCCESS &&
|
||||||
|
Array.isArray(allUeData.rows)
|
||||||
|
) {
|
||||||
|
// 处理成功结果
|
||||||
|
tablePagination.total += allUeData.total;
|
||||||
|
tableState.data = [...tableState.data, ...allUeData.rows];
|
||||||
|
if (
|
||||||
|
tablePagination.total <=
|
||||||
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
|
queryParams.pageNum !== 1
|
||||||
|
) {
|
||||||
|
tableState.loading = false;
|
||||||
|
fnGetAllList(queryParams.pageNum - 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tablePagination.total = 0;
|
||||||
|
tableState.data = [];
|
||||||
|
}
|
||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
fnGetList(queryParams.pageNum - 1);
|
|
||||||
}
|
}
|
||||||
} else {
|
});
|
||||||
tablePagination.total = 0;
|
|
||||||
tableState.data = [];
|
|
||||||
}
|
|
||||||
tableState.loading = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,10 +292,13 @@ onMounted(() => {
|
|||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
let arr: Record<string, any>[] = [];
|
let arr: Record<string, any>[] = [];
|
||||||
res.data.forEach(i => {
|
res.data.forEach(i => {
|
||||||
|
console.log(i);
|
||||||
if (i.neType === 'SMF') {
|
if (i.neType === 'SMF') {
|
||||||
arr.push({ value: i.neId, label: i.neName });
|
arr.push({ value: i.neId, label: i.neName });
|
||||||
|
queryParams.totalType.push(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
neOtions.value = arr;
|
neOtions.value = arr;
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
queryParams.neId = arr[0].value;
|
queryParams.neId = arr[0].value;
|
||||||
@@ -282,7 +313,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
fnGetList();
|
fnGetAllList();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -297,15 +328,6 @@ 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-form-item :label="t('views.neUser.ue.neType')" name="neId ">
|
|
||||||
<a-select
|
|
||||||
v-model:value="queryParams.neId"
|
|
||||||
:options="neOtions"
|
|
||||||
:placeholder="t('common.selectPlease')"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="8" :md="12" :xs="24">
|
<a-col :lg="8" :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>
|
||||||
@@ -320,7 +342,7 @@ onMounted(() => {
|
|||||||
<a-col :lg="8" :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="fnGetAllList(1)">
|
||||||
<template #icon><SearchOutlined /></template>
|
<template #icon><SearchOutlined /></template>
|
||||||
{{ t('common.search') }}
|
{{ t('common.search') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -353,7 +375,7 @@ onMounted(() => {
|
|||||||
</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="fnGetAllList()">
|
||||||
<template #icon><ReloadOutlined /></template>
|
<template #icon><ReloadOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
@@ -420,7 +442,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<!-- 详情框 -->
|
<!-- 详情框 -->
|
||||||
<ProModal
|
<ProModal
|
||||||
width="800px"
|
:width="800"
|
||||||
:visible="modalState.visibleByView"
|
:visible="modalState.visibleByView"
|
||||||
:title="modalState.title"
|
:title="modalState.title"
|
||||||
@cancel="fnModalCancel"
|
@cancel="fnModalCancel"
|
||||||
|
|||||||
Reference in New Issue
Block a user