fix: ims/smf接口调整
This commit is contained in:
@@ -7,7 +7,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
|||||||
* @param query 查询参数
|
* @param query 查询参数
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function listIMS(query: Record<string, any>) {
|
export async function listUEInfoByIMS(query: Record<string, any>) {
|
||||||
query.nbId = query.id;
|
query.nbId = query.id;
|
||||||
const result = await request({
|
const result = await request({
|
||||||
url: '/api/rest/ueManagement/v1/elementType/ims/objectType/ueInfo',
|
url: '/api/rest/ueManagement/v1/elementType/ims/objectType/ueInfo',
|
||||||
@@ -40,3 +40,25 @@ export async function listIMS(query: Record<string, any>) {
|
|||||||
// ];
|
// ];
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页查询IMS在线用户数
|
||||||
|
* @param query 查询参数
|
||||||
|
* @returns neId
|
||||||
|
*/
|
||||||
|
export async function listUENumByIMS(neId: String) {
|
||||||
|
const result = await request({
|
||||||
|
url: `/api/rest/ueManagement/v1/elementType/ims/objectType/ueNum?neId=${neId}`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
if (result.code === RESULT_CODE_SUCCESS) {
|
||||||
|
return Object.assign(result, {
|
||||||
|
data: result.data['ueNum'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 模拟数据
|
||||||
|
// { "ueNum": 0 }
|
||||||
|
// result.data = 0
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
|||||||
* @param query 查询参数
|
* @param query 查询参数
|
||||||
* @returns object
|
* @returns object
|
||||||
*/
|
*/
|
||||||
export async function listUE(query: Record<string, any>) {
|
export async function listUEInfoBySMF(query: Record<string, any>) {
|
||||||
query.nbId = query.id;
|
query.nbId = query.id;
|
||||||
const result = await request({
|
const result = await request({
|
||||||
url: '/api/rest/ueManagement/v1/elementType/smf/objectType/ueInfo',
|
url: '/api/rest/ueManagement/v1/elementType/smf/objectType/ueInfo',
|
||||||
@@ -62,21 +62,24 @@ export async function listUE(query: Record<string, any>) {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
* 首页查询SMF在线用户数
|
* 首页查询SMF在线用户数
|
||||||
* @param query 查询参数
|
* @param query 查询参数
|
||||||
* @returns neId
|
* @returns neId
|
||||||
*/
|
*/
|
||||||
export async function listUENum(neId: String) {
|
export async function listUENumBySMF(neId: String) {
|
||||||
const result = await request({
|
const result = await request({
|
||||||
url: `/api/rest/ueManagement/v1/elementType/smf/objectType/ueNum?neId=${neId}`,
|
url: `/api/rest/ueManagement/v1/elementType/smf/objectType/ueNum?neId=${neId}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
});
|
});
|
||||||
if (result.code === RESULT_CODE_SUCCESS) {
|
if (result.code === RESULT_CODE_SUCCESS) {
|
||||||
let data = result.data.data;
|
|
||||||
return Object.assign(result, {
|
return Object.assign(result, {
|
||||||
data: parseObjLineToHump(data['ueNum']),
|
data: result.data.data['ueNum'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 模拟数据
|
||||||
|
// { "data": { "ueNum": 0 } }
|
||||||
|
// result.data = 0
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import { message } from 'ant-design-vue/lib';
|
|||||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/lib/table';
|
import { ColumnsType } from 'ant-design-vue/lib/table';
|
||||||
import { listIMS } from '@/api/neUser/ims';
|
import { listUEInfoByIMS } from '@/api/neUser/ims';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
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';
|
||||||
@@ -154,7 +154,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
if (pageNum) {
|
if (pageNum) {
|
||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listIMS(toRaw(queryParams)).then(res => {
|
listUEInfoByIMS(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
@@ -162,7 +162,11 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
tablePagination.total = res.total;
|
tablePagination.total = res.total;
|
||||||
tableState.data = res.rows;
|
tableState.data = res.rows;
|
||||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
if (
|
||||||
|
tablePagination.total <=
|
||||||
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
|
queryParams.pageNum !== 1
|
||||||
|
) {
|
||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
fnGetList(queryParams.pageNum - 1);
|
fnGetList(queryParams.pageNum - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { message } from 'ant-design-vue/lib';
|
|||||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
||||||
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
|
||||||
import { ColumnsType } from 'ant-design-vue/lib/table';
|
import { ColumnsType } from 'ant-design-vue/lib/table';
|
||||||
import { listUE } from '@/api/neUser/ue';
|
import { listUEInfoBySMF } from '@/api/neUser/smf';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
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';
|
||||||
@@ -82,7 +82,6 @@ let tableColumns: ColumnsType = [
|
|||||||
return opt.value;
|
return opt.value;
|
||||||
},
|
},
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'MSISDN',
|
title: 'MSISDN',
|
||||||
@@ -233,7 +232,7 @@ function fnGetList(pageNum?: number) {
|
|||||||
if (pageNum) {
|
if (pageNum) {
|
||||||
queryParams.pageNum = pageNum;
|
queryParams.pageNum = pageNum;
|
||||||
}
|
}
|
||||||
listUE(toRaw(queryParams)).then(res => {
|
listUEInfoBySMF(toRaw(queryParams)).then(res => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||||
// 取消勾选
|
// 取消勾选
|
||||||
if (tableState.selectedRowKeys.length > 0) {
|
if (tableState.selectedRowKeys.length > 0) {
|
||||||
@@ -241,7 +240,11 @@ function fnGetList(pageNum?: number) {
|
|||||||
}
|
}
|
||||||
tablePagination.total = res.total;
|
tablePagination.total = res.total;
|
||||||
tableState.data = res.rows;
|
tableState.data = res.rows;
|
||||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
if (
|
||||||
|
tablePagination.total <=
|
||||||
|
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||||
|
queryParams.pageNum !== 1
|
||||||
|
) {
|
||||||
tableState.loading = false;
|
tableState.loading = false;
|
||||||
fnGetList(queryParams.pageNum - 1);
|
fnGetList(queryParams.pageNum - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user