feat: 调整nssf/n3iwf接口调用
This commit is contained in:
@@ -3,36 +3,14 @@ import { request } from '@/plugins/http-fetch';
|
|||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* N3IWF-在线订阅用户列表信息
|
||||||
* @param query 查询参数
|
* @param query 查询参数 {imsi}
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function listN3iwf(query: Record<string, any>) {
|
export function listN3IWFSubList(query: Record<string, any>) {
|
||||||
const result = await request({
|
return request({
|
||||||
url: '/api/rest/ueManagement/v1/elementType/n3iwf/objectType/ueInfo',
|
url: '/neData/n3iwf/sub/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: query,
|
params: query,
|
||||||
});
|
});
|
||||||
const data = {
|
|
||||||
data: { total: 0, rows: [] as any },
|
|
||||||
code: result.code,
|
|
||||||
msg: result.msg,
|
|
||||||
};
|
|
||||||
// 解析数据
|
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
|
||||||
const rows = parseObjLineToHump(result.data.data);
|
|
||||||
data.data.total = rows.length;
|
|
||||||
data.data.rows = rows;
|
|
||||||
}
|
|
||||||
// 模拟数据
|
|
||||||
// data.rows = [
|
|
||||||
// {
|
|
||||||
// "activeTime": "2023-11-29 06:35:43",
|
|
||||||
// "imsi": "460302072701181",
|
|
||||||
// "nai": "0460302072701181@nai.epc.mnc030.mcc460.3gppnetwork.org",
|
|
||||||
// "regState": 1
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,24 +3,24 @@ import { request } from '@/plugins/http-fetch';
|
|||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询列表
|
* NSSF-在线订阅用户列表信息
|
||||||
|
* @param query 查询参数 {imsi}
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function listNSSF() {
|
export function listNSSFSubList() {
|
||||||
const result = await request({
|
return request({
|
||||||
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/subscriptions',
|
url: '/neData/nssf/sub/list',
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NSSF-可用AMF列表信息
|
||||||
|
* @returns object
|
||||||
|
*/
|
||||||
|
export function listNSSFAmfList() {
|
||||||
|
return request({
|
||||||
|
url: '/neData/nssf/amf/list',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
});
|
});
|
||||||
let data = {
|
|
||||||
data: { total: 0, rows: [] as any },
|
|
||||||
code: result.code,
|
|
||||||
msg: result.msg,
|
|
||||||
};
|
|
||||||
// 解析数据
|
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
|
||||||
const rows = parseObjLineToHump(result.data.data);
|
|
||||||
data.data.total = rows.length;
|
|
||||||
data.data.rows = rows;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
|
||||||
import { request } from '@/plugins/http-fetch';
|
|
||||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询列表
|
|
||||||
* @returns object
|
|
||||||
*/
|
|
||||||
export async function listNSSFAMF() {
|
|
||||||
const result = await request({
|
|
||||||
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/availableAMFs',
|
|
||||||
method: 'GET',
|
|
||||||
});
|
|
||||||
const data = {
|
|
||||||
data: { total: 0, rows: [] as any },
|
|
||||||
code: result.code,
|
|
||||||
msg: result.msg,
|
|
||||||
};
|
|
||||||
// 解析数据
|
|
||||||
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
|
|
||||||
const rows = parseObjLineToHump(result.data.data);
|
|
||||||
data.data.total = rows.length;
|
|
||||||
data.data.rows = rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
// let testData = {
|
|
||||||
// total:0,
|
|
||||||
// rows: [
|
|
||||||
// {
|
|
||||||
// nfId: '001',
|
|
||||||
// amfSetId: '001',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// nfId: '002',
|
|
||||||
// amfSetId: '[001,002]',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// code: 1,
|
|
||||||
// msg:'',
|
|
||||||
// };
|
|
||||||
//return testData;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import { message } from 'ant-design-vue/es';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listN3iwf } from '@/api/neUser/n3iwf';
|
import { listN3IWFSubList } from '@/api/neUser/n3iwf';
|
||||||
import useNeListStore from '@/store/modules/ne_list';
|
import useNeListStore from '@/store/modules/ne_list';
|
||||||
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';
|
||||||
@@ -91,10 +91,10 @@ function fnTableSize({ key }: MenuInfo) {
|
|||||||
function fnGetList() {
|
function fnGetList() {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
listN3iwf(toRaw(queryParams)).then(res => {
|
listN3IWFSubList(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
const { total, rows } = res.data;
|
const { total, rows } = res.data;
|
||||||
tableState.data = rows;
|
tableState.data = rows;
|
||||||
} else {
|
} else {
|
||||||
tableState.data = [];
|
tableState.data = [];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listNSSF } from '@/api/neUser/nssf';
|
import { listNSSFSubList } from '@/api/neUser/nssf';
|
||||||
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';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -63,7 +63,7 @@ function fnTableSize({ key }: MenuInfo) {
|
|||||||
function fnGetList(pageNum?: number) {
|
function fnGetList(pageNum?: number) {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
listNSSF().then(res => {
|
listNSSFSubList().then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { PageContainer } from 'antdv-pro-layout';
|
|||||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||||
import { listNSSFAMF } from '@/api/neUser/nssfAmf';
|
import { listNSSFAmfList } from '@/api/neUser/nssf';
|
||||||
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';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -57,7 +57,7 @@ function fnTableSize({ key }: MenuInfo) {
|
|||||||
function fnGetList(pageNum?: number) {
|
function fnGetList(pageNum?: number) {
|
||||||
if (tableState.loading) return;
|
if (tableState.loading) return;
|
||||||
tableState.loading = true;
|
tableState.loading = true;
|
||||||
listNSSFAMF().then(res => {
|
listNSSFAmfList().then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user