默认neType为空时显示45G信息
This commit is contained in:
@@ -129,6 +129,7 @@ function fnTableSize({ key }: MenuInfo) {
|
|||||||
tableState.size = key as SizeType;
|
tableState.size = key as SizeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let promises = ref<any[]>([]);
|
||||||
/**查询列表, pageNum初始页数 */
|
/**查询列表, pageNum初始页数 */
|
||||||
function fnGetList(pageNum?: number) {
|
function fnGetList(pageNum?: number) {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
@@ -136,6 +137,53 @@ function fnGetList(pageNum?: number) {
|
|||||||
if (pageNum) {
|
if (pageNum) {
|
||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
|
if (!queryParams.neType) {
|
||||||
|
promises.value = [];
|
||||||
|
//同时获取45G基站信息 且在每条信息中添加45G字段(原始数据没有) 已经筛选后的
|
||||||
|
neCascaderOptions.value.map((item: any) => {
|
||||||
|
item.children.forEach((child: any) => {
|
||||||
|
promises.value.push(
|
||||||
|
listBase5G({
|
||||||
|
neId: child.neId,
|
||||||
|
neType: child.neType,
|
||||||
|
nbId: queryParams.id,
|
||||||
|
pageNum: queryParams.pageNum,
|
||||||
|
pageSize: 10000,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Promise.allSettled(promises.value).then(results => {
|
||||||
|
results.forEach(result => {
|
||||||
|
if (result.status === 'fulfilled') {
|
||||||
|
const allBaseData = result.value;
|
||||||
|
if (
|
||||||
|
allBaseData.code === RESULT_CODE_SUCCESS &&
|
||||||
|
Array.isArray(allBaseData.rows)
|
||||||
|
) {
|
||||||
|
// 处理成功结果
|
||||||
|
tablePagination.total += allBaseData.total;
|
||||||
|
tableState.data = [...tableState.data, ...allBaseData.rows];
|
||||||
|
if (
|
||||||
|
tablePagination.total <=
|
||||||
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
|
queryParams.pageNum !== 1
|
||||||
|
) {
|
||||||
|
tableState.loading = false;
|
||||||
|
fnGetList(queryParams.pageNum - 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND
|
||||||
|
tablePagination.total = 0;
|
||||||
|
tableState.data = [];
|
||||||
|
}
|
||||||
|
tableState.loading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let toBack: Record<string, any> = {
|
let toBack: Record<string, any> = {
|
||||||
neType: queryParams.neType[0],
|
neType: queryParams.neType[0],
|
||||||
@@ -160,7 +208,8 @@ function fnGetList(pageNum?: number) {
|
|||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
fnGetList(queryParams.pageNum - 1);
|
fnGetList(queryParams.pageNum - 1);
|
||||||
}
|
}
|
||||||
} else {//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND
|
} else {
|
||||||
|
//AMF返回404是代表没找到这个数据 GNB_NOT_FOUND
|
||||||
tablePagination.total = 0;
|
tablePagination.total = 0;
|
||||||
tableState.data = [];
|
tableState.data = [];
|
||||||
}
|
}
|
||||||
@@ -188,6 +237,13 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
neCascaderOptions.value.forEach((item: any) => {
|
||||||
|
if (item.label === 'AMF') {
|
||||||
|
item.label = '5G';
|
||||||
|
} else if (item.label === 'MME') item.label = '4G';
|
||||||
|
});
|
||||||
|
|
||||||
// 无查询参数neType时 默认选择AMF
|
// 无查询参数neType时 默认选择AMF
|
||||||
const queryNeType = (route.query.neType as string) || 'AMF';
|
const queryNeType = (route.query.neType as string) || 'AMF';
|
||||||
const item = neCascaderOptions.value.find(
|
const item = neCascaderOptions.value.find(
|
||||||
@@ -230,7 +286,6 @@ onMounted(() => {
|
|||||||
<a-cascader
|
<a-cascader
|
||||||
v-model:value="queryParams.neType"
|
v-model:value="queryParams.neType"
|
||||||
:options="neCascaderOptions"
|
:options="neCascaderOptions"
|
||||||
:allow-clear="false"
|
|
||||||
:placeholder="t('common.selectPlease')"
|
:placeholder="t('common.selectPlease')"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user