fix: 页面字段/接口调整

This commit is contained in:
TsMask
2025-02-20 10:47:23 +08:00
parent 814bae0b94
commit 485fa89833
85 changed files with 1133 additions and 1792 deletions

View File

@@ -563,13 +563,14 @@ function fnGetList(pageNum?: number) {
tablePagination.current = pageNum;
}
listUDMAuth(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.total;
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -721,12 +722,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'UDM') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;

View File

@@ -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) {

View File

@@ -9,6 +9,7 @@ import { listUEInfoByIMS } from '@/api/neUser/ims';
import useNeInfoStore from '@/store/modules/neinfo';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listIMSSessionList } from '@/api/neData/ims';
const { t } = useI18n();
/**网元参数 */
@@ -146,14 +147,14 @@ function fnGetList(pageNum?: number) {
if (pageNum) {
queryParams.pageNum = pageNum;
}
listUEInfoByIMS(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
listIMSSessionList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.total;
tableState.data = res.rows;
tablePagination.total = res.data.length;
tableState.data = res.data;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -175,12 +176,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'IMS') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'IMS') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;

View File

@@ -92,8 +92,9 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listN3iwf(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tableState.data = res.rows;
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tableState.data = rows;
} else {
tableState.data = [];
}
@@ -106,12 +107,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'N3IWF') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'N3IWF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;
@@ -246,5 +247,4 @@ onMounted(() => {
</PageContainer>
</template>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>

View File

@@ -69,12 +69,13 @@ function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
listNSSF().then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tableState.data = res.rows;
const { total, rows } = res.data;
tableState.data = rows;
} else {
tableState.data = [];
}

View File

@@ -58,12 +58,13 @@ function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
listNSSFAMF().then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tableState.data = res.rows;
const { total, rows } = res.data;
tableState.data = rows;
} else {
tableState.data = [];
}

View File

@@ -549,12 +549,14 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listRules(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
} else {
tableState.data = [];
}
@@ -640,12 +642,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'PCF') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'PCF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;

View File

@@ -942,14 +942,15 @@ function fnGetList(pageNum?: number) {
tablePagination.current = pageNum;
}
listUDMSub(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (tableState.selectedRowKeys.length > 0) {
tableState.selectedRowKeys = [];
}
tablePagination.total = res.total;
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -1115,12 +1116,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'UDM') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'UDM') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;

View File

@@ -225,9 +225,10 @@ function fnGetList(pageNum?: number) {
queryParams.pageNum = pageNum;
}
listSMFSubList(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -249,12 +250,12 @@ onMounted(() => {
useNeInfoStore()
.fnNelist()
.then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
if (res.data.length > 0) {
let arr: Record<string, any>[] = [];
res.data.forEach(i => {
if (i.neType === 'SMF') {
arr.push({ value: i.neId, label: i.neName });
res.data.forEach((v: any) => {
if (v.neType === 'SMF') {
arr.push({ value: v.neId, label: v.neName });
}
});
neOtions.value = arr;