fix: 页面字段/接口调整
This commit is contained in:
@@ -4,11 +4,12 @@ import { PageContainer } from 'antdv-pro-layout';
|
||||
import { TableColumnsType, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { listBase5G } from '@/api/neUser/base5G';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import useNeInfoStore from '@/store/modules/neinfo';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { listAMFNblist } from '@/api/neData/amf';
|
||||
import { listMMENblist } from '@/api/neData/mme';
|
||||
const neInfoStore = useNeInfoStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
@@ -152,24 +153,34 @@ function fnGetList(pageNum?: number) {
|
||||
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,
|
||||
}).then(res => {
|
||||
// 添加 neName 字段到每一项数据
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
res.rows.forEach(row => {
|
||||
row.neName = `${child.neType}_${child.neId}`;
|
||||
});
|
||||
}
|
||||
return res;
|
||||
})
|
||||
);
|
||||
item.children.forEach((child: any) => {
|
||||
let resq = null;
|
||||
let s = {
|
||||
neId: child.neId,
|
||||
neType: child.neType,
|
||||
nbId: queryParams.id,
|
||||
pageNum: queryParams.pageNum,
|
||||
pageSize: 10000,
|
||||
};
|
||||
if (child.neType === '5G' || child.neType === 'AMF') {
|
||||
resq = listAMFNblist(s);
|
||||
}
|
||||
if (child.neType === '4G' || child.neType === 'MME') {
|
||||
resq = listMMENblist(s);
|
||||
}
|
||||
if (resq !== null) {
|
||||
promises.value.push(
|
||||
resq.then(res => {
|
||||
// 添加 neName 字段到每一项数据
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
res.data.forEach((row: any) => {
|
||||
row.neName = `${child.neType}_${child.neId}`;
|
||||
});
|
||||
}
|
||||
return res;
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -212,16 +223,25 @@ function fnGetList(pageNum?: number) {
|
||||
pageNum: queryParams.pageNum,
|
||||
pageSize: queryParams.pageSize,
|
||||
};
|
||||
listBase5G(toRaw(toBack)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
let resq = null;
|
||||
if (queryParams.neType[0] === '5G' || queryParams.neType[0] === 'AMF') {
|
||||
resq = listAMFNblist(toRaw(toBack));
|
||||
}
|
||||
if (queryParams.neType[0] === '4G' || queryParams.neType[0] === 'MME') {
|
||||
resq = listMMENblist(toRaw(toBack));
|
||||
}
|
||||
if (resq === null) return;
|
||||
resq.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
}
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
|
||||
res.rows.forEach((item: any) => {
|
||||
tablePagination.total = res.data.length;
|
||||
tableState.data = res.data;
|
||||
|
||||
res.data.forEach((item: any) => {
|
||||
item.neName = queryParams.neType.join('_');
|
||||
});
|
||||
|
||||
@@ -247,7 +267,7 @@ onMounted(() => {
|
||||
neInfoStore
|
||||
.fnNelist()
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
if (res.data.length > 0) {
|
||||
// 过滤不可用的网元
|
||||
for (const item of neInfoStore.getNeCascaderOptions) {
|
||||
|
||||
Reference in New Issue
Block a user