ref: v3变更,,表结构对应相关接口功能

This commit is contained in:
TsMask
2025-09-15 11:02:28 +08:00
parent 54cf296d2f
commit 2f839f7178
117 changed files with 2008 additions and 2076 deletions

View File

@@ -6,15 +6,14 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
* 获取活动告警数 * 获取活动告警数
* @returns object * @returns object
*/ */
export async function getActiveAlarmTotal(coreUid: string) { export async function getActiveAlarmTotal() {
// 发起请求 // 发起请求
const result = await request({ const result = await request({
url: `/ne/data/alarm/list`, url: `/ne/data/alarm/list`,
method: 'GET', method: 'GET',
params: { params: {
coreUid: coreUid,
alarmStatus: 'Active', alarmStatus: 'Active',
sortField: 'event_time', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,
@@ -106,11 +105,11 @@ export function getPass() {
* @param id 记录ID * @param id 记录ID
* @returns object * @returns object
*/ */
export function clearAlarm(id: number, coreUid: string) { export function clearAlarm(id: number | string) {
return request({ return request({
url: `/ne/data/alarm/clear`, url: `/ne/data/alarm/clear`,
method: 'PUT', method: 'PUT',
data: { id, coreUid }, data: { id },
}); });
} }
@@ -191,13 +190,12 @@ export async function exportAll(query: Record<string, any>) {
* @param query 查询参数 * @param query 查询参数
* @returns bolb * @returns bolb
*/ */
export async function origGet(coreUid: string) { export async function origGet(alarmStatus: 'Active' | 'Clear') {
return await request({ return await request({
url: `/ne/data/alarm/count/severity`, url: `/ne/data/alarm/count/severity`,
method: 'GET', method: 'GET',
params: { params: {
coreUid: coreUid, alarmStatus: alarmStatus,
alarmStatus: 'Active',
}, },
}); });
} }
@@ -207,13 +205,12 @@ export async function origGet(coreUid: string) {
* @param filterFlag 查询参数 * @param filterFlag 查询参数
* @returns object * @returns object
*/ */
export async function top3Sel(coreUid: string) { export async function top3Sel(alarmStatus: 'Active' | 'Clear') {
return await request({ return await request({
url: `/ne/data/alarm/count/top`, url: `/ne/data/alarm/count/top`,
method: 'GET', method: 'GET',
params: { params: {
coreUid: coreUid, alarmStatus: alarmStatus,
alarmStatus: 'Active',
top: 3, top: 3,
}, },
}); });

View File

@@ -57,21 +57,15 @@ export async function sendMML(data: Record<string, any>) {
/** /**
* 发送网元的mml命令 * 发送网元的mml命令
* @param coreUid 网元类型
* @param neUid 网元ID * @param neUid 网元ID
* @param cmdArr 命令数组 * @param cmdArr 命令数组
* @returns * @returns
*/ */
export async function sendMMlByGeneral( export async function sendMMlByGeneral(neUid: string, cmdArr: string[]) {
coreUid: string,
neUid: string,
cmdArr: string[]
) {
return request({ return request({
url: '/tool/mml/command', url: '/tool/mml/command',
method: 'POST', method: 'POST',
data: { data: {
coreUid: coreUid,
neUid: neUid, neUid: neUid,
type: 'General', type: 'General',
command: cmdArr, command: cmdArr,

View File

@@ -1,50 +1,46 @@
import { request } from '@/plugins/http-fetch'; import { request } from '@/plugins/http-fetch';
/** /**
* 查询网元状态 * 查询网元状态
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function stateNeInfo(coreUid: string, neUid: string) { export function stateNeInfo(neUid: string) {
return request({ return request({
url: '/ne/info/state', url: '/ne/info/state',
method: 'GET', method: 'GET',
params: { coreUid, neUid }, params: { neUid },
}); });
} }
/** /**
* 查询网元信息 * 查询网元信息
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function getNeInfoByNF(coreUid: string, neUid: string) { export function getNeInfoByNF(neUid: string) {
return request({ return request({
url: '/ne/info/nf', url: '/ne/info/nf',
method: 'GET', method: 'GET',
params: { coreUid, neUid }, params: { neUid },
}); });
} }
/** /**
* 网元端OAM配置文件读取 * 网元端OAM配置文件读取
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function getOAMFile(coreUid: string, neUid: string) { export function getOAMFile(neUid: string) {
return request({ return request({
url: '/ne/info/file/oam', url: '/ne/info/file/oam',
method: 'GET', method: 'GET',
params: { coreUid, neUid }, params: { neUid },
}); });
} }
/** /**
* 网元端配置文件写入 * 网元端配置文件写入
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @param content 用json对象 * @param content 用json对象
* @param sync 同步到网元 * @param sync 同步到网元
@@ -73,7 +69,7 @@ export function getPara5GFilee() {
/** /**
* 网元端公共配置文件写入 * 网元端公共配置文件写入
* @param content txt内容为字符串 其他文件格式都用json对象 * @param content txt内容为字符串 其他文件格式都用json对象
* @param syncNe 同步到网元端 coreUid@ neUid * @param syncNe 同步到网元端 neUid
* @returns object * @returns object
*/ */
export function savePara5GFile(data: Record<string, any>) { export function savePara5GFile(data: Record<string, any>) {
@@ -87,7 +83,7 @@ export function savePara5GFile(data: Record<string, any>) {
/** /**
* 网元服务操作 * 网元服务操作
* @param data 对象 {coreUid, neUid, action} * @param data 对象 {neUid, action}
* @returns object * @returns object
*/ */
export function serviceNeAction(data: Record<string, any>) { export function serviceNeAction(data: Record<string, any>) {

View File

@@ -68,11 +68,10 @@ export function delNeConfigData(params: Record<string, any>) {
/** /**
* 从参数配置PCF中获取对应信息提供给PCF用户策略输入框 * 从参数配置PCF中获取对应信息提供给PCF用户策略输入框
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction} * @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction}
*/ */
export async function getPCFRule(coreUid: string, neUid: string) { export async function getPCFRule(neUid: string) {
const paramNameArr = [ const paramNameArr = [
'pccRules', 'pccRules',
'sessionRules', 'sessionRules',
@@ -85,7 +84,7 @@ export async function getPCFRule(coreUid: string, neUid: string) {
reqArr.push( reqArr.push(
request({ request({
url: `/ne/config/data`, url: `/ne/config/data`,
params: { neType: 'PCF', coreUid, neUid, paramName }, params: { neType: 'PCF', neUid, paramName },
method: 'GET', method: 'GET',
}) })
); );

View File

@@ -21,11 +21,11 @@ export function listNeInfo(query: Record<string, any>) {
* @param infoId 信息ID * @param infoId 信息ID
* @returns object * @returns object
*/ */
export function getNeInfo(coreUid: string, id: string | number) { export function getNeInfo(id: string | number) {
return request({ return request({
url: `/ne/info`, url: `/ne/info`,
method: 'GET', method: 'GET',
params: { coreUid, id }, params: { id },
}); });
} }
@@ -61,7 +61,7 @@ export function updateNeInfo(data: Record<string, any>) {
/** /**
* 网元信息删除 * 网元信息删除
* @param query 查询参数 coreUid, neUid id * @param query 查询参数 id
* @returns object * @returns object
*/ */
export function delNeInfo(query: Record<string, any>) { export function delNeInfo(query: Record<string, any>) {
@@ -75,7 +75,7 @@ export function delNeInfo(query: Record<string, any>) {
/** /**
* 查询网元列表全部无分页 * 查询网元列表全部无分页
* @param query 查询参数 coreUid, neUid bandStatus bandHost * @param query 查询参数 coreId, neUid bandStatus bandHost
* @returns object * @returns object
*/ */
export function listAllNeInfo(query: Record<string, any>) { export function listAllNeInfo(query: Record<string, any>) {
@@ -86,3 +86,31 @@ export function listAllNeInfo(query: Record<string, any>) {
timeout: 60_000, timeout: 60_000,
}); });
} }
/**
* 网元授权激活授权申请码
* @param neType 网元类型
* @param neId 网元id
* @returns object
*/
export function codeNeLicense(neUid: string) {
return request({
url: `/ne/info/license/code`,
method: 'GET',
params: { neUid },
});
}
/**
* 网元授权激活授权文件替换
* @param data 网元对象 {"neUid": "", "licensePath": "", "reload": true}
* @returns object
*/
export function updateNeLicense(data: Record<string, any>) {
return request({
url: `/ne/info/license/update`,
method: 'POST',
data: data,
timeout: 180_000,
});
}

View File

@@ -1,84 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询网元授权列表
* @param query 查询参数
* @returns object
*/
export function listNeLicense(query: Record<string, any>) {
return request({
url: '/ne/license/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* 查询网元授权详细
* @param licenseId 信息ID
* @returns object
*/
export function getNeLicense(coreUid: string, id: string | number) {
return request({
url: `/ne/license`,
method: 'GET',
params: { coreUid, id },
});
}
/**
* 网元neType和neID查询
* @param neType 网元类型
* @param neUid 网元ID
* @returns object
*/
export function getNeLicenseByNF(coreUid: string, neUid: string) {
return request({
url: `/ne/license/nf`,
method: 'GET',
params: { coreUid, neUid },
});
}
/**
* 网元授权激活授权申请码
* @param neType 网元类型
* @param neId 网元id
* @returns object
*/
export function codeNeLicense(coreUid: string, neUid: string) {
return request({
url: `/ne/license/code`,
method: 'GET',
params: { coreUid, neUid },
});
}
/**
* 网元授权激活授权文件替换
* @param data 网元对象 {"neType": "", "neId": "", "licensePath": "", "reload": true}
* @returns object
*/
export function changeNeLicense(data: Record<string, any>) {
return request({
url: `/ne/license/change`,
method: 'POST',
data: data,
timeout: 180_000,
});
}
/**
* 网元授权激活状态
* @param coreUid 核心uid
* @param neUid 网元uid
* @returns object
*/
export function stateNeLicense(coreUid: string, neUid: string) {
return request({
url: `/ne/license/state`,
method: 'GET',
params: { coreUid, neUid },
});
}

View File

@@ -44,7 +44,7 @@ export function exportAMFDataUE(query: Record<string, any>) {
/** /**
* AMF-接入基站信息列表 * AMF-接入基站信息列表
* @param query 查询参数 coreUid=001&neUid=001&id=1 * @param query 查询参数 neUid=001&id=1
* @returns object * @returns object
*/ */
export function listAMFNblist(query: Record<string, any>) { export function listAMFNblist(query: Record<string, any>) {
@@ -58,7 +58,7 @@ export function listAMFNblist(query: Record<string, any>) {
/** /**
* AMF-接入基站状态信息列表 * AMF-接入基站状态信息列表
* @param query 查询参数 coreUid=001&neUid=001&state=1 * @param query 查询参数 neUid=001&state=1
* @returns object * @returns object
*/ */
export function listAMFNbStatelist(query: Record<string, any>) { export function listAMFNbStatelist(query: Record<string, any>) {
@@ -76,18 +76,13 @@ export function listAMFNbStatelist(query: Record<string, any>) {
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" } * @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object * @returns object
*/ */
export function addAMFNbState( export function addAMFNbState(neUid: string, data: Record<string, any>) {
coreUid: string,
neUid: string,
data: Record<string, any>
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'POST', method: 'POST',
data: { data: {
neType: 'AMF', neType: 'AMF',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'gnbList', paramName: 'gnbList',
paramData: data, paramData: data,
loc: `${data.index}`, loc: `${data.index}`,
@@ -97,23 +92,17 @@ export function addAMFNbState(
/** /**
* AMF-接入基站状态信息修改 * AMF-接入基站状态信息修改
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" } * @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object * @returns object
*/ */
export function editAMFNbState( export function editAMFNbState(neUid: string, data: Record<string, any>) {
coreUid: string,
neUid: string,
data: Record<string, any>
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'PUT', method: 'PUT',
data: { data: {
neType: 'AMF', neType: 'AMF',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'gnbList', paramName: 'gnbList',
paramData: data, paramData: data,
loc: `${data.index}`, loc: `${data.index}`,
@@ -123,23 +112,17 @@ export function editAMFNbState(
/** /**
* AMF-接入基站状态信息删除 * AMF-接入基站状态信息删除
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @param index 数据index * @param index 数据index
* @returns object * @returns object
*/ */
export function delAMFNbState( export function delAMFNbState(neUid: string, index: string | number) {
coreUid: string,
neUid: string,
index: string | number
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'DELETE', method: 'DELETE',
params: { params: {
neType: 'AMF', neType: 'AMF',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'gnbList', paramName: 'gnbList',
loc: `${index}`, loc: `${index}`,
}, },

View File

@@ -47,17 +47,17 @@ export function exportIMSDataCDR(query: Record<string, any>) {
* @param query 查询参数 * @param query 查询参数
* @returns object * @returns object
*/ */
export function listIMSSessionNum(coreUid: string, neUid: string) { export function listIMSSessionNum(neUid: string) {
return request({ return request({
url: '/nf/ims/session/num', url: '/nf/ims/session/num',
method: 'GET', method: 'GET',
params: { coreUid, neUid }, params: { neUid },
}); });
} }
/** /**
* IMS-在线会话用户列表信息 * IMS-在线会话用户列表信息
* @param query 查询参数 {coreUid, neUid, imsi, msisdn} * @param query 查询参数 { neUid, imsi, msisdn}
* @returns objectv * @returns objectv
*/ */
export function listIMSSessionList(query: Record<string, any>) { export function listIMSSessionList(query: Record<string, any>) {

View File

@@ -72,23 +72,17 @@ export function listMMENbStatelist(query: Record<string, any>) {
/** /**
* MME-接入基站状态信息新增 * MME-接入基站状态信息新增
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" } * @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object * @returns object
*/ */
export function addMMENbState( export function addMMENbState(neUid: string, data: Record<string, any>) {
coreUid: string,
neUid: string,
data: Record<string, any>
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'POST', method: 'POST',
data: { data: {
neType: 'MME', neType: 'MME',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'enbList', paramName: 'enbList',
paramData: data, paramData: data,
loc: `${data.index}`, loc: `${data.index}`,
@@ -98,23 +92,17 @@ export function addMMENbState(
/** /**
* MME-接入基站状态信息修改 * MME-接入基站状态信息修改
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" } * @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object * @returns object
*/ */
export function editMMENbState( export function editMMENbState(neUid: string, data: Record<string, any>) {
coreUid: string,
neUid: string,
data: Record<string, any>
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'PUT', method: 'PUT',
data: { data: {
neType: 'MME', neType: 'MME',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'enbList', paramName: 'enbList',
paramData: data, paramData: data,
loc: `${data.index}`, loc: `${data.index}`,
@@ -124,23 +112,17 @@ export function editMMENbState(
/** /**
* MME-接入基站状态信息删除 * MME-接入基站状态信息删除
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @param index 数据index * @param index 数据index
* @returns object * @returns object
*/ */
export function delMMENbState( export function delMMENbState(neUid: string, index: string | number) {
coreUid: string,
neUid: string,
index: string | number
) {
return request({ return request({
url: `/ne/config/data`, url: `/ne/config/data`,
method: 'DELETE', method: 'DELETE',
params: { params: {
neType: 'MME', neType: 'MME',
neUid: neUid, neUid: neUid,
coreUid: coreUid,
paramName: 'enbList', paramName: 'enbList',
loc: `${index}`, loc: `${index}`,
}, },

View File

@@ -47,17 +47,17 @@ export function exportSMFDataCDR(query: Record<string, any>) {
* @param query 查询参数 * @param query 查询参数
* @returns object * @returns object
*/ */
export function listSMFSubNum(coreUid: string, neUid: string) { export function listSMFSubNum(neUid: string) {
return request({ return request({
url: '/nf/smf/sub/num', url: '/nf/smf/sub/num',
method: 'GET', method: 'GET',
params: { coreUid, neUid }, params: { neUid },
}); });
} }
/** /**
* SMF-在线订阅用户列表信息 * SMF-在线订阅用户列表信息
* @param query 查询参数 {coreUid, neUid, pageNum, imsi, msisdn, upstate} * @param query 查询参数 { neUid, pageNum, imsi, msisdn, upstate}
* @returns object * @returns object
*/ */
export function listSMFSubList(query: Record<string, any>) { export function listSMFSubList(query: Record<string, any>) {

View File

@@ -2,15 +2,14 @@ import { request } from '@/plugins/http-fetch';
/** /**
* UDM鉴权用户重载数据 * UDM鉴权用户重载数据
* @param coreUid 核心网标识
* @param neUid 网元标识 * @param neUid 网元标识
* @returns object * @returns object
*/ */
export function resetUDMAuth(coreUid: string, neUid: string) { export function resetUDMAuth(neUid: string) {
return request({ return request({
url: `/nf/udm/auth/reset`, url: `/nf/udm/auth/reset`,
method: 'PUT', method: 'PUT',
params: { coreUid, neUid }, params: { neUid },
timeout: 180_000, timeout: 180_000,
}); });
} }

View File

@@ -2,15 +2,14 @@ import { request } from '@/plugins/http-fetch';
/** /**
* UDM签约用户重载数据 * UDM签约用户重载数据
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function resetUDMSub(coreUid: string, neUid: string) { export function resetUDMSub(neUid: string) {
return request({ return request({
url: `/nf/udm/sub/reset`, url: `/nf/udm/sub/reset`,
method: 'PUT', method: 'PUT',
params: { coreUid, neUid }, params: { neUid },
timeout: 180_000, timeout: 180_000,
}); });
} }

View File

@@ -2,15 +2,14 @@ import { request } from '@/plugins/http-fetch';
/** /**
* UDMVoIP用户重载数据 * UDMVoIP用户重载数据
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function resetUDMVoIP(coreUid: string, neUid: string) { export function resetUDMVoIP(neUid: string) {
return request({ return request({
url: `/nf/udm/voip/reset`, url: `/nf/udm/voip/reset`,
method: 'PUT', method: 'PUT',
params: { coreUid, neUid }, params: { neUid },
timeout: 180_000, timeout: 180_000,
}); });
} }

View File

@@ -2,15 +2,14 @@ import { request } from '@/plugins/http-fetch';
/** /**
* UDMVolteIMS用户重载数据 * UDMVolteIMS用户重载数据
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @returns object * @returns object
*/ */
export function resetUDMVolteIMS(coreUid: string, neUid: string) { export function resetUDMVolteIMS(neUid: string) {
return request({ return request({
url: `/nf/udm/volte-ims/reset`, url: `/nf/udm/volte-ims/reset`,
method: 'PUT', method: 'PUT',
params: { coreUid, neUid }, params: { neUid },
timeout: 180_000, timeout: 180_000,
}); });
} }
@@ -60,7 +59,6 @@ export function addUDMVolteIMS(data: Record<string, any>) {
/** /**
* UDMVolteIMS用户删除 * UDMVolteIMS用户删除
* @param coreUid 核心网ID
* @param neUid 网元ID * @param neUid 网元ID
* @param imsi IMSI * @param imsi IMSI
* @param msisdn MSISDN * @param msisdn MSISDN

View File

@@ -278,7 +278,6 @@ export function transferStaticFile(data: Record<string, any>) {
export async function uploadFileToNE( export async function uploadFileToNE(
neType: string, neType: string,
neuid: string, neuid: string,
coreUid: string,
fileData: File, fileData: File,
chunkSize: number = 1 chunkSize: number = 1
) { ) {
@@ -291,7 +290,6 @@ export async function uploadFileToNE(
uploadPath: uploadChunkRes.data.filePath, uploadPath: uploadChunkRes.data.filePath,
neType, neType,
neuid, neuid,
coreUid,
delTemp: true, delTemp: true,
}, },
timeout: 60_000, timeout: 60_000,

View File

@@ -1,12 +1,11 @@
import { request } from '@/plugins/http-fetch'; import { request } from '@/plugins/http-fetch';
// 更新网元配置重新载入 // 更新网元配置重新载入
export function updateNeConfigReload(coreUid: string, neUid: string) { export function updateNeConfigReload(neUid: string) {
return request({ return request({
url: '/tool/mml/command', url: '/tool/mml/command',
method: 'POST', method: 'POST',
data: { data: {
coreUid: coreUid,
neUid: neUid, neUid: neUid,
type: 'General', type: 'General',
command: ['reload'], command: ['reload'],

View File

@@ -20,11 +20,11 @@ export async function listTraceTask(query: Record<string, any>) {
* @param id 网元ID * @param id 网元ID
* @returns object * @returns object
*/ */
export async function getTraceTask(coreUid: string, id: string | number) { export async function getTraceTask(id: string | number) {
return request({ return request({
url: `/trace/task`, url: `/trace/task`,
method: 'GET', method: 'GET',
params: { coreUid, id }, params: { id },
}); });
} }
@@ -59,11 +59,11 @@ export function updateTraceTask(data: Record<string, any>) {
* @param ids ID多个逗号分隔 * @param ids ID多个逗号分隔
* @returns object * @returns object
*/ */
export async function delTraceTask(coreUid: string, id: string | number) { export async function delTraceTask(id: string | number) {
return request({ return request({
url: `/trace/task`, url: `/trace/task`,
method: 'DELETE', method: 'DELETE',
params: { coreUid, id }, params: { id },
}); });
} }

View File

@@ -28,12 +28,6 @@ const props = defineProps({
type: String, type: String,
required: true, required: true,
}, },
/**核心网标识 */
coreUid: {
type: String,
default: '',
required: true,
},
/**窗口单行字符数 */ /**窗口单行字符数 */
cols: { cols: {
type: Number, type: Number,
@@ -118,7 +112,6 @@ function wsOpen(ev: any) {
rows: terminal.value.rows, rows: terminal.value.rows,
neType: props.neType, neType: props.neType,
neUid: props.neUid, neUid: props.neUid,
coreUid: props.coreUid,
id: props.id, id: props.id,
}); });
}); });
@@ -150,7 +143,6 @@ function wsClose(code: number) {
code: code, code: code,
neType: props.neType, neType: props.neType,
neUid: props.neUid, neUid: props.neUid,
coreUid: props.coreUid,
id: props.id, id: props.id,
}); });
} }
@@ -210,14 +202,13 @@ function processMessage(data: string): string {
} }
onMounted(() => { onMounted(() => {
if (props.neType && props.neUid && props.coreUid) { if (props.neType && props.neUid) {
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
url: props.url, url: props.url,
params: { params: {
neType: props.neType, neType: props.neType,
neUid: props.neUid, neUid: props.neUid,
coreUid: props.coreUid,
cols: props.cols, cols: props.cols,
rows: props.rows, rows: props.rows,
}, },

View File

@@ -1,5 +1,35 @@
import { CACHE_SESSION_CORE_UID } from '@/constants/cache-keys-constants'; import {
import { sessionGet } from '@/utils/cache-session-utils'; CACHE_SESSION_CORE,
CACHE_SESSION_CORE_UID,
} from '@/constants/cache-keys-constants';
import {
sessionGet,
sessionGetJSON,
sessionSet,
sessionSetJSON,
} from '@/utils/cache-session-utils';
/**
* 核心路网元层由路径
* @returns 核心路网元层路径
*/
export const CORE_NE_PATH = '/core-ne';
/**
* 获取当前coreUid
* @returns coreUid
*/
export function current() {
return sessionGetJSON(CACHE_SESSION_CORE) || {};
}
/**
* 获取当前coreUid
* @returns coreUid
*/
export function changeCurrent(v: Record<string, any>) {
sessionSetJSON(CACHE_SESSION_CORE, v);
}
/** /**
* 获取当前coreUid * 获取当前coreUid
@@ -8,3 +38,11 @@ import { sessionGet } from '@/utils/cache-session-utils';
export function currentCoreUid() { export function currentCoreUid() {
return sessionGet(CACHE_SESSION_CORE_UID) || ''; return sessionGet(CACHE_SESSION_CORE_UID) || '';
} }
/**
* 切换coreUid
* @param coreUid coreUid
*/
export function changeCoreUid(coreUid: string) {
sessionSet(CACHE_SESSION_CORE_UID, coreUid);
}

View File

@@ -553,6 +553,7 @@ export default {
stopTip: 'Are you sure you want to stop the [{ne}] NE Service?', stopTip: 'Are you sure you want to stop the [{ne}] NE Service?',
reload: 'Reload', reload: 'Reload',
reloadTip: 'Confirm that you want to reload the network element configuration information?', reloadTip: 'Confirm that you want to reload the network element configuration information?',
license: 'License Update',
oam: 'OAM', oam: 'OAM',
log: 'Logs', log: 'Logs',
}, },

View File

@@ -553,6 +553,7 @@ export default {
stopTip: '确认要停止【{ne}】网元服务吗?', stopTip: '确认要停止【{ne}】网元服务吗?',
reload: '重载', reload: '重载',
reloadTip: '确认要重载网元配置信息吗?', reloadTip: '确认要重载网元配置信息吗?',
license: '更新许可',
oam: 'OAM', oam: 'OAM',
log: '日志', log: '日志',
}, },

View File

@@ -25,17 +25,20 @@ import useAppStore from '@/store/modules/app';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import useRouterStore from '@/store/modules/router'; import useRouterStore from '@/store/modules/router';
import useTabsStore from '@/store/modules/tabs'; import useTabsStore from '@/store/modules/tabs';
import useI18n from '@/hooks/useI18n';
import useAlarmStore from '@/store/modules/alarm'; import useAlarmStore from '@/store/modules/alarm';
import useCoreStore from '@/store/modules/core';
import useI18n from '@/hooks/useI18n';
import { getServerTime } from '@/api'; import { getServerTime } from '@/api';
import { MENU_PATH_INLINE } from '@/constants/menu-constants'; import { MENU_PATH_INLINE } from '@/constants/menu-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { APP_SERVER_TYPE_M } from '@/constants/app-constants'; import { APP_SERVER_TYPE_M } from '@/constants/app-constants';
import { getTimezoneOffset, parseDateUTCToStr } from '@/utils/date-utils'; import { getTimezoneOffset, parseDateUTCToStr } from '@/utils/date-utils';
import { parseUrlPath } from '@/plugins/file-static-url'; import { parseUrlPath } from '@/plugins/file-static-url';
import { CORE_NE_PATH } from '@/hooks/useCoreUid';
const { proConfig, waterMarkContent } = useLayoutStore(); const { proConfig, waterMarkContent } = useLayoutStore();
const { t, currentLocale } = useI18n(); const { t, currentLocale } = useI18n();
const routerStore = useRouterStore(); const routerStore = useRouterStore();
const coreStore = useCoreStore();
const neStore = useNeStore(); const neStore = useNeStore();
const tabsStore = useTabsStore(); const tabsStore = useTabsStore();
const appStore = useAppStore(); const appStore = useAppStore();
@@ -53,12 +56,29 @@ watch(
router.currentRoute, router.currentRoute,
v => { v => {
const matched = v.matched.concat(); const matched = v.matched.concat();
layoutState.openKeys = matched let openKeys: string[] = [];
.filter(r => r.path !== v.path) let selectedKeys: string[] = [];
.map(r => r.path);
layoutState.selectedKeys = matched // 多核心网切换菜单显示
.filter(r => r.name !== 'Root') if (
.map(r => r.path); appStore.serverType === APP_SERVER_TYPE_M &&
coreStore.globalDefaultCoreUid !== coreStore.currentCoreUid
) {
openKeys = matched
.filter(r => r.path !== CORE_NE_PATH)
.filter(r => r.path !== v.path)
.map(r => r.path.replace(CORE_NE_PATH, ''));
selectedKeys = matched
.filter(r => r.path !== CORE_NE_PATH)
.map(r => r.path.replace(CORE_NE_PATH, ''));
} else {
openKeys = matched.filter(r => r.path !== v.path).map(r => r.path);
selectedKeys = matched.filter(r => r.name !== 'Root').map(r => r.path);
}
layoutState.openKeys = openKeys;
layoutState.selectedKeys = selectedKeys;
// 路由地址含有内嵌地址标识又是隐藏菜单需要处理打开高亮菜单栏 // 路由地址含有内嵌地址标识又是隐藏菜单需要处理打开高亮菜单栏
if (v.path.includes(MENU_PATH_INLINE) && v.meta.hideInMenu) { if (v.path.includes(MENU_PATH_INLINE) && v.meta.hideInMenu) {
const idx = v.path.lastIndexOf(MENU_PATH_INLINE); const idx = v.path.lastIndexOf(MENU_PATH_INLINE);
@@ -73,17 +93,36 @@ watch(
const menuData = computed(() => { const menuData = computed(() => {
const rootRoute = router.getRoutes().find(r => r.name === 'Root'); const rootRoute = router.getRoutes().find(r => r.name === 'Root');
if (rootRoute) { if (rootRoute) {
const children = routerStore.setRootRouterData(rootRoute.children); const rootRouteChildren = routerStore.setRootRouterData(rootRoute.children);
const buildRouterData = routerStore.buildRouterData; const buildRouterData = routerStore.buildRouterData;
if (buildRouterData.length > 0) { if (buildRouterData.length > 0) {
rootRoute.children = children.concat(buildRouterData); // 多核心网切换菜单显示
if (appStore.serverType === APP_SERVER_TYPE_M) {
const filterRoute = buildRouterData.filter(v => {
if (coreStore.globalDefaultCoreUid === coreStore.currentCoreUid) {
return v.path !== CORE_NE_PATH;
} else {
return v.path === CORE_NE_PATH;
}
});
if (filterRoute.length === 1 && filterRoute[0].children) {
rootRoute.children = rootRouteChildren.concat(
filterRoute[0].children
);
} else {
rootRoute.children = rootRouteChildren.concat(filterRoute);
}
} else {
// 单核心网切换菜单显示
rootRoute.children = rootRouteChildren.concat(buildRouterData);
}
} else { } else {
rootRoute.children = children; rootRoute.children = rootRouteChildren;
} }
} }
const neTypes = neStore.getNeSelectOtions.map(v => v.value); const neTypes = neStore.getNeSelectOtions.map(v => v.value);
let routes = clearMenuItem(router.getRoutes()); let routes = clearMenuItem(router.getRoutes());
routes = routerStore.clearMenuItemByNeList(routes, '12345678', neTypes); routes = routerStore.clearMenuItemByNeList(routes, neTypes);
const { menuData } = getMenuData(routes); const { menuData } = getMenuData(routes);
return menuData; return menuData;
}); });
@@ -309,21 +348,18 @@ onUnmounted(() => {
</template> </template>
<!--插槽-渲染顶部内容区域仅布局side有效--> <!--插槽-渲染顶部内容区域仅布局side有效-->
<template #headerContentRender></template> <template
#headerContentRender
v-if="appStore.serverType === APP_SERVER_TYPE_M"
>
<CoreSelect></CoreSelect>
</template>
<!--插槽-渲染顶部内容右端区域--> <!--插槽-渲染顶部内容右端区域-->
<template #headerContentRightRender> <template #headerContentRightRender>
<HeaderContentRight /> <HeaderContentRight />
</template> </template>
<!--插槽-渲染顶部内容区域仅布局side有效-->
<template
#menuHeaderExtraRender
v-if="useAppStore().serverType === APP_SERVER_TYPE_M"
>
<CoreSelect></CoreSelect>
</template>
<!--插槽-导航标签项--> <!--插槽-导航标签项-->
<template #tabRender="{ width, fixedHeader, headerRender }"> <template #tabRender="{ width, fixedHeader, headerRender }">
<Tabs <Tabs

View File

@@ -1,25 +1,34 @@
<script lang="ts" setup> <script lang="ts" setup>
import useCoreStore from '@/store/modules/core';
import useI18n from '@/hooks/useI18n';
import { ref } from 'vue'; import { ref } from 'vue';
import { useRouter } from 'vue-router';
import useCoreStore from '@/store/modules/core';
import useNeStore from '@/store/modules/ne';
import useI18n from '@/hooks/useI18n';
const coreStore = useCoreStore(); const coreStore = useCoreStore();
const neStore = useNeStore();
const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
/**当前选中 */ /**当前选中 */
const coreValue = ref(coreStore.current?.value || 'Global'); const coreValue = ref(coreStore.currentCoreUid);
/**选择列表数据 */ /**选择列表数据 */
const coreOtions = ref(coreStore.getSelectOtions); const coreOtions = ref(coreStore.getSelectOtions);
/**选择过滤名称 */ /**选择过滤名称 */
const coreName = ref(); const coreName = ref('');
/**选择 */ /**选择 */
function handleSelect(v: any, item: any) { async function handleSelect(v: any, item: any) {
if (v === 'all') { coreValue.value = v;
coreValue.value = 'Global'; if (v === coreStore.globalDefaultCoreUid) {
coreStore.setCurrent(coreStore.globalDefaultSelect);
} else { } else {
coreValue.value = v; coreStore.setCurrent(item);
} }
coreStore.setCurrent(item); await neStore.fnNelistRefresh();
// 切换核心网后,刷新路由
await router.replace({ name: 'Index' }).finally(() => {
// location.replace(location.origin);
});
} }
/**搜索过滤 */ /**搜索过滤 */
@@ -29,43 +38,36 @@ function handleSearchFilter(e: any) {
return item.label.indexOf(label) !== -1; return item.label.indexOf(label) !== -1;
}); });
} }
/**内容挂载DOM */
function getPopupContainer(): any {
return document.querySelector('.ant-pro-sider');
}
</script> </script>
<template> <template>
<a-select <a-select
v-model:value="coreValue" v-model:value="coreValue"
:options="coreOtions" :options="coreOtions"
style="width: 100%" style="width: 200px"
:getPopupContainer="getPopupContainer"
@change="handleSelect" @change="handleSelect"
> >
<template #option="{ label }"> <template #option="{ label }">
<span>{{ label }}</span> <span>{{ label }}</span>
</template> </template>
<template #dropdownRender="{ menuNode: menu }"> <template #dropdownRender="{ menuNode: menu }">
<strong>Core</strong> <strong>核心网</strong>
<a-button <!-- <a-button
type="default" type="default"
:block="true" :block="true"
@click="handleSelect('all', { label: 'Global', value: 'all' })" @click="handleSelect(globalCoreUid(), {})"
> >
<template #icon> <HomeOutlined /> </template> <template #icon> <HomeOutlined /> </template>
Global Global
</a-button> </a-button> -->
<a-input-search <a-input-search
placeholder="Search Core Name" placeholder="Search Core Name"
style="width: 100%; margin: 4px 0" style="width: 100%; margin: 4px 0"
size="small"
v-model:value="coreName" v-model:value="coreName"
@change="handleSearchFilter" @change="handleSearchFilter"
@keydown.enter="handleSearchFilter"
> >
<template #enterButton>
<ReloadOutlined />
</template>
</a-input-search> </a-input-search>
<a-divider style="margin: 4px 0" /> <a-divider style="margin: 4px 0" />
<component :is="menu" /> <component :is="menu" />

View File

@@ -13,6 +13,8 @@ import useAppStore from '@/store/modules/app';
import useRouterStore from '@/store/modules/router'; import useRouterStore from '@/store/modules/router';
import useCoreStore from '@/store/modules/core'; import useCoreStore from '@/store/modules/core';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { APP_SERVER_TYPE_M } from '@/constants/app-constants';
import { CORE_NE_PATH } from '@/hooks/useCoreUid';
// NProgress Configuration // NProgress Configuration
NProgress.configure({ showSpinner: false }); NProgress.configure({ showSpinner: false });
@@ -96,48 +98,66 @@ router.beforeEach(async (to, from, next) => {
// 有Token // 有Token
if (token) { if (token) {
// 防止重复访问登录页面
if (to.path === '/login') { if (to.path === '/login') {
// 防止重复访问登录页面
next({ name: 'Index' }); next({ name: 'Index' });
} else { return;
// 判断当前用户是否有角色信息 }
const user = useUserStore();
if (user.roles && user.roles.length === 0) { // 多核心网菜单跳转判断非网元路径
try { const useCore = useCoreStore();
// 获取核心网列表 if (
await useCoreStore().fnCorelist(); appStore.serverType === APP_SERVER_TYPE_M &&
// 获取网元信息 useCore.currentCoreUid == useCore.globalDefaultCoreUid &&
await useNeStore().fnNelist(); to.path.startsWith(CORE_NE_PATH)
// 获取用户信息 ) {
await user.fnGetInfo(); next({ name: 'NotPermission' });
// 获取路由信息 return;
const accessRoutes = await useRouterStore().generateRoutes(); }
// 根据后台配置生成可访问的路由表
if (accessRoutes && accessRoutes.length !== 0) { // 判断当前用户是否有角色信息
for (const route of accessRoutes) { const useUser = useUserStore();
// 动态添加可访问路由表http开头会异常 const useNe = useNeStore();
if (!validHttp(route.path)) { if (useUser.roles && useUser.roles.length === 0) {
router.addRoute(route); try {
} // 获取核心网列表
await useCore.fnCorelist();
// 获取网元信息
await useNe.fnNelist();
// 获取用户信息
await useUser.fnGetInfo();
// 获取路由信息
const accessRoutes = await useRouterStore().generateRoutes();
// 根据后台配置生成可访问的路由表
if (accessRoutes && accessRoutes.length !== 0) {
for (const route of accessRoutes) {
// 动态添加可访问路由表http开头会异常
if (!validHttp(route.path)) {
router.addRoute(route);
} }
} }
// 刷新替换原先路由确保addRoutes已完成
next({ ...to, replace: true });
} catch (error: any) {
console.error(`[${to.path}]: ${error.message}`);
await user.fnLogOut();
next({ name: 'Login' });
} }
} else if ( // 刷新替换原先路由确保addRoutes已完成
to.meta.neType && next({ ...to, replace: true });
to.meta.neType.length > 0 && } catch (error: any) {
!useNeStore().fnHasNe(to.meta.neType) console.error(`[${to.path}]: ${error.message}`);
) { await useUser.fnLogOut();
next({ name: 'NotPermission' }); next({ name: 'Login' });
} else {
next();
} }
return;
} }
// 网元是否存在权限判断
if (
Array.isArray(to.meta.neType) &&
to.meta.neType.length > 0 &&
!useNe.fnHasNe(to.meta.neType)
) {
next({ name: 'NotPermission' });
return;
}
next();
} }
}); });

View File

@@ -1,6 +1,5 @@
import { getActiveAlarmTotal } from '@/api/faultManage/actAlarm'; import { getActiveAlarmTotal } from '@/api/faultManage/actAlarm';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
/**告警数据信息类型 */ /**告警数据信息类型 */
@@ -16,8 +15,8 @@ const useAlarmStore = defineStore('alarm', {
getters: {}, getters: {},
actions: { actions: {
// 获取活动告警数 // 获取活动告警数
async fnGetActiveAlarmInfo() { async fnGetActiveAlarmInfo() {
const res = await getActiveAlarmTotal(currentCoreUid()); const res = await getActiveAlarmTotal();
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
this.activeAlarmTotal = res.data; this.activeAlarmTotal = res.data;
} }

View File

@@ -5,30 +5,41 @@ import {
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import { listAllCoreInfo } from '@/api/core/coreInfo'; import { listAllCoreInfo } from '@/api/core/coreInfo';
import { import {
sessionGetJSON, changeCoreUid,
sessionSet, changeCurrent,
sessionSetJSON, current,
} from '@/utils/cache-session-utils'; currentCoreUid,
import { } from '@/hooks/useCoreUid';
CACHE_SESSION_CORE,
CACHE_SESSION_CORE_UID,
} from '@/constants/cache-keys-constants';
/**核心网信息类型 */ /**核心网信息类型 */
type Core = { type Core = {
/**核心网列表 */ /**核心网列表 */
coreList: Record<string, any>[]; coreList: Record<string, any>[];
/**当前选择 */ /**当前选择 */
current: Record<string, any>; currentSelect: Record<string, any>;
/**当前核心网标识 */
currentCoreUid: string;
/**选择器单级父类型 */ /**选择器单级父类型 */
coreSelectOtions: Record<string, any>[]; coreSelectOtions: Record<string, any>[];
/**全局选择 */
globalDefaultSelect: Record<string, any>;
/**默认核心网标识 */
globalDefaultCoreUid: string;
}; };
const useCoreStore = defineStore('core', { const useCoreStore = defineStore('core', {
state: (): Core => ({ state: (): Core => ({
coreList: [], coreList: [],
current: sessionGetJSON(CACHE_SESSION_CORE), currentSelect: current(),
currentCoreUid: currentCoreUid(),
coreSelectOtions: [], coreSelectOtions: [],
globalDefaultSelect: {
label: 'Global',
value: 'YYMMDDHH',
},
globalDefaultCoreUid: 'YYMMDDHH',
}), }),
getters: { getters: {
getSelectOtions(): Record<string, any>[] { getSelectOtions(): Record<string, any>[] {
@@ -37,9 +48,11 @@ const useCoreStore = defineStore('core', {
}, },
actions: { actions: {
setCurrent(v: Record<string, any> = {}) { setCurrent(v: Record<string, any> = {}) {
this.current = v; this.currentSelect = v;
sessionSetJSON(CACHE_SESSION_CORE, v); this.currentCoreUid = v.value;
sessionSet(CACHE_SESSION_CORE_UID, v.value); // 存储
changeCurrent(v);
changeCoreUid(v.value);
}, },
// 刷新核心网列表 // 刷新核心网列表
async fnCorelistRefresh() { async fnCorelistRefresh() {
@@ -70,11 +83,8 @@ const useCoreStore = defineStore('core', {
}); });
} }
// 当前未选择时 // 当前未选择时
if (!this.current) { if (!this.currentSelect) {
this.setCurrent({ this.setCurrent(this.globalDefaultSelect);
label: 'Global',
value: 'YYMMDDHH',
});
} }
return res; return res;
}, },

View File

@@ -5,7 +5,6 @@ import {
} from '@/constants/result-constants'; } from '@/constants/result-constants';
import { listAllNeInfo } from '@/api/ne/neInfo'; import { listAllNeInfo } from '@/api/ne/neInfo';
import { parseDataToOptions } from '@/utils/parse-tree-utils'; import { parseDataToOptions } from '@/utils/parse-tree-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
/**网元信息类型 */ /**网元信息类型 */
type Ne = { type Ne = {
@@ -66,7 +65,6 @@ const useNeStore = defineStore('ne', {
}; };
} }
const res = await listAllNeInfo({ const res = await listAllNeInfo({
coreUid: currentCoreUid(),
bandStatus: false, bandStatus: false,
bandHost: false, bandHost: false,
}); });

View File

@@ -16,11 +16,6 @@ import {
MENU_COMPONENT_LAYOUT_LINK, MENU_COMPONENT_LAYOUT_LINK,
} from '@/constants/menu-constants'; } from '@/constants/menu-constants';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useAppStore from '@/store/modules/app';
import {
APP_SERVER_TYPE_M,
APP_SERVER_TYPE_O,
} from '@/constants/app-constants';
/**路由构建参数类型 */ /**路由构建参数类型 */
type RouterStore = { type RouterStore = {
@@ -63,42 +58,20 @@ const useRouterStore = defineStore('router', {
/** /**
* 根据网元类型过滤菜单 * 根据网元类型过滤菜单
* @param routes 经过clearMenuItem(router.getRoutes())处理 * @param routes 经过clearMenuItem(router.getRoutes())处理
* @param coreUid 核心网元uid
* @param neTypes 网元类型 * @param neTypes 网元类型
* @returns 过滤后的菜单 * @returns 过滤后的菜单
*/ */
clearMenuItemByNeList( clearMenuItemByNeList(
routes: RouteRecord[] | RouteRecordRaw[], routes: RouteRecord[] | RouteRecordRaw[],
coreUid: string,
neTypes: string[] neTypes: string[]
): RouteRecordRaw[] { ): RouteRecordRaw[] {
return routes return routes
.map((item: RouteRecord | RouteRecordRaw) => { .map((item: RouteRecord | RouteRecordRaw) => {
const finalItem = { ...item }; const finalItem = { ...item };
// 过滤核心网菜单
switch (useAppStore().serverType) {
case APP_SERVER_TYPE_O:
break;
case APP_SERVER_TYPE_M:
// 过滤核心网菜单
if (coreUid.length < 8 && finalItem.meta?.core == true) {
// 全局 网元菜单
return null;
}
if (coreUid.length == 8 && finalItem.meta?.core == false) {
// 核心网 非网元菜单
return null;
}
break;
}
// 过滤网元类型 // 过滤网元类型
if ( let metaNeType: string[] = finalItem.meta?.neType || [];
Array.isArray(finalItem.meta?.neType) && if (Array.isArray(metaNeType) && metaNeType.length > 0) {
finalItem.meta?.neType.length > 0
) {
let metaNeType: string[] = finalItem.meta.neType;
let match = false; // 匹配 let match = false; // 匹配
for (const netype of metaNeType) { for (const netype of metaNeType) {
if (netype.indexOf('+') > -1) { if (netype.indexOf('+') > -1) {
@@ -121,7 +94,6 @@ const useRouterStore = defineStore('router', {
if (finalItem.children && finalItem.children.length > 0) { if (finalItem.children && finalItem.children.length > 0) {
const children = this.clearMenuItemByNeList( const children = this.clearMenuItemByNeList(
finalItem.children, finalItem.children,
coreUid,
neTypes neTypes
); );
// 如果子菜单都被过滤掉了,就不显示 // 如果子菜单都被过滤掉了,就不显示

View File

@@ -26,7 +26,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils'; import { readLoalXlsx } from '@/utils/execl-utils';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t, currentLocale } = useI18n(); const { t, currentLocale } = useI18n();
@@ -71,10 +70,8 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
alarmStatus: 'Active', alarmStatus: 'Active',
sortField: 'event_time', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**告警设备类型 */ /**告警设备类型 */
neType: '', neType: '',
@@ -219,6 +216,12 @@ let tableColumns: ColumnsType = [
align: 'left', align: 'left',
width: 100, width: 100,
}, },
{
title: t('views.ne.common.neName'),
dataIndex: 'neName',
align: 'left',
width: 150,
},
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'id', key: 'id',
@@ -442,7 +445,6 @@ function fnModalOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
ackAlarm({ ackAlarm({
id: from.id, id: from.id,
coreUid: from.coreUid,
ackState: true, ackState: true,
}) })
.then(res => { .then(res => {
@@ -502,12 +504,10 @@ function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
tableState.selectedRows = rows.map(item => { tableState.selectedRows = rows.map(item => {
return { return {
id: item.id, id: item.id,
coreUid: item.coreUid,
neUid: item.neUid, neUid: item.neUid,
neType: item.neType, neType: item.neType,
}; };
}); });
console.log( tableState.selectedRows)
} }
/** /**
@@ -524,7 +524,6 @@ function fnCancelConfirm() {
reqArr.push( reqArr.push(
ackAlarm({ ackAlarm({
id: item.id, id: item.id,
coreUid: item.coreUid,
ackState: false, ackState: false,
}) })
); );
@@ -586,9 +585,8 @@ function fnClear() {
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
let reqArr: any = []; let reqArr: any = [];
tableState.selectedRows.forEach(item => { const ids = tableState.selectedRowKeys.join(',');
reqArr.push(clearAlarm(item.id, item.coreUid)); reqArr.push(clearAlarm(ids));
});
Promise.all(reqArr) Promise.all(reqArr)
.then(resArr => { .then(resArr => {
if (resArr.every((item: any) => item.code === RESULT_CODE_SUCCESS)) { if (resArr.every((item: any) => item.code === RESULT_CODE_SUCCESS)) {

View File

@@ -15,7 +15,6 @@ import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -42,9 +41,7 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */ sortField: 'createdTime',
coreUid: currentCoreUid(),
sortField: 'event_time',
sortOrder: 'desc', sortOrder: 'desc',
/**告警设备类型 */ /**告警设备类型 */
neType: '', neType: '',

View File

@@ -10,8 +10,7 @@ import { listForwarding } from '@/api/logManage/forwarding';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -48,12 +47,10 @@ let rangePickerPresets = ref([
]); ]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: '', neType: '',
sortField: 'event_time', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**开始时间 */ /**开始时间 */
beginTime: undefined as undefined | number, beginTime: undefined as undefined | number,
@@ -192,7 +189,7 @@ let tableColumns: ColumnsType = reactive([
}, },
{ {
title: t('views.logManage.forwarding.logTime'), title: t('views.logManage.forwarding.logTime'),
dataIndex: 'createdAt', dataIndex: 'eventTime',
align: 'left', align: 'left',
customRender(opt) { customRender(opt) {
if (!opt.value) return ''; if (!opt.value) return '';

View File

@@ -20,7 +20,6 @@ import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -62,10 +61,8 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
alarmStatus: 'Clear', alarmStatus: 'Clear',
sortField: 'event_time', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**告警设备类型 */ /**告警设备类型 */
neType: '', neType: '',

View File

@@ -11,7 +11,6 @@ import useNeStore from '@/store/modules/ne';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -49,15 +48,13 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: '', neType: '',
/**告警状态 */ /**告警状态 */
alarmStatus: undefined, alarmStatus: undefined,
/**告警类型 */ /**告警类型 */
origSeverity: undefined, origSeverity: undefined,
sortField: 'event_time', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**开始时间 */ /**开始时间 */
beginTime: undefined as undefined | number, beginTime: undefined as undefined | number,
@@ -178,7 +175,7 @@ let tableColumns: ColumnsType = [
}, },
{ {
title: t('views.logManage.alarm.logTime'), title: t('views.logManage.alarm.logTime'),
dataIndex: 'createdAt', dataIndex: 'eventTime',
align: 'left', align: 'left',
width: 200, width: 200,
customRender(opt) { customRender(opt) {

View File

@@ -21,7 +21,6 @@ import { origGet } from '@/api/faultManage/actAlarm';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { useFullscreen } from '@vueuse/core'; import { useFullscreen } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
@@ -206,7 +205,7 @@ async function fetchLatestAlarmsHis() {
async function fetchAlarmData() { async function fetchAlarmData() {
try { try {
loading.value = true; loading.value = true;
const res = await origGet(currentCoreUid()); const res = await origGet('Active');
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
// 重置告警数据 // 重置告警数据
alarmData.critical = 0; alarmData.critical = 0;
@@ -323,10 +322,10 @@ onMounted(() => {
fetchAlarmTrend(); // 定时刷新趋势数据 fetchAlarmTrend(); // 定时刷新趋势数据
// 设置定时刷新 - 每10秒刷新一次 // 设置定时刷新 - 每10秒刷新一次
refreshTimer = setInterval(() => { // refreshTimer = setInterval(() => {
fetchAlarmData(); // fetchAlarmData();
fetchAlarmTrend(); // 定时刷新趋势数据 // fetchAlarmTrend(); // 定时刷新趋势数据
}, 10000); // }, 10000);
// 初始化告警趋势图 // 初始化告警趋势图
nextTick(() => { nextTick(() => {

View File

@@ -0,0 +1,16 @@
<script setup lang="ts">
import { onMounted } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
onMounted(() => {});
</script>
<template>
<PageContainer>
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<h1>核心网列表</h1>
</a-card>
</PageContainer>
</template>
<style lang="less" scoped></style>

View File

@@ -0,0 +1,16 @@
<script setup lang="ts">
import { onMounted } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
onMounted(() => {});
</script>
<template>
<PageContainer>
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<h1>Overview 核心网 概览</h1>
</a-card>
</PageContainer>
</template>
<style lang="less" scoped></style>

View File

@@ -69,18 +69,6 @@ let tableColumns: ColumnsType = reactive([
align: 'left', align: 'left',
width: 80, width: 80,
}, },
{
title: t('views.logManage.mml.account'),
dataIndex: 'user',
align: 'left',
width: 100,
},
{
title: t('views.logManage.mml.ip'),
dataIndex: 'ip',
align: 'left',
width: 100,
},
{ {
title: t('views.ne.common.neType'), title: t('views.ne.common.neType'),
dataIndex: 'neType', dataIndex: 'neType',
@@ -88,14 +76,14 @@ let tableColumns: ColumnsType = reactive([
width: 100, width: 100,
}, },
{ {
title: t('views.ne.common.neUid'), title: t('views.ne.common.neName'),
dataIndex: 'neUid', dataIndex: 'neName',
align: 'left', align: 'left',
width: 100, width: 100,
}, },
{ {
title: t('views.logManage.mml.logTime'), title: t('views.logManage.mml.logTime'),
dataIndex: 'logTime', dataIndex: 'createTime',
align: 'left', align: 'left',
width: 200, width: 200,
customRender(opt) { customRender(opt) {

View File

@@ -10,7 +10,6 @@ import useI18n from '@/hooks/useI18n';
import { getMMLByNE, sendMML } from '@/api/mmlManage/neOperate'; import { getMMLByNE, sendMML } from '@/api/mmlManage/neOperate';
import { uploadFileToNE } from '@/api/tool/file'; import { uploadFileToNE } from '@/api/tool/file';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface'; import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -180,7 +179,6 @@ function fnSendMML() {
state.from.sendLoading = true; state.from.sendLoading = true;
const [neType, neUid] = state.neType; const [neType, neUid] = state.neType;
sendMML({ sendMML({
coreUid: currentCoreUid(),
neUid: neUid, neUid: neUid,
neType: neType, neType: neType,
type: objectType, type: objectType,
@@ -218,7 +216,7 @@ function fnUpload(up: UploadRequestOption, name: string) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
state.from.uploadLoading = true; state.from.uploadLoading = true;
const [neType, neUid] = state.neType; const [neType, neUid] = state.neType;
uploadFileToNE(neType, neUid, currentCoreUid(), up.file as File, 5) uploadFileToNE(neType, neUid, up.file as File, 5)
.then(res => { .then(res => {
// 文件转存 // 文件转存
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -10,7 +10,6 @@ import useI18n from '@/hooks/useI18n';
import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate'; import { getMMLByOMC, sendMMlByOMC } from '@/api/mmlManage/omcOperate';
import { uploadFileToNE } from '@/api/tool/file'; import { uploadFileToNE } from '@/api/tool/file';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface'; import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
@@ -218,7 +217,7 @@ function fnUpload(up: UploadRequestOption, name: string) {
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
state.from.uploadLoading = true; state.from.uploadLoading = true;
uploadFileToNE('OMC', neUid, currentCoreUid(), up.file as File, 5) uploadFileToNE('OMC', neUid, up.file as File, 5)
.then(res => { .then(res => {
// 文件转存 // 文件转存
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
@@ -521,7 +520,7 @@ onMounted(() => {
if (neOptions.value.length > 0) { if (neOptions.value.length > 0) {
state.neUid = neOptions.value[0].value; state.neUid = neOptions.value[0].value;
} }
// 获取列表数据 // 获取列表数据
fnGetList(); fnGetList();
}); });

View File

@@ -10,7 +10,6 @@ import useI18n from '@/hooks/useI18n';
import { getMMLByUDM, sendMMlByGeneral } from '@/api/mmlManage/neOperate'; import { getMMLByUDM, sendMMlByGeneral } from '@/api/mmlManage/neOperate';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface'; import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { uploadFileToNE } from '@/api/tool/file'; import { uploadFileToNE } from '@/api/tool/file';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
@@ -178,7 +177,7 @@ function fnSendMML() {
// 发送 // 发送
state.from.sendLoading = true; state.from.sendLoading = true;
sendMMlByGeneral(currentCoreUid(), state.neUid, cmdArr) sendMMlByGeneral(state.neUid, cmdArr)
.then(res => { .then(res => {
state.from.sendLoading = false; state.from.sendLoading = false;
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
@@ -218,7 +217,7 @@ function fnUpload(up: UploadRequestOption, name: string) {
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
state.from.uploadLoading = true; state.from.uploadLoading = true;
uploadFileToNE('UDM', neUid, currentCoreUid(), up.file as File, 5) uploadFileToNE('UDM', neUid, up.file as File, 5)
.then(res => { .then(res => {
// 文件转存 // 文件转存
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {

View File

@@ -23,7 +23,6 @@ import { markRaw, onMounted, ref } from 'vue';
import { origGet, top3Sel } from '@/api/faultManage/actAlarm'; import { origGet, top3Sel } from '@/api/faultManage/actAlarm';
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';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
@@ -86,8 +85,7 @@ const alarmTypeTypeTop = ref<any>([
// //
function initPicture() { function initPicture() {
const coreUid = currentCoreUid(); Promise.allSettled([origGet('Active'), top3Sel('Active')])
Promise.allSettled([origGet(coreUid), top3Sel(coreUid)])
.then(resArr => { .then(resArr => {
if (resArr[0].status === 'fulfilled') { if (resArr[0].status === 'fulfilled') {
const res0 = resArr[0].value; const res0 = resArr[0].value;

View File

@@ -15,7 +15,6 @@ import {
notNeNodes, notNeNodes,
} from '../../hooks/useTopology'; } from '../../hooks/useTopology';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
/**图DOM节点实例对象 */ /**图DOM节点实例对象 */
@@ -53,7 +52,7 @@ const graphNodeTooltip = new Tooltip({
${neState.refreshTime ?? '--'} ${neState.refreshTime ?? '--'}
</span></div> </span></div>
<div>========================</div> <div>========================</div>
<div><strong>ID</strong><span>${neState.neUid}</span></div> <div><strong>UID</strong><span>${neState.neUid}</span></div>
<div><strong>${t('views.monitor.topology.name')}</strong><span> <div><strong>${t('views.monitor.topology.name')}</strong><span>
${neState.neName ?? '--'} ${neState.neName ?? '--'}
</span></div> </span></div>
@@ -155,7 +154,6 @@ function fnGraphDataLoad(reload: boolean = false) {
Promise.all([ Promise.all([
getGraphData(graphState.group), getGraphData(graphState.group),
listAllNeInfo({ listAllNeInfo({
coreUid: currentCoreUid(),
bandStatus: false, bandStatus: false,
}), }),
]) ])

View File

@@ -16,8 +16,11 @@ import { CanvasRenderer } from 'echarts/renderers';
import { markRaw } from 'vue'; import { markRaw } from 'vue';
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';
import { upfNeUId, upfFlowData, upfFlowParse } from '../../hooks/useUPFTotalFlow'; import {
import { currentCoreUid } from '@/hooks/useCoreUid'; upfNeUId,
upfFlowData,
upfFlowParse,
} from '../../hooks/useUPFTotalFlow';
const { t } = useI18n(); const { t } = useI18n();
@@ -207,7 +210,6 @@ function fnGetInitData() {
const nowDate = new Date().getTime(); const nowDate = new Date().getTime();
listKPIData({ listKPIData({
coreUid: currentCoreUid(),
neUid: upfNeUId.value, neUid: upfNeUId.value,
neType: 'UPF', neType: 'UPF',
beginTime: nowDate - 5 * 60 * 1000, beginTime: nowDate - 5 * 60 * 1000,

View File

@@ -23,7 +23,6 @@ import {
WS_GROUP_KPI, WS_GROUP_KPI,
WS_GROUP_MME_UE, WS_GROUP_MME_UE,
} from '@/constants/ne-constants'; } from '@/constants/ne-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
/**websocket连接 */ /**websocket连接 */
export default function useWS() { export default function useWS() {
@@ -45,11 +44,10 @@ export default function useWS() {
} }
// 网元状态 // 网元状态
if (requestId && requestId.startsWith('neState')) { if (requestId && requestId.startsWith('neState')) {
const neType = requestId.split('_')[3]; const neType = requestId.split('_')[2];
neStateParse(neType, data); neStateParse(neType, data);
return; return;
} }
const coreUid = currentCoreUid();
// 普通信息 // 普通信息
switch (requestId) { switch (requestId) {
@@ -91,25 +89,25 @@ export default function useWS() {
} }
switch (data.groupId) { switch (data.groupId) {
// kpiEvent 指标UPF // kpiEvent 指标UPF
case `${WS_GROUP_KPI}_${coreUid}_${upfNeUId.value}`: case `${WS_GROUP_KPI}_${upfNeUId.value}`:
if (data.data) { if (data.data) {
upfFlowParse(data.data); upfFlowParse(data.data);
} }
break; break;
// AMF_UE会话事件 // AMF_UE会话事件
case `${WS_GROUP_AMF_UE}_${coreUid}_${eventNeUid.value.AMF}`: case `${WS_GROUP_AMF_UE}_${eventNeUid.value.AMF}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('amf_ue', data.data)); queue.add(() => eventItemParseAndPush('amf_ue', data.data));
} }
break; break;
// MME_UE会话事件 // MME_UE会话事件
case `${WS_GROUP_MME_UE}_${coreUid}_${eventNeUid.value.MME}`: case `${WS_GROUP_MME_UE}_${eventNeUid.value.MME}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('mme_ue', data.data)); queue.add(() => eventItemParseAndPush('mme_ue', data.data));
} }
break; break;
// IMS_CDR会话事件 // IMS_CDR会话事件
case `${WS_GROUP_IMS_CDR}_${coreUid}_${eventNeUid.value.IMS}`: case `${WS_GROUP_IMS_CDR}_${eventNeUid.value.IMS}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('ims_cdr', data.data)); queue.add(() => eventItemParseAndPush('ims_cdr', data.data));
} }
@@ -128,7 +126,6 @@ export default function useWS() {
requestId: `upf_${upfNeUId.value}_${day}`, requestId: `upf_${upfNeUId.value}_${day}`,
type: 'upf_tf', type: 'upf_tf',
data: { data: {
coreUid: currentCoreUid(),
neUid: upfNeUId.value, neUid: upfNeUId.value,
neType: 'UPF', neType: 'UPF',
day: Number(day), day: Number(day),
@@ -143,7 +140,6 @@ export default function useWS() {
requestId: 'amf_1010_001', requestId: 'amf_1010_001',
type: 'amf_ue', type: 'amf_ue',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.AMF, neUid: eventNeUid.value.AMF,
neType: 'AMF', neType: 'AMF',
sortField: 'timestamp', sortField: 'timestamp',
@@ -157,7 +153,6 @@ export default function useWS() {
requestId: 'mme_1011_001', requestId: 'mme_1011_001',
type: 'mme_ue', type: 'mme_ue',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.MME, neUid: eventNeUid.value.MME,
neType: 'MME', neType: 'MME',
sortField: 'timestamp', sortField: 'timestamp',
@@ -171,7 +166,6 @@ export default function useWS() {
requestId: 'ims_1005_001', requestId: 'ims_1005_001',
type: 'ims_cdr', type: 'ims_cdr',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.IMS, neUid: eventNeUid.value.IMS,
neType: 'IMS', neType: 'IMS',
recordType: 'MOC', recordType: 'MOC',
@@ -193,14 +187,11 @@ export default function useWS() {
neStateRequestMap.value = new Map(); neStateRequestMap.value = new Map();
//topologyReset(); //topologyReset();
} }
const coreUid = currentCoreUid();
let subGroupIDArr: string[] = []; let subGroupIDArr: string[] = [];
subGroupIDArr.push(`${WS_GROUP_KPI}_${coreUid}_${upfNeUId.value}`); subGroupIDArr.push(`${WS_GROUP_KPI}_${upfNeUId.value}`);
subGroupIDArr.push(`${WS_GROUP_AMF_UE}_${coreUid}_${eventNeUid.value.AMF}`); subGroupIDArr.push(`${WS_GROUP_AMF_UE}_${eventNeUid.value.AMF}`);
subGroupIDArr.push(`${WS_GROUP_MME_UE}_${coreUid}_${eventNeUid.value.MME}`); subGroupIDArr.push(`${WS_GROUP_MME_UE}_${eventNeUid.value.MME}`);
subGroupIDArr.push( subGroupIDArr.push(`${WS_GROUP_IMS_CDR}_${eventNeUid.value.IMS}`);
`${WS_GROUP_IMS_CDR}_${coreUid}_${eventNeUid.value.IMS}`
);
const options: OptionsType = { const options: OptionsType = {
url: '/ws', url: '/ws',
params: { params: {

View File

@@ -29,7 +29,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { eventNeUid } from './hooks/useUserActivity'; import { eventNeUid } from './hooks/useUserActivity';
const router = useRouter(); const router = useRouter();
@@ -85,17 +84,16 @@ function fnGetNeState() {
// 获取节点状态 // 获取节点状态
for (const node of graphState.data.nodes) { for (const node of graphState.data.nodes) {
if (notNeNodes.includes(node.id)) continue; if (notNeNodes.includes(node.id)) continue;
const { neType, coreUid, neUid } = node.neInfo; const { neType, neUid } = node.neInfo;
if (!neType || !neUid) continue; if (!neType || !neUid) continue;
// 请求标记检查避免重复发送 // 请求标记检查避免重复发送
if (neStateRequestMap.value.get(neType)) continue; if (neStateRequestMap.value.get(neType)) continue;
neStateRequestMap.value.set(neType, true); neStateRequestMap.value.set(neType, true);
wsSend({ wsSend({
requestId: `neState_${coreUid}_${neUid}_${neType}`, requestId: `neState_${neUid}_${neType}`,
type: 'ne_state', type: 'ne_state',
data: { data: {
coreUid: coreUid,
neType: neType, neType: neType,
neUid: neUid, neUid: neUid,
}, },
@@ -109,8 +107,7 @@ async function fnGetSkim() {
// [ // [
// 'UDM', // 'UDM',
// { // {
// request: (coreUid: string, neUid: string) => // request: (neUid: string) => listUDMSub({ neUid, pageNum: 1, pageSize: 1 }),
// listUDMSub({ coreUid, neUid, pageNum: 1, pageSize: 1 }),
// process: (res: any) => // process: (res: any) =>
// res.code === RESULT_CODE_SUCCESS && // res.code === RESULT_CODE_SUCCESS &&
// (skimState.udmSubNum += res.data.total), // (skimState.udmSubNum += res.data.total),
@@ -119,9 +116,9 @@ async function fnGetSkim() {
[ [
'SMF', 'SMF',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.SMF = neUid; eventNeUid.value.SMF = neUid;
return listSMFSubNum(coreUid, neUid); return listSMFSubNum(neUid);
}, },
process: (res: any) => { process: (res: any) => {
if ( if (
@@ -136,9 +133,9 @@ async function fnGetSkim() {
[ [
'IMS', 'IMS',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.IMS = neUid; eventNeUid.value.IMS = neUid;
return listIMSSessionNum(coreUid, neUid); return listIMSSessionNum(neUid);
}, },
process: (res: any) => { process: (res: any) => {
if ( if (
@@ -153,9 +150,9 @@ async function fnGetSkim() {
[ [
'AMF', 'AMF',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.AMF = neUid; eventNeUid.value.AMF = neUid;
return listAMFNblist({ coreUid, neUid }); return listAMFNblist({ neUid });
}, },
process: (res: any) => { process: (res: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
@@ -171,9 +168,9 @@ async function fnGetSkim() {
[ [
'MME', 'MME',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.MME = neUid; eventNeUid.value.MME = neUid;
return listMMENblist({ coreUid, neUid }); return listMMENblist({ neUid });
}, },
process: (res: any) => { process: (res: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
@@ -195,7 +192,7 @@ async function fnGetSkim() {
const handler = neHandlers.get(child.neType); const handler = neHandlers.get(child.neType);
return handler return handler
? { ? {
promise: handler.request(child.coreUid, child.neUid), promise: handler.request(child.neUid),
process: handler.process, process: handler.process,
} }
: null; : null;
@@ -225,7 +222,6 @@ async function fnGetSkim() {
// UDM // UDM
listUDMSub({ listUDMSub({
coreUid: currentCoreUid(),
neUid: udmNeUid.value, neUid: udmNeUid.value,
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,
@@ -295,7 +291,6 @@ let udmOtions = ref<Record<string, any>[]>([]);
function fnSelectUDM(e: any) { function fnSelectUDM(e: any) {
udmNeUid.value = e.key; udmNeUid.value = e.key;
listUDMSub({ listUDMSub({
coreUid: currentCoreUid(),
neUid: e.key, neUid: e.key,
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,

View File

@@ -22,8 +22,7 @@ import { CanvasRenderer } from 'echarts/renderers';
import { markRaw, onMounted, ref } from 'vue'; import { markRaw, onMounted, ref } from 'vue';
import { origGet, top3Sel } from '@/api/faultManage/actAlarm'; import { origGet, top3Sel } from '@/api/faultManage/actAlarm';
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';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
@@ -85,9 +84,8 @@ const alarmTypeTypeTop = ref<any>([
]); ]);
// //
function initPicture() { function initPicture() {
const coreUid = currentCoreUid() Promise.allSettled([origGet('Active'), top3Sel('Active')])
Promise.allSettled([origGet(coreUid), top3Sel(coreUid)])
.then(resArr => { .then(resArr => {
if (resArr[0].status === 'fulfilled') { if (resArr[0].status === 'fulfilled') {
const res0 = resArr[0].value; const res0 = resArr[0].value;

View File

@@ -15,7 +15,6 @@ import {
notNeNodes, notNeNodes,
} from '../../hooks/useTopology'; } from '../../hooks/useTopology';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
/**图DOM节点实例对象 */ /**图DOM节点实例对象 */
@@ -214,7 +213,6 @@ function fnGraphDataLoad(reload: boolean = false) {
Promise.all([ Promise.all([
getGraphData(graphState.group), getGraphData(graphState.group),
listAllNeInfo({ listAllNeInfo({
coreUid: currentCoreUid(),
bandStatus: false, bandStatus: false,
}), }),
]) ])

View File

@@ -21,7 +21,6 @@ import {
upfFlowData, upfFlowData,
upfFlowParse, upfFlowParse,
} from '../../hooks/useUPFTotalFlow'; } from '../../hooks/useUPFTotalFlow';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
@@ -211,7 +210,6 @@ function fnGetInitData() {
const nowDate = new Date().getTime(); const nowDate = new Date().getTime();
listKPIData({ listKPIData({
coreUid: currentCoreUid(),
neUid: upfNeUId.value, neUid: upfNeUId.value,
neType: 'UPF', neType: 'UPF',
beginTime: nowDate - 5 * 60 * 1000, beginTime: nowDate - 5 * 60 * 1000,

View File

@@ -23,7 +23,6 @@ import {
WS_GROUP_MME_UE, WS_GROUP_MME_UE,
WS_GROUP_IMS_CDR, WS_GROUP_IMS_CDR,
} from '@/constants/ne-constants'; } from '@/constants/ne-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
/**websocket连接 */ /**websocket连接 */
export default function useWS() { export default function useWS() {
@@ -50,7 +49,6 @@ export default function useWS() {
neStateParse(neType, data, neUid); neStateParse(neType, data, neUid);
return; return;
} }
const coreUid = currentCoreUid();
// 普通信息 // 普通信息
switch (requestId) { switch (requestId) {
@@ -92,25 +90,25 @@ export default function useWS() {
} }
switch (data.groupId) { switch (data.groupId) {
// kpiEvent 指标UPF // kpiEvent 指标UPF
case `${WS_GROUP_KPI}_${coreUid}_${upfNeUId.value}`: case `${WS_GROUP_KPI}_${upfNeUId.value}`:
if (data.data) { if (data.data) {
upfFlowParse(data.data); upfFlowParse(data.data);
} }
break; break;
// AMF_UE会话事件 // AMF_UE会话事件
case `${WS_GROUP_AMF_UE}_${coreUid}_${eventNeUid.value.AMF}`: case `${WS_GROUP_AMF_UE}_${eventNeUid.value.AMF}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('amf_ue', data.data)); queue.add(() => eventItemParseAndPush('amf_ue', data.data));
} }
break; break;
// MME_UE会话事件 // MME_UE会话事件
case `${WS_GROUP_MME_UE}_${coreUid}_${eventNeUid.value.MME}`: case `${WS_GROUP_MME_UE}_${eventNeUid.value.MME}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('mme_ue', data.data)); queue.add(() => eventItemParseAndPush('mme_ue', data.data));
} }
break; break;
// IMS_CDR会话事件 // IMS_CDR会话事件
case `${WS_GROUP_IMS_CDR}_${coreUid}_${eventNeUid.value.IMS}`: case `${WS_GROUP_IMS_CDR}_${eventNeUid.value.IMS}`:
if (data.data) { if (data.data) {
queue.add(() => eventItemParseAndPush('ims_cdr', data.data)); queue.add(() => eventItemParseAndPush('ims_cdr', data.data));
} }
@@ -130,7 +128,6 @@ export default function useWS() {
requestId: `upf_${upfNeUId.value}_${day}`, requestId: `upf_${upfNeUId.value}_${day}`,
type: 'upf_tf', type: 'upf_tf',
data: { data: {
coreUid: currentCoreUid(),
neUid: upfNeUId.value, neUid: upfNeUId.value,
neType: 'UPF', neType: 'UPF',
day: Number(day), day: Number(day),
@@ -145,7 +142,6 @@ export default function useWS() {
requestId: 'amf_1010_001', requestId: 'amf_1010_001',
type: 'amf_ue', type: 'amf_ue',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.AMF, neUid: eventNeUid.value.AMF,
neType: 'AMF', neType: 'AMF',
sortField: 'timestamp', sortField: 'timestamp',
@@ -159,7 +155,6 @@ export default function useWS() {
requestId: 'mme_1011_001', requestId: 'mme_1011_001',
type: 'mme_ue', type: 'mme_ue',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.MME, neUid: eventNeUid.value.MME,
neType: 'MME', neType: 'MME',
sortField: 'timestamp', sortField: 'timestamp',
@@ -173,7 +168,6 @@ export default function useWS() {
requestId: 'ims_1005_001', requestId: 'ims_1005_001',
type: 'ims_cdr', type: 'ims_cdr',
data: { data: {
coreUid: currentCoreUid(),
neUid: eventNeUid.value.IMS, neUid: eventNeUid.value.IMS,
neType: 'IMS', neType: 'IMS',
recordType: 'MOC', recordType: 'MOC',
@@ -195,14 +189,11 @@ export default function useWS() {
neStateRequestMap.value = new Map(); neStateRequestMap.value = new Map();
//topologyReset(); //topologyReset();
} }
const coreUid = currentCoreUid();
let subGroupIDArr: string[] = []; let subGroupIDArr: string[] = [];
subGroupIDArr.push(`${WS_GROUP_KPI}_${coreUid}_${upfNeUId.value}`); subGroupIDArr.push(`${WS_GROUP_KPI}_${upfNeUId.value}`);
subGroupIDArr.push(`${WS_GROUP_AMF_UE}_${coreUid}_${eventNeUid.value.AMF}`); subGroupIDArr.push(`${WS_GROUP_AMF_UE}_${eventNeUid.value.AMF}`);
subGroupIDArr.push(`${WS_GROUP_MME_UE}_${coreUid}_${eventNeUid.value.MME}`); subGroupIDArr.push(`${WS_GROUP_MME_UE}_${eventNeUid.value.MME}`);
subGroupIDArr.push( subGroupIDArr.push(`${WS_GROUP_IMS_CDR}_${eventNeUid.value.IMS}`);
`${WS_GROUP_IMS_CDR}_${coreUid}_${eventNeUid.value.IMS}`
);
const options: OptionsType = { const options: OptionsType = {
url: '/ws', url: '/ws',
params: { params: {

View File

@@ -28,7 +28,6 @@ import { message } from 'ant-design-vue';
import { listAMFNbStatelist } from '@/api/neDataNf/amf'; import { listAMFNbStatelist } from '@/api/neDataNf/amf';
import { listMMENbStatelist } from '@/api/neDataNf/mme'; import { listMMENbStatelist } from '@/api/neDataNf/mme';
import { eventNeUid } from './hooks/useUserActivity'; import { eventNeUid } from './hooks/useUserActivity';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const router = useRouter(); const router = useRouter();
@@ -97,10 +96,9 @@ function fnGetNeState() {
if (!neInfo.neType || !neInfo.neUid) continue; if (!neInfo.neType || !neInfo.neUid) continue;
wsSend({ wsSend({
requestId: `neState_${neInfo.coreUid}_${neInfo.neUid}_${neInfo.neType}`, requestId: `neState_${neInfo.neUid}`,
type: 'ne_state', type: 'ne_state',
data: { data: {
coreUid: neInfo.coreUid,
neType: neInfo.neType, neType: neInfo.neType,
neUid: neInfo.neUid, neUid: neInfo.neUid,
}, },
@@ -127,9 +125,9 @@ async function fnGetSkim() {
[ [
'SMF', 'SMF',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.SMF = neUid; eventNeUid.value.SMF = neUid;
return listSMFSubNum(coreUid, neUid); return listSMFSubNum(neUid);
}, },
process: (res: any) => { process: (res: any) => {
if ( if (
@@ -144,9 +142,9 @@ async function fnGetSkim() {
[ [
'IMS', 'IMS',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.IMS = neUid; eventNeUid.value.IMS = neUid;
return listIMSSessionNum(coreUid, neUid); return listIMSSessionNum(neUid);
}, },
process: (res: any) => { process: (res: any) => {
if ( if (
@@ -176,18 +174,18 @@ async function fnGetSkim() {
[ [
'AMF', 'AMF',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.AMF = neUid; eventNeUid.value.AMF = neUid;
return listAMFNblist({ coreUid, neUid }); return listAMFNblist({ neUid });
}, },
process: async (res: any, coreUid: any, neUid: any) => { process: async (res: any, neUid: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
skimState.gnbNum += res.data.length; skimState.gnbNum += res.data.length;
skimState.gnbUeNum += res.data.reduce( skimState.gnbUeNum += res.data.reduce(
(sum: number, item: any) => sum + item.ueNum, (sum: number, item: any) => sum + item.ueNum,
0 0
); );
const amfNbRes = await listAMFNbStatelist({ coreUid, neUid }); const amfNbRes = await listAMFNbStatelist({ neUid });
if ( if (
amfNbRes.code === RESULT_CODE_SUCCESS && amfNbRes.code === RESULT_CODE_SUCCESS &&
Array.isArray(amfNbRes.data) Array.isArray(amfNbRes.data)
@@ -217,11 +215,11 @@ async function fnGetSkim() {
[ [
'MME', 'MME',
{ {
request: (coreUid: string, neUid: string) => { request: (neUid: string) => {
eventNeUid.value.MME = neUid; eventNeUid.value.MME = neUid;
return listMMENblist({ coreUid, neUid }); return listMMENblist({ neUid });
}, },
process: async (res: any, coreUid: any, neUid: any) => { process: async (res: any, neUid: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
skimState.enbNum += res.data.length; skimState.enbNum += res.data.length;
skimState.enbUeNum += res.data.reduce( skimState.enbUeNum += res.data.reduce(
@@ -229,7 +227,7 @@ async function fnGetSkim() {
0 0
); );
const mmeNbRes = await listMMENbStatelist({ coreUid, neUid }); const mmeNbRes = await listMMENbStatelist({ neUid });
if ( if (
mmeNbRes.code === RESULT_CODE_SUCCESS && mmeNbRes.code === RESULT_CODE_SUCCESS &&
Array.isArray(mmeNbRes.data) Array.isArray(mmeNbRes.data)
@@ -251,9 +249,8 @@ async function fnGetSkim() {
const handler = neHandlers.get(child.neType); const handler = neHandlers.get(child.neType);
return handler return handler
? { ? {
promise: handler.request(child.coreUid, child.neUid), promise: handler.request(child.neUid),
process: handler.process, process: handler.process,
coreUid: child.coreUid,
neUid: child.neUid, neUid: child.neUid,
} }
: null; : null;
@@ -284,9 +281,9 @@ async function fnGetSkim() {
const processPromises = results.map((result: any, index: any) => { const processPromises = results.map((result: any, index: any) => {
const req = requests[index]; const req = requests[index];
if (result.status === 'fulfilled') { if (result.status === 'fulfilled') {
return req.process(result.value, req.coreUid, req.neUid); return req.process(result.value, req.neUid);
} else { } else {
return req.process(0, req.coreUid, req.neUid); return req.process(0, req.neUid);
} }
}); });
@@ -296,7 +293,6 @@ async function fnGetSkim() {
// UDM // UDM
listUDMSub({ listUDMSub({
coreUid: currentCoreUid(),
neUid: udmNeUid.value, neUid: udmNeUid.value,
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,
@@ -379,7 +375,6 @@ async function fnSelectUDM(e: any) {
udmNeUid.value = e.key; udmNeUid.value = e.key;
try { try {
const res = await listUDMSub({ const res = await listUDMSub({
coreUid: currentCoreUid(),
neUid: udmNeUid.value, neUid: udmNeUid.value,
pageNum: 1, pageNum: 1,
pageSize: 1, pageSize: 1,

View File

@@ -1625,11 +1625,11 @@ export function randerGroph(
${serverState.refreshTime ?? '--'} ${serverState.refreshTime ?? '--'}
</span></div> </span></div>
<div>========================</div> <div>========================</div>
<div><strong>ID</strong><span>${serverState.neId}</span></div> <div><strong>UID</strong><span>${serverState.neUid}</span></div>
<div><strong>${t('views.monitor.topology.name')}</strong><span> <div><strong>${t('views.monitor.topology.name')}</strong><span>
${serverState.neName ?? '--'} ${serverState.neName ?? '--'}
</span></div> </span></div>
<div><strong>IP</strong><span>${serverState.neIP}</span></div> <div><strong>IP</strong><span>${serverState.ipAddr}</span></div>
<div><strong>${t('views.monitor.topology.version')}</strong><span> <div><strong>${t('views.monitor.topology.version')}</strong><span>
${serverState.version ?? '--'} ${serverState.version ?? '--'}
</span></div> </span></div>

View File

@@ -9,7 +9,6 @@ import { message } from 'ant-design-vue/es';
import { randerGroph, switchLayout } from './graph'; import { randerGroph, switchLayout } from './graph';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import { parseBasePath } from '@/plugins/file-static-url'; import { parseBasePath } from '@/plugins/file-static-url';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
/**图DOM节点实例对象 */ /**图DOM节点实例对象 */
@@ -40,7 +39,7 @@ async function fnGetState() {
if (!interval.value) return; if (!interval.value) return;
const ne = node.info; const ne = node.info;
// if (ne.neType === 'OMC') continue; // if (ne.neType === 'OMC') continue;
const result = await stateNeInfo(ne.coreUid, ne.neUid); const result = await stateNeInfo(ne.neUid);
if (result.code === RESULT_CODE_SUCCESS) { if (result.code === RESULT_CODE_SUCCESS) {
ne.serverState = result.data; ne.serverState = result.data;
ne.serverState.refreshTime = parseDateToStr( ne.serverState.refreshTime = parseDateToStr(
@@ -58,7 +57,6 @@ async function fnGetState() {
/**查询全部网元数据列表 */ /**查询全部网元数据列表 */
function fnGetList(refresh: boolean = false) { function fnGetList(refresh: boolean = false) {
listAllNeInfo({ listAllNeInfo({
coreUid: currentCoreUid(),
bandStatus: false, bandStatus: false,
}) })
.then(res => { .then(res => {
@@ -68,7 +66,7 @@ function fnGetList(refresh: boolean = false) {
res.data.length > 0 res.data.length > 0
) { ) {
// 根网管 // 根网管
let rootNodeInfo = { neName: 'OMC_001' }; let rootNodeInfo = { neName: 'OMC_ROOT' };
const nodes = []; const nodes = [];
const edges = []; const edges = [];
for (const item of res.data) { for (const item of res.data) {

View File

@@ -25,7 +25,6 @@ import useNeOptions from '@/views/ne/neInfo/hooks/useNeOptions';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { OptionsType, WS } from '@/plugins/ws-websocket'; import { OptionsType, WS } from '@/plugins/ws-websocket';
import { parseBasePath } from '@/plugins/file-static-url'; import { parseBasePath } from '@/plugins/file-static-url';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const { fnNeRestart, fnNeStop, fnNeLogFile } = useNeOptions(); const { fnNeRestart, fnNeStop, fnNeLogFile } = useNeOptions();
const ws = new WS(); const ws = new WS();
@@ -106,17 +105,17 @@ const graphNodeMenu = new Menu({
}, },
handleMenuClick(target, item) { handleMenuClick(target, item) {
const { neInfo }: any = item?.getModel(); const { neInfo }: any = item?.getModel();
const { neName, neType, neUid, coreUid } = neInfo; const { neName, neType, neUid } = neInfo;
const targetId = target.id; const targetId = target.id;
switch (targetId) { switch (targetId) {
case 'restart': case 'restart':
fnNeRestart({ neName, neType, neUid, coreUid }); fnNeRestart({ neName, neType, neUid });
break; break;
case 'stop': case 'stop':
fnNeStop({ neName, neType, neUid, coreUid }); fnNeStop({ neName, neType, neUid });
break; break;
case 'log': case 'log':
fnNeLogFile({ neType, neUid, coreUid }); fnNeLogFile({ neType, neUid });
break; break;
} }
}, },
@@ -260,7 +259,6 @@ function fnGraphDataLoad(reload: boolean = false) {
Promise.all([ Promise.all([
getGraphData(graphState.group), getGraphData(graphState.group),
listAllNeInfo({ listAllNeInfo({
coreUid: currentCoreUid(),
bandStatus: false, bandStatus: false,
}), }),
]) ])
@@ -371,7 +369,7 @@ function fnGetState() {
// 获取节点状态 // 获取节点状态
for (const node of graphState.data.nodes) { for (const node of graphState.data.nodes) {
if (notNeNodes.includes(node.id)) continue; if (notNeNodes.includes(node.id)) continue;
const { neType, neUid, coreUid } = node.neInfo; const { neType, neUid } = node.neInfo;
if (!neType || !neUid) continue; if (!neType || !neUid) continue;
ws.send({ ws.send({
requestId: `${neType}_${neUid}`, requestId: `${neType}_${neUid}`,
@@ -379,7 +377,6 @@ function fnGetState() {
data: { data: {
neType: neType, neType: neType,
neUid: neUid, neUid: neUid,
coreUid: coreUid,
}, },
}); });
} }

View File

@@ -1,41 +1,36 @@
<script setup lang="ts"> <script setup lang="ts">
import { import { reactive, ref, onMounted, toRaw } from 'vue';
reactive,
ref,
onMounted,
toRaw,
defineAsyncComponent,
nextTick,
} from 'vue';
import { PageContainer } from 'antdv-pro-layout'; import { PageContainer } from 'antdv-pro-layout';
import { Modal, TableColumnsType, message } from 'ant-design-vue/es'; import { ProModal } from 'antdv-pro-modal';
import { message, Form, Modal } 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 useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listNeLicense, stateNeLicense } from '@/api/ne/neLicense'; import useI18n from '@/hooks/useI18n';
import { parseDateToStr } from '@/utils/date-utils'; import {
import { currentCoreUid } from '@/hooks/useCoreUid'; addCoreInfo,
delCoreInfo,
listCoreInfo,
updateCoreInfo,
} from '@/api/core/coreInfo';
const { t } = useI18n(); const { t } = useI18n();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const neStore = useNeStore(); const neStore = useNeStore();
const EditModal = defineAsyncComponent(
() => import('./components/EditModal.vue')
);
/**字典数据-状态 */ /**字典数据 */
let dictStatus = ref<DictType[]>([]); let dict: {
sysNormalDisable: DictType[];
} = reactive({
sysNormalDisable: [],
});
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */ /**参数键名 */
coreUid: currentCoreUid(), name: '',
/**网元类型 */
neType: undefined,
/**序列号 */
serialNum: '',
/**当前页数 */ /**当前页数 */
pageNum: 1, pageNum: 1,
/**每页条数 */ /**每页条数 */
@@ -45,8 +40,7 @@ let queryParams = reactive({
/**查询参数重置 */ /**查询参数重置 */
function fnQueryReset() { function fnQueryReset() {
queryParams = Object.assign(queryParams, { queryParams = Object.assign(queryParams, {
neType: undefined, name: '',
serialNum: '',
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
}); });
@@ -61,19 +55,25 @@ type TabeStateType = {
loading: boolean; loading: boolean;
/**紧凑型 */ /**紧凑型 */
size: SizeType; size: SizeType;
/**搜索栏 */
seached: boolean;
/**记录数据 */ /**记录数据 */
data: any[]; data: object[];
/**勾选记录 */
selectedRowKeys: (string | number)[];
}; };
/**表格状态 */ /**表格状态 */
let tableState: TabeStateType = reactive({ let tableState: TabeStateType = reactive({
loading: false, loading: false,
size: 'middle', size: 'middle',
seached: true,
data: [], data: [],
selectedRowKeys: [],
}); });
/**表格字段列 */ /**表格字段列 */
let tableColumns = ref<TableColumnsType>([ let tableColumns = ref<ColumnsType>([
{ {
title: t('common.rowId'), title: t('common.rowId'),
dataIndex: 'id', dataIndex: 'id',
@@ -81,73 +81,23 @@ let tableColumns = ref<TableColumnsType>([
width: 100, width: 100,
}, },
{ {
title: t('views.ne.common.neType'), title: 'Core UID',
dataIndex: 'neType', dataIndex: 'coreUid',
align: 'left', align: 'left',
width: 100, width: 100,
}, },
{ {
title: t('views.ne.neLicense.status'), title: 'Core Name',
dataIndex: 'status', dataIndex: 'name',
key: 'status',
align: 'left', align: 'left',
width: 120,
},
{
title: t('views.ne.common.serialNum'),
dataIndex: 'serialNum',
align: 'left',
width: 120,
},
{
title: t('views.ne.common.expiryDate'),
dataIndex: 'expiryDate',
align: 'left',
width: 120,
},
{
title: t('views.ne.common.ueNumber'),
dataIndex: 'ueNumber',
align: 'left',
customRender(opt) {
if (['UDM', 'AMF', 'MME'].includes(opt.record.neType)) {
return opt.value;
}
return '-';
},
width: 100, width: 100,
}, },
{ {
title: t('views.ne.common.nbNumber'), title: 'SN',
dataIndex: 'nbNumber', dataIndex: 'sn',
align: 'left', align: 'left',
customRender(opt) {
if (['AMF', 'MME'].includes(opt.record.neType)) {
return opt.value;
}
return '-';
},
width: 100,
},
{
title: t('common.remark'),
dataIndex: 'remark',
key: 'remark',
align: 'left',
width: 150,
resizable: true,
minWidth: 100,
maxWidth: 300,
},
{
title: t('common.updateTime'),
dataIndex: 'updateTime',
align: 'left',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
width: 200, width: 200,
ellipsis: true,
}, },
{ {
title: t('common.operate'), title: t('common.operate'),
@@ -174,7 +124,8 @@ let tablePagination = reactive({
showSizeChanger: true, showSizeChanger: true,
/**数据总数 */ /**数据总数 */
total: 0, total: 0,
showTotal: (total: number) => t('common.tablePaginationTotal', { total }), showTotal: (total: number) =>
t('common.tablePaginationTotal', { total: total }),
onChange: (page: number, pageSize: number) => { onChange: (page: number, pageSize: number) => {
tablePagination.current = page; tablePagination.current = page;
tablePagination.pageSize = pageSize; tablePagination.pageSize = pageSize;
@@ -189,48 +140,19 @@ function fnTableSize({ key }: MenuInfo) {
tableState.size = key as SizeType; tableState.size = key as SizeType;
} }
/**查询列表, pageNum初始页数 */ /**表格多选 */
function fnGetList(pageNum?: number) { function fnTableSelectedRowKeys(keys: (string | number)[]) {
if (tableState.loading) return; tableState.selectedRowKeys = keys;
tableState.loading = true;
if (pageNum) {
queryParams.pageNum = pageNum;
}
listNeLicense(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data;
let totalV = total;
let rowsV = rows.filter((s: any) => {
if (s.neType !== 'OMC') {
return true;
}
totalV -= 1;
return false;
});
tableState.data = rowsV;
tablePagination.total = totalV;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
} else {
tablePagination.total = 0;
tableState.data = [];
}
tableState.loading = false;
});
} }
/**对话框对象信息状态类型 */ /**对话框对象信息状态类型 */
type ModalStateType = { type ModalStateType = {
/**新增框或修改框是否显示 */ /**新增框或修改框是否显示 */
openByEdit: boolean; openByEdit: boolean;
coreUid: string; /**标题 */
id: number; title: string;
/**表单数据 */
from: Record<string, any>;
/**确定按钮 loading */ /**确定按钮 loading */
confirmLoading: boolean; confirmLoading: boolean;
}; };
@@ -238,31 +160,110 @@ type ModalStateType = {
/**对话框对象信息状态 */ /**对话框对象信息状态 */
let modalState: ModalStateType = reactive({ let modalState: ModalStateType = reactive({
openByEdit: false, openByEdit: false,
coreUid: '', title: 'KPI Title',
id: 0, from: {
id: undefined,
cnTitle: '',
enTitle: '',
kpiId: '',
neType: '',
statusFlag: '1',
},
confirmLoading: false, confirmLoading: false,
}); });
/**对话框内表单属性和校验规则 */
const modalStateFrom = Form.useForm(
modalState.from,
reactive({
neType: [
{
required: true,
message: t('common.inputPlease'),
},
],
kpiId: [
{
required: true,
message: t('common.inputPlease'),
},
],
cnTitle: [
{
required: true,
message: t('common.inputPlease'),
},
],
enTitle: [
{
required: true,
message: t('common.inputPlease'),
},
],
statusFlag: [
{
required: true,
message: t('common.selectPlease'),
},
],
})
);
/** /**
* 对话框弹出显示为 新增或者修改 * 对话框弹出显示为 新增或者修改
* @param row id * @param configId 参数编号id, 不传为新增
*/ */
function fnModalVisibleByEdit(row: Record<string, any>) { function fnModalVisibleByEdit(row?: Record<string, any>) {
modalState.coreUid = row.coreUid; if (!row) {
modalState.id = row.id; modalStateFrom.resetFields();
nextTick(() => { modalState.title = 'Add Core Info';
modalState.openByEdit = true; modalState.openByEdit = true;
}); return;
}
//
if (modalState.confirmLoading) return;
Object.assign(modalState.from, row);
modalState.title = 'Update Info';
modalState.openByEdit = true;
} }
/** /**
* 对话框弹出确认执行函数 * 对话框弹出确认执行函数
* 进行表达规则校验 * 进行表达规则校验
*/ */
function fnModalOk(e: any) { function fnModalOk() {
// modalStateFrom
stateNeLicense(e.coreUid, e.neUid); .validate()
setTimeout(() => fnGetList(), 2_000); .then(() => {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0);
const from = toRaw(modalState.from);
const req = from.id ? updateCoreInfo(from) : addCoreInfo(from);
req
.then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),
duration: 2,
});
modalState.openByEdit = false;
modalStateFrom.resetFields();
fnGetList(1);
} else {
message.error({
content: `${res.msg}`,
duration: 2,
});
}
})
.finally(() => {
hide();
modalState.confirmLoading = false;
});
})
.catch(e => {
message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
});
} }
/** /**
@@ -271,88 +272,89 @@ function fnModalOk(e: any) {
*/ */
function fnModalCancel() { function fnModalCancel() {
modalState.openByEdit = false; modalState.openByEdit = false;
modalState.coreUid = ''; modalStateFrom.resetFields();
modalState.id = 0;
} }
/**刷新网元授权状态 */ /**
function fnRecordState(row: Record<string, any>) { * 配置删除
if (modalState.confirmLoading) return; * @param id 编号ID
*/
function fnRecordDelete(id: string = '0') {
if (id === '0') {
id = tableState.selectedRowKeys.join(',');
}
Modal.confirm({ Modal.confirm({
title: t('common.tipTitle'), title: t('common.tipTitle'),
content: t('views.ne.neLicense.reloadTip'), content: t('views.system.config.delTip', { num: id }),
onOk() { onOk() {
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
stateNeLicense(row.coreUid, row.neUid) delCoreInfo(id)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
row.status = '1'; message.success({
row.serialNum = res.data.sn; content: t('views.system.config.delOk'),
row.expiryDate = res.data.expire; duration: 2,
row.ueNumber = res.data.ueNumber; });
row.nbNumber = res.data.nbNumber; fnGetList();
row.updateTime = new Date().getTime();
message.success(
`${row.id} ${row.neType} ${dictStatus.value[1].label}`,
3
);
} else { } else {
row.status = '0'; message.error({
message.warning( content: `${res.msg}`,
`${row.id} ${row.neType} ${dictStatus.value[0].label}`, duration: 2,
3 });
);
} }
}) })
.finally(() => { .finally(() => {
modalState.confirmLoading = false;
hide(); hide();
}); });
}, },
}); });
} }
/**刷新网元授权状态 重载 */ /**查询参数配置列表, pageNum初始页数 */
function fnRecordStateReload() { function fnGetList(pageNum?: number) {
if (modalState.confirmLoading) return; if (tableState.loading) return;
Modal.confirm({ tableState.loading = true;
title: t('common.tipTitle'), if (pageNum) {
content: t('views.ne.neLicense.reloadBatchTip'), queryParams.pageNum = pageNum;
onOk: async () => { }
modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0); listCoreInfo(toRaw(queryParams)).then(res => {
for (const row of tableState.data) { if (res.code === RESULT_CODE_SUCCESS) {
if (row.neType.toUpperCase() === 'OMC') { //
continue; if (tableState.selectedRowKeys.length > 0) {
} tableState.selectedRowKeys = [];
await stateNeLicense(row.coreUid, row.neUid);
} }
hide(); tablePagination.total = res.data.total;
message.success(t('common.operateOk'), 3); tableState.data = res.data.rows;
modalState.confirmLoading = false; if (
// tablePagination.total <=
fnGetList(); (queryParams.pageNum - 1) * tablePagination.pageSize &&
}, queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
}
tableState.loading = false;
}); });
} }
onMounted(() => { onMounted(() => {
// //
getDict('ne_license_status') Promise.allSettled([getDict('sys_normal_disable')]).then(resArr => {
.then(res => { if (resArr[0].status === 'fulfilled') {
dictStatus.value = res; dict.sysNormalDisable = resArr[0].value;
}) }
.finally(() => { });
// //
fnGetList(); fnGetList();
});
}); });
</script> </script>
<template> <template>
<PageContainer> <PageContainer>
<a-card <a-card
v-show="tableState.seached"
:bordered="false" :bordered="false"
:body-style="{ marginBottom: '24px', paddingBottom: 0 }" :body-style="{ marginBottom: '24px', paddingBottom: 0 }"
> >
@@ -360,27 +362,15 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal"> <a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.ne.common.neType')" name="neType "> <a-form-item label="Name" name="name">
<a-auto-complete
v-model:value="queryParams.neType"
:options="neStore.getNeSelectOtions"
:allow-clear="true"
:placeholder="t('common.inputPlease')"
/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.ne.common.serialNum')"
name="serialNum"
>
<a-input <a-input
v-model:value="queryParams.serialNum" v-model:value="queryParams.name"
:allow-clear="true" allow-clear
:placeholder="t('common.inputPlease')" :placeholder="t('common.inputPlease')"
></a-input> ></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item> <a-form-item>
<a-space :size="8"> <a-space :size="8">
@@ -403,13 +393,18 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
<template #icon><PlusOutlined /></template>
{{ t('common.addText') }}
</a-button>
<a-button <a-button
type="default" type="default"
:loading="modalState.confirmLoading" danger
@click.prevent="fnRecordStateReload()" :disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
> >
<template #icon><SyncOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('views.ne.neLicense.reloadBatch') }} {{ t('common.deleteText') }}
</a-button> </a-button>
</a-space> </a-space>
</template> </template>
@@ -417,6 +412,21 @@ onMounted(() => {
<!-- 插槽-卡片右侧 --> <!-- 插槽-卡片右侧 -->
<template #extra> <template #extra>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
v-model:checked="tableState.seached"
:checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')"
size="small"
/>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip placement="topRight"> <a-tooltip placement="topRight">
<template #title>{{ t('common.sizeText') }}</template> <template #title>{{ t('common.sizeText') }}</template>
<a-dropdown placement="bottomRight" trigger="click"> <a-dropdown placement="bottomRight" trigger="click">
@@ -453,45 +463,32 @@ onMounted(() => {
:data-source="tableState.data" :data-source="tableState.data"
:size="tableState.size" :size="tableState.size"
:pagination="tablePagination" :pagination="tablePagination"
:scroll="{ x: tableColumns.length * 140 }" :scroll="{ x: tableColumns.length * 120 }"
@resizeColumn="(w:number, col:any) => (col.width = w)" :row-selection="{
type: 'checkbox',
selectedRowKeys: tableState.selectedRowKeys,
onChange: fnTableSelectedRowKeys,
}"
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'status'">
<DictTag :options="dictStatus" :value="record.status" />
</template>
<template v-if="column.key === 'remark'">
<a-tooltip placement="topLeft">
<template #title>{{ record.remark }}</template>
<div
style="
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
width: 50px;
"
:style="{ width: column.width + 'px' }"
>
{{ record.remark }}
</div>
</a-tooltip>
</template>
<template v-if="column.key === 'id'"> <template v-if="column.key === 'id'">
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-tooltip placement="topRight"> <a-tooltip>
<template #title>{{ t('views.ne.neLicense.reload') }}</template> <template #title>{{ t('common.editText') }}</template>
<a-button type="link" @click.prevent="fnRecordState(record)">
<template #icon><SyncOutlined /> </template>
</a-button>
</a-tooltip>
<a-tooltip placement="topRight">
<template #title>{{ t('views.ne.neLicense.change') }}</template>
<a-button <a-button
type="link" type="link"
@click.prevent="fnModalVisibleByEdit(record)" @click.prevent="fnModalVisibleByEdit(record)"
> >
<template #icon><UploadOutlined /> </template> <template #icon><FormOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.deleteText') }}</template>
<a-button
type="link"
@click.prevent="fnRecordDelete(record.id)"
>
<template #icon><DeleteOutlined /></template>
</a-button> </a-button>
</a-tooltip> </a-tooltip>
</a-space> </a-space>
@@ -500,14 +497,55 @@ onMounted(() => {
</a-table> </a-table>
</a-card> </a-card>
<!-- 文件上传 --> <!-- 新增框或修改 -->
<EditModal <ProModal
v-model:open="modalState.openByEdit" :drag="true"
:core-uid="modalState.coreUid" :width="800"
:id="modalState.id" :destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:open="modalState.openByEdit"
:title="modalState.title"
:confirm-loading="modalState.confirmLoading"
@ok="fnModalOk" @ok="fnModalOk"
@cancel="fnModalCancel" @cancel="fnModalCancel"
></EditModal> >
<a-form
name="modalStateFrom"
layout="horizontal"
:label-col="{ span: 6 }"
:label-wrap="true"
>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="Name"
name="name"
v-bind="modalStateFrom.validateInfos.name"
>
<a-input
v-model:value="modalState.from.name"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
label="SN"
name="sn"
v-bind="modalStateFrom.validateInfos.sn"
>
<a-input
v-model:value="modalState.from.sn"
allow-clear
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
</a-row>
</a-form>
</ProModal>
</PageContainer> </PageContainer>
</template> </template>

View File

@@ -1,6 +1,5 @@
import { delNeConfigData } from '@/api/ne/neConfig'; import { delNeConfigData } from '@/api/ne/neConfig';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { reactive } from 'vue'; import { reactive } from 'vue';
@@ -51,7 +50,6 @@ export default function useArrayBatch({
const res = await delNeConfigData({ const res = await delNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: batchState.paramName, paramName: batchState.paramName,
loc: `${i}`, loc: `${i}`,
}); });

View File

@@ -4,7 +4,6 @@ import { readSheet } from '@/utils/execl-utils';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { reactive } from 'vue'; import { reactive } from 'vue';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { currentCoreUid } from '@/hooks/useCoreUid';
/** /**
* 导入文件加array * 导入文件加array
@@ -140,7 +139,6 @@ export default function useArrayImport({
result = await editNeConfigData({ result = await editNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: importState.paramName, paramName: importState.paramName,
paramData: rowItem, paramData: rowItem,
loc: `${rowItem.index}`, loc: `${rowItem.index}`,
@@ -155,7 +153,6 @@ export default function useArrayImport({
result = await addNeConfigData({ result = await addNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: importState.paramName, paramName: importState.paramName,
paramData: Object.assign(rowItem, { index }), paramData: Object.assign(rowItem, { index }),
loc: `${index}`, loc: `${index}`,

View File

@@ -4,7 +4,6 @@ import {
editNeConfigData, editNeConfigData,
} from '@/api/ne/neConfig'; } from '@/api/ne/neConfig';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { Modal, message } from 'ant-design-vue/es'; import { Modal, 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 { reactive, watch } from 'vue'; import { reactive, watch } from 'vue';
@@ -136,7 +135,6 @@ export default function useConfigArray({
editNeConfigData({ editNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
paramData: data, paramData: data,
loc: loc, loc: loc,
@@ -177,7 +175,6 @@ export default function useConfigArray({
delNeConfigData({ delNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
loc: loc, loc: loc,
}).then(res => { }).then(res => {
@@ -272,7 +269,6 @@ export default function useConfigArray({
addNeConfigData({ addNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
paramData: data, paramData: data,
loc: `${from['index']['value']}`, loc: `${from['index']['value']}`,

View File

@@ -4,7 +4,6 @@ import {
delNeConfigData, delNeConfigData,
} from '@/api/ne/neConfig'; } from '@/api/ne/neConfig';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { Modal, message } from 'ant-design-vue/es'; import { Modal, 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 { nextTick, reactive } from 'vue'; import { nextTick, reactive } from 'vue';
@@ -204,7 +203,6 @@ export default function useConfigArrayChild({
editNeConfigData({ editNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
paramData: data, paramData: data,
loc, loc,
@@ -246,7 +244,6 @@ export default function useConfigArrayChild({
delNeConfigData({ delNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
loc, loc,
}).then(res => { }).then(res => {
@@ -317,7 +314,6 @@ export default function useConfigArrayChild({
addNeConfigData({ addNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
paramData: data, paramData: data,
loc, loc,

View File

@@ -3,7 +3,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { SizeType } from 'ant-design-vue/es/config-provider'; import { SizeType } from 'ant-design-vue/es/config-provider';
import { message } from 'ant-design-vue/es'; import { message } from 'ant-design-vue/es';
import { reactive, toRaw } from 'vue'; import { reactive, toRaw } from 'vue';
import { currentCoreUid } from '@/hooks/useCoreUid';
/** /**
* list类型参数处理 * list类型参数处理
@@ -90,7 +89,6 @@ export default function useConfigList({
editNeConfigData({ editNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: treeState.selectNode.paramName, paramName: treeState.selectNode.paramName,
paramData: { paramData: {
[from['name']]: from['value'], [from['name']]: from['value'],

View File

@@ -1,5 +1,4 @@
import { getNeConfigData } from '@/api/ne/neConfig'; import { getNeConfigData } from '@/api/ne/neConfig';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { regExpIPv4, regExpIPv6, validURL } from '@/utils/regular-utils'; import { regExpIPv4, regExpIPv6, validURL } from '@/utils/regular-utils';
import { ref } from 'vue'; import { ref } from 'vue';
@@ -171,7 +170,6 @@ export default function useOptions({ t }: any) {
getNeConfigData({ getNeConfigData({
neType: 'SMF', neType: 'SMF',
neUid: neUid, neUid: neUid,
coreUid: currentCoreUid(),
paramName: 'upfConfig', paramName: 'upfConfig',
}).then(res => { }).then(res => {
smfByUPFIdOptions.value = []; smfByUPFIdOptions.value = [];

View File

@@ -16,7 +16,6 @@ import useConfigArrayChild from './hooks/useConfigArrayChild';
import useArrayImport from './hooks/useArrayImport'; import useArrayImport from './hooks/useArrayImport';
import useArrayBatchDel from './hooks/useArrayBatchDel'; import useArrayBatchDel from './hooks/useArrayBatchDel';
import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig'; import { getAllNeConfig, getNeConfigData } from '@/api/ne/neConfig';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
@@ -109,7 +108,6 @@ function fnActiveConfigNode(key: string | number) {
getNeConfigData({ getNeConfigData({
neType: neTypeSelect.value[0], neType: neTypeSelect.value[0],
neUid: neTypeSelect.value[1], neUid: neTypeSelect.value[1],
coreUid: currentCoreUid(),
paramName: key, paramName: key,
}).then(res => { }).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {

View File

@@ -19,7 +19,6 @@ import {
} from '@/api/ne/neConfigBackup'; } from '@/api/ne/neConfigBackup';
import { pushBackupFTP } from '@/api/neData/backup'; import { pushBackupFTP } from '@/api/neData/backup';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -29,8 +28,6 @@ let dictStatus = ref<DictType[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: undefined, neType: undefined,
/**名称 */ /**名称 */
@@ -168,7 +165,6 @@ function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
tableState.selectedRows = rows.map(item => { tableState.selectedRows = rows.map(item => {
return { return {
id: item.id, id: item.id,
coreUid: item.coreUid,
neUid: item.neUid, neUid: item.neUid,
neType: item.neType, neType: item.neType,
}; };
@@ -207,7 +203,7 @@ function fnDownloadFile(row: Record<string, any>) {
content: t('views.ne.neConfigBackup.downTip', { txt: row.name }), content: t('views.ne.neConfigBackup.downTip', { txt: row.name }),
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
downNeConfigBackup({ id: row.id, coreUid: row.coreUid, neUid: row.neUid }) downNeConfigBackup({ id: row.id, neUid: row.neUid })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success({
@@ -251,7 +247,6 @@ function fnRecordDelete(id: string) {
tableState.selectedRows.forEach(item => { tableState.selectedRows.forEach(item => {
reqArr.push( reqArr.push(
delNeConfigBackup({ delNeConfigBackup({
coreUid: item.coreUid,
neUid: item.neUid, neUid: item.neUid,
id: item.id, id: item.id,
}) })
@@ -262,7 +257,6 @@ function fnRecordDelete(id: string) {
if (item.id === id) { if (item.id === id) {
reqArr.push( reqArr.push(
delNeConfigBackup({ delNeConfigBackup({
coreUid: item.coreUid,
neUid: item.neUid, neUid: item.neUid,
id: item.id, id: item.id,
}) })
@@ -308,7 +302,6 @@ let modalState: ModalStateType = reactive({
title: '备份记录', title: '备份记录',
from: { from: {
id: undefined, id: undefined,
coreUid: '',
neUid: '', neUid: '',
neType: '', neType: '',
name: '', name: '',

View File

@@ -28,13 +28,7 @@ const props = defineProps({
type: String, type: String,
default: '', default: '',
required: true, required: true,
}, },
/**核心网标识 */
coreUid: {
type: String,
default: '',
required: true,
},
}); });
/**对话框对象信息状态类型 */ /**对话框对象信息状态类型 */
@@ -132,8 +126,7 @@ function fnReload() {
prefix="tail" prefix="tail"
url="/ws/view" url="/ws/view"
:ne-type="neType" :ne-type="neType"
:ne-uid="neUid" :ne-uid="neUid"
:core-uid="coreUid"
style="height: calc(100% - 36px)" style="height: calc(100% - 36px)"
@connect="fnInit()" @connect="fnInit()"
></TerminalSSHView> ></TerminalSSHView>

View File

@@ -13,7 +13,6 @@ import ViewDrawer from './components/ViewDrawer.vue';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { parseSizeFromFile } from '@/utils/parse-utils'; import { parseSizeFromFile } from '@/utils/parse-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
@@ -26,8 +25,6 @@ let neTypeSelect = ref<string[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: '', neType: '',
neUid: '', neUid: '',
@@ -153,7 +150,6 @@ function fnDownloadFile(row: Record<string, any>) {
getNeFile({ getNeFile({
neType: queryParams.neType, neType: queryParams.neType,
neUid: queryParams.neUid, neUid: queryParams.neUid,
coreUid: queryParams.coreUid,
path: queryParams.path, path: queryParams.path,
fileName: row.fileName, fileName: row.fileName,
delTemp: true, delTemp: true,
@@ -276,7 +272,6 @@ const viewDrawerState = reactive({
neType: '', neType: '',
/**网元ID */ /**网元ID */
neUid: '', neUid: '',
coreUid: '',
}); });
/**打开抽屉查看 */ /**打开抽屉查看 */
@@ -284,7 +279,6 @@ function fnDrawerOpen(row: Record<string, any>) {
viewDrawerState.filePath = [...nePathArr.value, row.fileName].join('/'); viewDrawerState.filePath = [...nePathArr.value, row.fileName].join('/');
viewDrawerState.neType = neTypeSelect.value[0]; viewDrawerState.neType = neTypeSelect.value[0];
viewDrawerState.neUid = neTypeSelect.value[1]; viewDrawerState.neUid = neTypeSelect.value[1];
viewDrawerState.coreUid = currentCoreUid();
viewDrawerState.open = !viewDrawerState.open; viewDrawerState.open = !viewDrawerState.open;
} }
@@ -392,7 +386,6 @@ onMounted(() => {
:file-path="viewDrawerState.filePath" :file-path="viewDrawerState.filePath"
:ne-type="viewDrawerState.neType" :ne-type="viewDrawerState.neType"
:ne-uid="viewDrawerState.neUid" :ne-uid="viewDrawerState.neUid"
:core-uid="viewDrawerState.coreUid"
></ViewDrawer> ></ViewDrawer>
</PageContainer> </PageContainer>
</template> </template>

View File

@@ -20,10 +20,6 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
coreUid: {
type: String,
default: '',
},
neUid: { neUid: {
type: String, type: String,
default: '', default: '',
@@ -45,11 +41,10 @@ const importState = reactive({
/**查询网元远程服务器备份文件 */ /**查询网元远程服务器备份文件 */
function backupSearch(name?: string) { function backupSearch(name?: string) {
const { neType, neUid, coreUid } = props; const { neType, neUid } = props;
listNeConfigBackup({ listNeConfigBackup({
neType, neType,
neUid, neUid,
coreUid,
name, name,
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
@@ -91,7 +86,6 @@ type ModalStateType = {
from: { from: {
neType: string; neType: string;
neUid: string; neUid: string;
coreUid: string;
type: 'upload' | 'backup'; type: 'upload' | 'backup';
path: string | undefined; path: string | undefined;
}; };
@@ -108,7 +102,6 @@ let modalState: ModalStateType = reactive({
from: { from: {
neType: '', neType: '',
neUid: '', neUid: '',
coreUid: '',
type: 'upload', type: 'upload',
path: undefined, path: undefined,
}, },
@@ -233,10 +226,9 @@ watch(
() => props.open, () => props.open,
val => { val => {
if (val) { if (val) {
if (props.neType && props.neUid && props.coreUid) { if (props.neType && props.neUid) {
modalState.from.neType = props.neType; modalState.from.neType = props.neType;
modalState.from.neUid = props.neUid; modalState.from.neUid = props.neUid;
modalState.from.coreUid = props.coreUid;
modalState.title = t('views.ne.neInfo.backConf.title'); modalState.title = t('views.ne.neInfo.backConf.title');
modalState.openByEdit = true; modalState.openByEdit = true;
} }
@@ -248,13 +240,13 @@ watch(
* 网元导出配置 * 网元导出配置
* @param row 网元编号ID * @param row 网元编号ID
*/ */
function fnExportConf(coreUid: string, neUid: string, neType: string) { function fnExportConf(neUid: string, neType: string) {
Modal.confirm({ Modal.confirm({
title: t('common.tipTitle'), title: t('common.tipTitle'),
content: t('views.ne.neInfo.backConf.exportTip'), content: t('views.ne.neInfo.backConf.exportTip'),
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
exportNeConfigBackup({ neType, coreUid, neUid }) exportNeConfigBackup({ neType, neUid })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
notification.success({ notification.success({

View File

@@ -9,7 +9,6 @@ import { addNeInfo, updateNeInfo, getNeInfo } from '@/api/ne/neInfo';
import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost'; import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
const emit = defineEmits(['ok', 'cancel', 'update:open']); const emit = defineEmits(['ok', 'cancel', 'update:open']);
@@ -22,10 +21,6 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
coreUid: {
type: String,
default: '',
},
}); });
/**字典数据 */ /**字典数据 */
@@ -113,7 +108,6 @@ let modalState: ModalStateType = reactive({
ipAddr: '', ipAddr: '',
port: 33030, port: 33030,
pvFlag: 'PNF', pvFlag: 'PNF',
coreUid: currentCoreUid(),
neUid: '', neUid: '',
macAddr: '', macAddr: '',
dn: '', dn: '',
@@ -202,11 +196,10 @@ function modalStateFromEqualIPV4AndIPV6(
/** /**
* 对话框弹出显示为 新增或者修改 * 对话框弹出显示为 新增或者修改
* @param coreUid 核心网ID * @param id 网元ID
* @param neUid 网元ID
*/ */
function fnModalVisibleByEdit(coreUid: string, id: number) { function fnModalVisibleByEdit(id: number) {
if (!coreUid || !id) { if (!id) {
modalStateFrom.resetFields(); modalStateFrom.resetFields();
modalState.title = t('views.ne.neInfo.addTitle'); modalState.title = t('views.ne.neInfo.addTitle');
modalState.openByEdit = true; modalState.openByEdit = true;
@@ -214,7 +207,7 @@ function fnModalVisibleByEdit(coreUid: string, id: number) {
if (modalState.confirmLoading) return; if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true; modalState.confirmLoading = true;
getNeInfo(coreUid, id).then(res => { getNeInfo(id).then(res => {
modalState.confirmLoading = false; modalState.confirmLoading = false;
hide(); hide();
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
@@ -329,7 +322,7 @@ function fnNeIPChange(e: any) {
watch( watch(
() => props.open, () => props.open,
val => { val => {
if (val) fnModalVisibleByEdit(props.coreUid, props.id); if (val) fnModalVisibleByEdit(props.id);
} }
); );

View File

@@ -4,16 +4,12 @@ import { ProModal } from 'antdv-pro-modal';
import { Form, Modal, Upload, message } from 'ant-design-vue/es'; import { Form, Modal, Upload, message } from 'ant-design-vue/es';
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';
import {
changeNeLicense,
getNeLicense,
getNeLicenseByNF,
} from '@/api/ne/neLicense';
import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface'; import { UploadRequestOption } from 'ant-design-vue/es/vc-upload/interface';
import { FileType } from 'ant-design-vue/es/upload/interface'; import { FileType } from 'ant-design-vue/es/upload/interface';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { getNeInfo, codeNeLicense, updateNeLicense } from '@/api/ne/neInfo';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
const emit = defineEmits(['ok', 'cancel', 'update:open']); const emit = defineEmits(['ok', 'cancel', 'update:open']);
@@ -22,22 +18,16 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
/**网元ID */
id: { id: {
type: Number, type: Number,
default: 0, default: 0,
}, required: true,
coreUid: {
type: String,
default: '',
}, },
neUid: { neUid: {
type: String, type: String,
default: '', default: '',
}, },
neType: {
type: String,
default: '',
},
/**是否重启服务 */ /**是否重启服务 */
reload: { reload: {
type: Boolean, type: Boolean,
@@ -55,10 +45,10 @@ type ModalStateType = {
from: { from: {
id: number | undefined; id: number | undefined;
neType: string; neType: string;
neName: string;
neId: string; neId: string;
activationRequestCode: string; activationRequestCode: string;
licensePath: string; licensePath: string;
remark: string;
reload: boolean; reload: boolean;
}; };
/**确定按钮 loading */ /**确定按钮 loading */
@@ -75,9 +65,9 @@ let modalState: ModalStateType = reactive({
id: undefined, id: undefined,
neType: '', neType: '',
neId: '', neId: '',
neName: '',
activationRequestCode: '', activationRequestCode: '',
licensePath: '', licensePath: '',
remark: '',
reload: false, reload: false,
}, },
confirmLoading: false, confirmLoading: false,
@@ -110,7 +100,7 @@ function fnModalOk() {
modalState.confirmLoading = true; modalState.confirmLoading = true;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
const from = toRaw(modalState.from); const from = toRaw(modalState.from);
changeNeLicense(from).then(res => { updateNeLicense(from).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success({
content: t('common.operateOk'), content: t('common.operateOk'),
@@ -202,7 +192,7 @@ function fnCopyCode() {
/**下载授权申请码文件 */ /**下载授权申请码文件 */
function fnDownCode() { function fnDownCode() {
const { activationRequestCode, neType, neId } = modalState.from; const { activationRequestCode, neType, neName } = modalState.from;
if (!activationRequestCode) return; if (!activationRequestCode) return;
Modal.confirm({ Modal.confirm({
title: t('common.tipTitle'), title: t('common.tipTitle'),
@@ -211,7 +201,7 @@ function fnDownCode() {
const blob = new Blob([activationRequestCode], { const blob = new Blob([activationRequestCode], {
type: 'text/plain', type: 'text/plain',
}); });
saveAs(blob, `${neType}_${neId}_code.txt`); saveAs(blob, `${neType}_${neName}_code.txt`);
}, },
}); });
} }
@@ -220,35 +210,19 @@ function fnDownCode() {
* 对话框弹出显示为 ID编辑 * 对话框弹出显示为 ID编辑
* @param id id * @param id id
*/ */
function fnModalVisibleById(coreUid: string, id: number) { function fnModalVisibleById(id: number) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
getNeLicense(coreUid, id) codeNeLicense(props.neUid)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(modalState.from, res.data); return getNeInfo(id);
modalState.from.licensePath = '';
modalState.from.reload = props.reload;
modalState.title = t('views.ne.neLicense.updateTtile');
modalState.openByEdit = true;
} else { } else {
message.error(res.msg, 3); message.error(res.msg, 3);
return undefined;
} }
}) })
.finally(() => {
modalState.confirmLoading = false;
hide();
});
}
/**
* 对话框弹出显示为 新增或者修改
* @param neType 网元类型
* @param neId 网元ID
*/
function fnModalVisibleByTypeAndId(coreUid: string, neUid: string) {
const hide = message.loading(t('common.loading'), 0);
getNeLicenseByNF(coreUid, neUid)
.then(res => { .then(res => {
if (!res) return;
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(modalState.from, res.data); Object.assign(modalState.from, res.data);
modalState.from.licensePath = ''; modalState.from.licensePath = '';
@@ -269,13 +243,8 @@ function fnModalVisibleByTypeAndId(coreUid: string, neUid: string) {
watch( watch(
() => props.open, () => props.open,
val => { val => {
if (val && props.coreUid) { if (val && props.id && props.neUid) {
if (props.neUid) { fnModalVisibleById(props.id);
fnModalVisibleByTypeAndId(props.coreUid, props.neUid);
}
if (props.id) {
fnModalVisibleById(props.coreUid, props.id);
}
} }
} }
); );
@@ -316,10 +285,10 @@ onMounted(() => {});
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item <a-form-item
:label-col="{ span: 12 }" :label-col="{ span: 12 }"
:label="t('views.ne.common.neUid')" :label="t('views.ne.common.neName')"
name="neId" name="neName"
> >
{{ modalState.from.neId }} {{ modalState.from.neName }}
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@@ -381,15 +350,6 @@ onMounted(() => {});
<a-form-item label="NE Reload" name="reload" v-if="false"> <a-form-item label="NE Reload" name="reload" v-if="false">
<a-switch v-model:checked="modalState.from.reload"> </a-switch> <a-switch v-model:checked="modalState.from.reload"> </a-switch>
</a-form-item> </a-form-item>
<a-form-item :label="t('common.remark')" name="remark">
<a-textarea
v-model:value="modalState.from.remark"
:maxlength="200"
:show-count="true"
:placeholder="t('common.inputPlease')"
/>
</a-form-item>
</a-form> </a-form>
</ProModal> </ProModal>
</template> </template>

View File

@@ -12,10 +12,6 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
coreUid: {
type: String,
default: '',
},
neUid: { neUid: {
type: String, type: String,
default: '', default: '',
@@ -75,9 +71,9 @@ const modalStateFrom = Form.useForm(
* @param neType 网元类型 * @param neType 网元类型
* @param neId 网元ID * @param neId 网元ID
*/ */
function fnModalVisibleByTypeAndId(coreUid: string, neUid: string) { function fnModalVisibleByTypeAndId(neUid: string) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
getOAMFile(coreUid, neUid) getOAMFile(neUid)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const data = res.data; const data = res.data;
@@ -119,7 +115,6 @@ function fnModalOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
const from = toRaw(modalState.from); const from = toRaw(modalState.from);
saveOAMFile({ saveOAMFile({
coreUid: props.coreUid,
neUid: props.neUid, neUid: props.neUid,
content: from, content: from,
sync: true, sync: true,
@@ -132,7 +127,6 @@ function fnModalOk() {
serviceNeAction({ serviceNeAction({
neType: props.neType, neType: props.neType,
neUid: props.neUid, neUid: props.neUid,
coreUid: props.coreUid,
action: 'restart', action: 'restart',
}); });
} }
@@ -172,8 +166,8 @@ watch(
() => props.open, () => props.open,
val => { val => {
if (val) { if (val) {
if (props.coreUid && props.neUid) { if (props.neUid) {
fnModalVisibleByTypeAndId(props.coreUid, props.neUid); fnModalVisibleByTypeAndId(props.neUid);
} }
} }
} }

View File

@@ -25,7 +25,6 @@ export default function useNeOptions() {
serviceNeAction({ serviceNeAction({
neType: row.neType, neType: row.neType,
neUid: row.neUid, neUid: row.neUid,
coreUid: row.coreUid,
action: 'start', action: 'start',
}) })
.then(res => { .then(res => {
@@ -62,7 +61,6 @@ export default function useNeOptions() {
serviceNeAction({ serviceNeAction({
neType: row.neType, neType: row.neType,
neUid: row.neUid, neUid: row.neUid,
coreUid: row.coreUid,
action: 'restart', action: 'restart',
}) })
.then(res => { .then(res => {
@@ -111,7 +109,6 @@ export default function useNeOptions() {
serviceNeAction({ serviceNeAction({
neType: row.neType, neType: row.neType,
neUid: row.neUid, neUid: row.neUid,
coreUid: row.coreUid,
action: 'stop', action: 'stop',
}) })
.then(res => { .then(res => {
@@ -144,7 +141,7 @@ export default function useNeOptions() {
content: t('views.ne.common.reloadTip'), content: t('views.ne.common.reloadTip'),
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
updateNeConfigReload(row.coreUid, row.neUid) updateNeConfigReload(row.neUid)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('common.operateOk'), 3); message.success(t('common.operateOk'), 3);
@@ -169,7 +166,6 @@ export default function useNeOptions() {
query: { query: {
neType: row.neType, neType: row.neType,
neUid: row.neUid, neUid: row.neUid,
coreUid: row.coreUid,
}, },
}); });
} }

View File

@@ -12,7 +12,6 @@ import { listNeInfo, delNeInfo } from '@/api/ne/neInfo';
import { stateNeInfo } from '@/api/ne/neAction'; import { stateNeInfo } from '@/api/ne/neAction';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useNeOptions from './hooks/useNeOptions'; import useNeOptions from './hooks/useNeOptions';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -31,6 +30,10 @@ const EditModal = defineAsyncComponent(
const OAMModal = defineAsyncComponent( const OAMModal = defineAsyncComponent(
() => import('./components/OAMModal.vue') () => import('./components/OAMModal.vue')
); );
// 软件授权上传
const LicenseEditModal = defineAsyncComponent(
() => import('./components/LicenseEditModal.vue')
);
// 配置备份文件导入 // 配置备份文件导入
const BackConfModal = defineAsyncComponent( const BackConfModal = defineAsyncComponent(
() => import('./components/BackConfModal.vue') () => import('./components/BackConfModal.vue')
@@ -47,8 +50,6 @@ let dict: {
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: '', neType: '',
/**带状态信息 */ /**带状态信息 */
@@ -129,6 +130,42 @@ let tableColumns: ColumnsType = [
align: 'left', align: 'left',
width: 100, width: 100,
}, },
{
title: t('views.ne.common.serialNum'),
dataIndex: 'serialNum',
align: 'left',
width: 120,
},
{
title: t('views.ne.common.expiryDate'),
dataIndex: 'expiryDate',
align: 'left',
width: 150,
},
{
title: t('views.ne.common.ueNumber'),
dataIndex: 'ueNumber',
align: 'left',
customRender(opt) {
if (['UDM', 'AMF', 'MME'].includes(opt.record.neType)) {
return opt.value;
}
return '';
},
width: 120,
},
{
title: t('views.ne.common.nbNumber'),
dataIndex: 'nbNumber',
align: 'left',
customRender(opt) {
if (['AMF', 'MME'].includes(opt.record.neType)) {
return opt.value;
}
return '';
},
width: 120,
},
{ {
title: t('views.ne.neInfo.state'), title: t('views.ne.neInfo.state'),
dataIndex: 'status', dataIndex: 'status',
@@ -182,7 +219,6 @@ function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
tableState.selectedRows = rows.map(item => { tableState.selectedRows = rows.map(item => {
return { return {
id: item.id, id: item.id,
coreUid: item.coreUid,
neUid: item.neUid, neUid: item.neUid,
neType: item.neType, neType: item.neType,
}; };
@@ -191,6 +227,8 @@ function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
/**对话框对象信息状态类型 */ /**对话框对象信息状态类型 */
type ModalStateType = { type ModalStateType = {
/**软件授权上传框是否显示 */
openByLicense: boolean;
/**配置备份框是否显示 */ /**配置备份框是否显示 */
openByBackConf: boolean; openByBackConf: boolean;
/**OAM文件配置框是否显示 */ /**OAM文件配置框是否显示 */
@@ -199,7 +237,6 @@ type ModalStateType = {
openByEdit: boolean; openByEdit: boolean;
/**新增框或修改框ID */ /**新增框或修改框ID */
id: number; id: number;
coreUid: string;
neUid: string; neUid: string;
neType: string; neType: string;
/**确定按钮 loading */ /**确定按钮 loading */
@@ -208,11 +245,11 @@ type ModalStateType = {
/**对话框对象信息状态 */ /**对话框对象信息状态 */
let modalState: ModalStateType = reactive({ let modalState: ModalStateType = reactive({
openByLicense: false,
openByBackConf: false, openByBackConf: false,
openByOAM: false, openByOAM: false,
openByEdit: false, openByEdit: false,
id: 0, id: 0,
coreUid: '',
neUid: '', neUid: '',
neType: '', neType: '',
confirmLoading: false, confirmLoading: false,
@@ -225,12 +262,10 @@ let modalState: ModalStateType = reactive({
function fnModalVisibleByEdit(row?: Record<string, any>) { function fnModalVisibleByEdit(row?: Record<string, any>) {
if (!row) { if (!row) {
modalState.id = 0; modalState.id = 0;
modalState.coreUid = '';
modalState.neUid = ''; modalState.neUid = '';
modalState.neType = ''; modalState.neType = '';
} else { } else {
modalState.id = row.id; modalState.id = row.id;
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid; modalState.neUid = row.neUid;
modalState.neType = row.neType; modalState.neType = row.neType;
} }
@@ -253,14 +288,13 @@ function fnModalEditOk(from: Record<string, any>) {
/**局部更新信息 */ /**局部更新信息 */
function reloadRowInfo(row: Record<string, any>) { function reloadRowInfo(row: Record<string, any>) {
stateNeInfo(row.coreUid, row.neUid) stateNeInfo(row.neUid)
.then(res => { .then(res => {
// 找到编辑更新的网元 // 找到编辑更新的网元
const item = tableState.data.find(s => s.id === row.id); const item = tableState.data.find(s => s.id === row.id);
if (item && res.code === RESULT_CODE_SUCCESS) { if (item && res.code === RESULT_CODE_SUCCESS) {
item.neType = row.neType; item.neType = row.neType;
item.neUid = row.neUid; item.neUid = row.neUid;
item.coreUid = row.coreUid;
item.neName = row.neName; item.neName = row.neName;
item.ipAddr = row.ipAddr; item.ipAddr = row.ipAddr;
item.port = row.port; item.port = row.port;
@@ -287,7 +321,6 @@ function reloadRowInfo(row: Record<string, any>) {
* 进行表达规则校验 * 进行表达规则校验
*/ */
function fnModalEditCancel() { function fnModalEditCancel() {
modalState.coreUid = '';
modalState.neUid = ''; modalState.neUid = '';
modalState.neType = ''; modalState.neType = '';
modalState.openByEdit = false; modalState.openByEdit = false;
@@ -314,18 +347,13 @@ function fnRecordDelete(id: string) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
let reqArr: any = []; let reqArr: any = [];
if (id === '0') { if (id === '0') {
tableState.selectedRows.forEach(item => { const ids = tableState.selectedRowKeys.join(',');
reqArr.push( delNeInfo({ id: ids });
delNeInfo({ coreUid: item.coreUid, neUid: item.neUid, id: item.id })
);
});
} else { } else {
tableState.data.forEach(item => { tableState.data.forEach(item => {
if (item.id === id) { if (item.id === id) {
reqArr.push( reqArr.push(
delNeInfo({ delNeInfo({
coreUid: item.coreUid,
neUid: item.neUid,
id: item.id, id: item.id,
}) })
); );
@@ -385,16 +413,20 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
fnNeLogFile(row); fnNeLogFile(row);
break; break;
case 'oam': case 'oam':
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid; modalState.neUid = row.neUid;
modalState.neType = row.neType; modalState.neType = row.neType;
modalState.openByOAM = !modalState.openByOAM; modalState.openByOAM = !modalState.openByOAM;
break; break;
case 'license':
modalState.id = row.id;
modalState.neUid = row.neUid;
modalState.neType = row.neType;
modalState.openByLicense = !modalState.openByLicense;
break;
case 'backConfExport': case 'backConfExport':
backConf.value.exportConf(row.coreUid, row.neUid, row.neType); backConf.value.exportConf(row.neUid, row.neType);
break; break;
case 'backConfImport': case 'backConfImport':
modalState.coreUid = row.coreUid;
modalState.neUid = row.neUid; modalState.neUid = row.neUid;
modalState.neType = row.neType; modalState.neType = row.neType;
modalState.openByBackConf = !modalState.openByBackConf; modalState.openByBackConf = !modalState.openByBackConf;
@@ -642,6 +674,13 @@ onMounted(() => {
<FileTextOutlined /> <FileTextOutlined />
{{ t('views.ne.common.oam') }} {{ t('views.ne.common.oam') }}
</a-menu-item> </a-menu-item>
<a-menu-item
key="license"
v-if="!['OMC'].includes(record.neType)"
>
<FileTextOutlined />
{{ t('views.ne.common.license') }}
</a-menu-item>
<!-- 配置备份 --> <!-- 配置备份 -->
<a-menu-item key="backConfExport"> <a-menu-item key="backConfExport">
<ExportOutlined /> <ExportOutlined />
@@ -680,6 +719,21 @@ onMounted(() => {
<span>{{ t('views.ne.common.expiryDate') }}</span> <span>{{ t('views.ne.common.expiryDate') }}</span>
<span>{{ record.serverState.expire }}</span> <span>{{ record.serverState.expire }}</span>
</div> </div>
<div>
<span>{{ t('views.ne.common.ueNumber') }}</span>
<span
v-if="
['UDM', 'AMF', 'MME'].includes(record.serverState.neType)
"
>
{{ record.serverState.ueNumber }}
</span>
<span v-else> - </span>
</div>
<div v-if="['AMF', 'MME'].includes(record.serverState.neType)">
<span>{{ t('views.ne.common.nbNumber') }}</span>
<span> {{ record.serverState.nbNumber }} </span>
</div>
</a-col> </a-col>
<a-col :offset="2" :lg="8" :md="8" :xs="8"> <a-col :offset="2" :lg="8" :md="8" :xs="8">
<a-divider orientation="left"> <a-divider orientation="left">
@@ -750,7 +804,6 @@ onMounted(() => {
<!-- 新增框或修改框 --> <!-- 新增框或修改框 -->
<EditModal <EditModal
v-model:open="modalState.openByEdit" v-model:open="modalState.openByEdit"
:core-uid="modalState.coreUid"
:id="modalState.id" :id="modalState.id"
@ok="fnModalEditOk" @ok="fnModalEditOk"
@cancel="fnModalEditCancel" @cancel="fnModalEditCancel"
@@ -759,7 +812,6 @@ onMounted(() => {
<!-- OAM编辑框 --> <!-- OAM编辑框 -->
<OAMModal <OAMModal
v-model:open="modalState.openByOAM" v-model:open="modalState.openByOAM"
:core-uid="modalState.coreUid"
:ne-uid="modalState.neUid" :ne-uid="modalState.neUid"
:ne-type="modalState.neType" :ne-type="modalState.neType"
@cancel="fnModalEditCancel" @cancel="fnModalEditCancel"
@@ -769,11 +821,20 @@ onMounted(() => {
<BackConfModal <BackConfModal
ref="backConf" ref="backConf"
v-model:open="modalState.openByBackConf" v-model:open="modalState.openByBackConf"
:core-uid="modalState.coreUid"
:ne-uid="modalState.neUid" :ne-uid="modalState.neUid"
:ne-type="modalState.neType" :ne-type="modalState.neType"
@cancel="fnModalEditCancel" @cancel="fnModalEditCancel"
></BackConfModal> ></BackConfModal>
<!-- 文件上传框 -->
<LicenseEditModal
v-model:open="modalState.openByLicense"
:id="modalState.id"
:ne-uid="modalState.neUid"
:ne-type="modalState.neType"
@ok="fnModalEditOk"
@cancel="fnModalEditCancel"
></LicenseEditModal>
</PageContainer> </PageContainer>
</template> </template>

View File

@@ -20,12 +20,13 @@ import { PieChart } from 'echarts/charts';
import { LabelLayout } from 'echarts/features'; import { LabelLayout } from 'echarts/features';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import useCoreStore from '@/store/modules/core';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import { listAllNeInfo } from '@/api/ne/neInfo'; import { listAllNeInfo } from '@/api/ne/neInfo';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const appStore = useAppStore(); const appStore = useAppStore();
const coreStore = useCoreStore();
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@@ -128,7 +129,7 @@ async function fnGetList(reload: boolean = false) {
tableState.loading = !reload; tableState.loading = !reload;
try { try {
const res = await listAllNeInfo({ const res = await listAllNeInfo({
coreUid: currentCoreUid(), coreUid: coreStore.currentCoreUid,
bandStatus: true, bandStatus: true,
}); });
tableState.data = res.data; tableState.data = res.data;

View File

@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form, Modal, message } from 'ant-design-vue/es'; import { Form, Modal, message } from 'ant-design-vue/es';
import { onMounted, reactive, toRaw } from 'vue'; import { onMounted, reactive, toRaw } from 'vue';
import { addNeInfo, getNeInfo, updateNeInfo } from '@/api/ne/neInfo'; import { addNeInfo, getNeInfo } from '@/api/ne/neInfo';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { NE_TYPE_LIST } from '@/constants/ne-constants'; import { NE_TYPE_LIST } from '@/constants/ne-constants';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils'; import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
@@ -9,8 +9,6 @@ import { fnRestStepState, fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { getNeInfoByNF } from '@/api/ne/neAction';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -47,7 +45,7 @@ let modalState: ModalStateType = reactive({
title: '网元', title: '网元',
from: { from: {
id: undefined, id: undefined,
coreUid: currentCoreUid(), coreId: undefined,
neUid: '', neUid: '',
neType: '', neType: '',
neName: '', neName: '',
@@ -174,7 +172,7 @@ function fnModalOk() {
return; return;
} }
neStore.fnNelistRefresh(); // 刷新缓存的网元信息 neStore.fnNelistRefresh(); // 刷新缓存的网元信息
getNeInfo(from.coreUid, neId).then(res => { getNeInfo(neId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
stepState.neInfo = res.data; // 保存网元信息 stepState.neInfo = res.data; // 保存网元信息
modalState.stepNext = true; // 开启下一步 modalState.stepNext = true; // 开启下一步

View File

@@ -158,7 +158,6 @@ type StateType = {
/**软件包信息数据 */ /**软件包信息数据 */
from: { from: {
neType: string; // 版本需要 neType: string; // 版本需要
coreUid: string; // 版本需要
neUid: string; // 版本需要 neUid: string; // 版本需要
name: string; // 软件需要 name: string; // 软件需要
path: string; path: string;
@@ -177,8 +176,7 @@ let state: StateType = reactive({
depType: [], depType: [],
from: { from: {
id: undefined, id: undefined,
neType: '', neType: '',
coreUid: '',
neUid: '', neUid: '',
name: '', name: '',
path: '', path: '',
@@ -245,7 +243,6 @@ function fnRecordInstall() {
preinput = { pisCSCF: 'y', updateMFetc: 'No', updateMFshare: 'No' }; preinput = { pisCSCF: 'y', updateMFetc: 'No', updateMFshare: 'No' };
} }
const res = await operateNeVersion({ const res = await operateNeVersion({
coreUid: from.coreUid,
neUid: from.neUid, neUid: from.neUid,
neType: from.neType, neType: from.neType,
action: 'install', action: 'install',
@@ -290,12 +287,11 @@ function fnStepNext() {
} }
onMounted(() => { onMounted(() => {
const { neType,neUid, coreUid } = stepState.neInfo; const { neType, neUid } = stepState.neInfo;
if (neType && neUid && coreUid) { if (neType && neUid) {
tableState.queryParams.neType = neType; tableState.queryParams.neType = neType;
state.from.neUid = neUid; state.from.neUid = neUid;
state.from.neType = neType; state.from.neType = neType;
state.from.coreUid = coreUid;
fnGetList(1); fnGetList(1);
} }
}); });

View File

@@ -16,7 +16,6 @@ type StateType = {
openByFile: boolean; openByFile: boolean;
/**授权信息数据 */ /**授权信息数据 */
from: { from: {
coreUid: string;
neUid: string; neUid: string;
neType: string; neType: string;
// 下面是状态检查结果 // 下面是状态检查结果
@@ -36,7 +35,6 @@ type StateType = {
let state: StateType = reactive({ let state: StateType = reactive({
openByFile: false, openByFile: false,
from: { from: {
coreUid: '',
neUid: '', neUid: '',
neType: '', neType: '',
// 下面是状态检查结果 // 下面是状态检查结果
@@ -62,7 +60,7 @@ function fnModalOk(e: any) {
return; return;
} }
if (state.timeCount % 5 === 0) { if (state.timeCount % 5 === 0) {
stateNeLicense(e.neType, e.neId).then(res => { stateNeLicense(e.neId).then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data) { if (res.code === RESULT_CODE_SUCCESS && res.data) {
state.from.sn = res.data.sn; state.from.sn = res.data.sn;
state.from.expire = res.data.expire; state.from.expire = res.data.expire;
@@ -97,18 +95,17 @@ function fnStepEnd() {
} }
onMounted(() => { onMounted(() => {
const { coreUid, neUid } = stepState.neInfo; const { neUid } = stepState.neInfo;
if (coreUid && neUid) { if (neUid) {
state.from.coreUid = coreUid;
state.from.neUid = neUid; state.from.neUid = neUid;
state.confirmLoading = true; state.confirmLoading = true;
stateNeLicense(coreUid, neUid) stateNeLicense(neUid)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS && res.data) { if (res.code === RESULT_CODE_SUCCESS && res.data) {
state.from.sn = res.data.sn; state.from.sn = res.data.sn;
state.from.expire = res.data.expire; state.from.expire = res.data.expire;
} else { } else {
return codeNeLicense(coreUid, neUid); return codeNeLicense(neUid);
} }
}) })
.finally(() => { .finally(() => {
@@ -181,8 +178,7 @@ onUnmounted(() => {
<EditModal <EditModal
v-model:open="state.openByFile" v-model:open="state.openByFile"
:ne-type="state.from.neType" :ne-type="state.from.neType"
:ne-uid="state.from.neUid" :ne-uid="state.from.neUid"
:core-uid="state.from.coreUid"
:reload="true" :reload="true"
@ok="fnModalOk" @ok="fnModalOk"
@cancel="fnModalCancel" @cancel="fnModalCancel"

View File

@@ -17,7 +17,6 @@ import { parseDateToStr } from '@/utils/date-utils';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useMaskStore from '@/store/modules/mask'; import useMaskStore from '@/store/modules/mask';
import { currentCoreUid } from '@/hooks/useCoreUid';
const maskStore = useMaskStore(); const maskStore = useMaskStore();
const neStore = useNeStore(); const neStore = useNeStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -36,8 +35,6 @@ let dictStatus = ref<DictType[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: undefined, neType: undefined,
/**当前页数 */ /**当前页数 */
@@ -327,7 +324,6 @@ function fnRecordVersion(
operateNeVersion({ operateNeVersion({
neType: row.neType, neType: row.neType,
neUid: row.neUid, neUid: row.neUid,
coreUid: row.coreUid,
action: action, action: action,
preinput: preinput, preinput: preinput,
}) })
@@ -597,8 +593,7 @@ onMounted(() => {
<a-tooltip <a-tooltip
placement="topRight" placement="topRight"
v-if=" v-if="
record.version && record.version && (record.path === '' || record.path === '-')
(record.path === '' || record.path === '-')
" "
> >
<template #title> <template #title>

View File

@@ -21,7 +21,6 @@ import useDictStore from '@/store/modules/dict';
import useTabsStore from '@/store/modules/tabs'; import useTabsStore from '@/store/modules/tabs';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
@@ -34,8 +33,6 @@ const wk = new wkUtil.WK();
const traceId = ref<string>(route.query.traceId as string); const traceId = ref<string>(route.query.traceId as string);
/**任务编号 */ /**任务编号 */
const id = ref<string>(route.query.id as string); const id = ref<string>(route.query.id as string);
/**核心uid */
const coreUid = currentCoreUid();
/**关闭跳转 */ /**关闭跳转 */
function fnClose() { function fnClose() {
@@ -593,7 +590,7 @@ onBeforeUnmount(() => {
<strong>{{ traceId }}</strong> <strong>{{ traceId }}</strong>
</span> </span>
<!-- 任务信息 --> <!-- 任务信息 -->
<TaskInfoIcon :coreUid="coreUid" :id="id" /> <TaskInfoIcon :id="id" />
</a-space> </a-space>
</template> </template>

View File

@@ -6,7 +6,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils'; import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { import {
addTraceTask, addTraceTask,
delTraceTask, delTraceTask,
@@ -23,11 +22,6 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
coreUid: {
type: String,
default: '',
required: true,
},
id: { id: {
type: Number, type: Number,
default: 0, default: 0,
@@ -65,7 +59,8 @@ type ModalStateType = {
/**表单数据 */ /**表单数据 */
from: { from: {
id?: string; id?: string;
neList: string; // 网元列表 neType_neUid 例如 UDM_001,AMF_001 coreId: number; // 核心网元ID
neIds: string; // 网元ID列表 例如 1,3
startTime?: number; startTime?: number;
endTime?: number; endTime?: number;
title: string; title: string;
@@ -96,8 +91,8 @@ let modalState: ModalStateType = reactive({
timeRangePicker: undefined, timeRangePicker: undefined,
from: { from: {
id: undefined, id: undefined,
coreUid: currentCoreUid(), coreId: 0,
neList: '', neIds: '',
traceId: undefined, traceId: undefined,
startTime: undefined, startTime: undefined,
endTime: undefined, endTime: undefined,
@@ -190,16 +185,16 @@ function fnNeChange(p: any, c: any) {
const v = p[i]; const v = p[i];
if (v.length === 1) { if (v.length === 1) {
c[i][0].children.forEach((item: any) => { c[i][0].children.forEach((item: any) => {
neList.push(`${item.neType}_${item.neUid}`); neList.push(`${item.id}`);
}); });
} else if (v.length === 2) { } else if (v.length === 2) {
neList.push(`${v[0]}_${v[1]}`); neList.push(`${v[0]}_${v[1]}`);
} }
} }
if (neList.length > 0) { if (neList.length > 0) {
modalState.from.neList = neList.join(','); modalState.from.neIds = neList.join(',');
} else { } else {
modalState.from.neList = ''; modalState.from.neIds = '';
} }
} }
@@ -242,7 +237,7 @@ function fnModalOpenByEdit() {
if (modalState.confirmLoading) return; if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true; modalState.confirmLoading = true;
getTraceTask(props.coreUid, props.id).then(res => { getTraceTask(props.id).then(res => {
modalState.confirmLoading = false; modalState.confirmLoading = false;
hide(); hide();
if (res.code === RESULT_CODE_SUCCESS && res.data) { if (res.code === RESULT_CODE_SUCCESS && res.data) {

View File

@@ -9,11 +9,6 @@ const { t } = useI18n();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const props = defineProps({ const props = defineProps({
coreUid: {
type: String,
default: '',
required: true,
},
id: { id: {
type: [String, Number], type: [String, Number],
default: 0, default: 0,
@@ -36,7 +31,7 @@ const task = ref<Record<string, any>>({});
/**查询任务信息 */ /**查询任务信息 */
function fnGetTaskInfo() { function fnGetTaskInfo() {
getTraceTask(props.coreUid, props.id).then(res => { getTraceTask(props.id).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(task.value, res.data); Object.assign(task.value, res.data);
task.value.neList = task.value.neList task.value.neList = task.value.neList

View File

@@ -15,7 +15,6 @@ import useI18n from '@/hooks/useI18n';
import { getTraceData, listTraceData } from '@/api/trace/task'; import { getTraceData, listTraceData } from '@/api/trace/task';
import { decode } from 'js-base64'; import { decode } from 'js-base64';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const tabsStore = useTabsStore(); const tabsStore = useTabsStore();
@@ -25,9 +24,7 @@ const route = useRoute();
/**跟踪编号 */ /**跟踪编号 */
const traceId = ref<string>(route.query.traceId as string); const traceId = ref<string>(route.query.traceId as string);
/**任务编号 */ /**任务编号 */
const id = ref<string>(route.query.id as string); const id = ref<string>(route.query.id as string);
/**核心uid */
const coreUid = currentCoreUid();
/**关闭跳转 */ /**关闭跳转 */
function fnClose() { function fnClose() {
@@ -436,7 +433,7 @@ onMounted(() => {
<strong>{{ traceId }}</strong> <strong>{{ traceId }}</strong>
</span> </span>
<!-- 任务信息 --> <!-- 任务信息 -->
<TaskInfoIcon :coreUid="coreUid" :id="id" /> <TaskInfoIcon :id="id" />
</a-space> </a-space>
</template> </template>

View File

@@ -29,7 +29,6 @@ import {
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
import { parseObjHumpToLine } from '@/utils/parse-utils'; import { parseObjHumpToLine } from '@/utils/parse-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -58,8 +57,6 @@ let neCascaderOptions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元类型 */ /**网元类型 */
neType: '', neType: '',
/**开始时间 */ /**开始时间 */
@@ -69,7 +66,7 @@ let queryParams = reactive({
/**标题 */ /**标题 */
title: '', title: '',
/**排序字段 */ /**排序字段 */
sortField: 'start_time', sortField: 'endTime',
/**排序方式 */ /**排序方式 */
sortOrder: 'asc', sortOrder: 'asc',
/**当前页数 */ /**当前页数 */
@@ -210,7 +207,6 @@ function fnTableSelectedRowKeys(keys: (string | number)[], rows: any[]) {
tableState.selectedRows = rows.map(item => { tableState.selectedRows = rows.map(item => {
return { return {
id: item.id, id: item.id,
coreUid: item.coreUid,
}; };
}); });
} }
@@ -245,13 +241,11 @@ function fnRecordDelete(id: string) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
let reqArr: any = []; let reqArr: any = [];
if (id === '0') { if (id === '0') {
tableState.selectedRows.forEach(item => { reqArr.push(delTraceTask(tableState.selectedRowKeys.join(',')));
reqArr.push(delTraceTask(item.coreUid, item.id));
});
} else { } else {
tableState.data.forEach(item => { tableState.data.forEach(item => {
if (item.id === id) { if (item.id === id) {
reqArr.push(delTraceTask(item.coreUid, item.id)); reqArr.push(delTraceTask(item.id));
} }
}); });
} }
@@ -320,14 +314,12 @@ function fnGetList(pageNum?: number) {
type ModalStateType = { type ModalStateType = {
open: boolean; open: boolean;
id: number; id: number;
coreUid: string;
}; };
/**对话框对象信息状态 */ /**对话框对象信息状态 */
let modalState: ModalStateType = reactive({ let modalState: ModalStateType = reactive({
open: false, open: false,
id: 0, id: 0,
coreUid: '',
}); });
/** /**
@@ -336,7 +328,6 @@ let modalState: ModalStateType = reactive({
*/ */
function fnModalOpenByEdit(id: number) { function fnModalOpenByEdit(id: number) {
modalState.id = id; modalState.id = id;
modalState.coreUid = currentCoreUid();
nextTick(() => { nextTick(() => {
modalState.open = !modalState.open; modalState.open = !modalState.open;
}); });
@@ -355,7 +346,6 @@ function fnModalEditOk(from: Record<string, any>) {
* 进行表达规则校验 * 进行表达规则校验
*/ */
function fnModalEditCancel() { function fnModalEditCancel() {
modalState.coreUid = '';
modalState.id = 0; modalState.id = 0;
modalState.open = false; modalState.open = false;
} }
@@ -609,7 +599,6 @@ onMounted(() => {
<!-- 新增框或修改框 --> <!-- 新增框或修改框 -->
<EditModal <EditModal
v-model:open="modalState.open" v-model:open="modalState.open"
:core-uid="modalState.coreUid"
:id="modalState.id" :id="modalState.id"
:options="neCascaderOptions" :options="neCascaderOptions"
@ok="fnModalEditOk" @ok="fnModalEditOk"

View File

@@ -18,8 +18,7 @@ import { OptionsType, WS } from '@/plugins/ws-websocket';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_AMF_UE } from '@/constants/ne-constants'; import { WS_GROUP_AMF_UE } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
@@ -66,9 +65,7 @@ let rangePickerPresets = ref([
]); ]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
eventType: '', eventType: '',
@@ -390,8 +387,7 @@ const realTimeData = ref<boolean>(false);
function fnRealTime() { function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
@@ -399,9 +395,9 @@ function fnRealTime() {
params: { params: {
/**订阅通道组 /**订阅通道组
* *
* AMF_UE会话事件(GroupID:1010_coreUid_neUid) * AMF_UE会话事件(GroupID:1010_neUid)
*/ */
subGroupID: `${WS_GROUP_AMF_UE}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_AMF_UE}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -428,10 +424,9 @@ function wsMessage(res: Record<string, any>) {
if (!data?.groupId) { if (!data?.groupId) {
return; return;
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// ueEvent AMF_UE会话事件 // ueEvent AMF_UE会话事件
if (data.groupId === `${WS_GROUP_AMF_UE}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_AMF_UE}_${neUid}`) {
const ueEvent = data.data; const ueEvent = data.data;
queue.add(async () => { queue.add(async () => {
modalState.maxId += 1; modalState.maxId += 1;

View File

@@ -10,7 +10,6 @@ import useNeStore from '@/store/modules/ne';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { listAMFNblist } from '@/api/neDataNf/amf'; import { listAMFNblist } from '@/api/neDataNf/amf';
import { listMMENblist } from '@/api/neDataNf/mme'; import { listMMENblist } from '@/api/neDataNf/mme';
import { currentCoreUid } from '@/hooks/useCoreUid';
const neStore = useNeStore(); const neStore = useNeStore();
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@@ -20,8 +19,6 @@ let neCascaderOptions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: '', neUid: '',
/**网元类型 */ /**网元类型 */
@@ -158,7 +155,6 @@ function fnGetList(pageNum?: number) {
item.children.forEach((child: any) => { item.children.forEach((child: any) => {
let resq = null; let resq = null;
let s = { let s = {
coreUid: queryParams.coreUid,
neUid: child.neUid, neUid: child.neUid,
neType: child.neType, neType: child.neType,
nbId: queryParams.id, nbId: queryParams.id,
@@ -222,7 +218,6 @@ function fnGetList(pageNum?: number) {
let toBack: Record<string, any> = { let toBack: Record<string, any> = {
neType: queryParams.neType[0], neType: queryParams.neType[0],
neUid: queryParams.neType[1], neUid: queryParams.neType[1],
coreUid: queryParams.coreUid,
nbId: queryParams.id, nbId: queryParams.id,
pageNum: queryParams.pageNum, pageNum: queryParams.pageNum,
pageSize: queryParams.pageSize, pageSize: queryParams.pageSize,

View File

@@ -9,7 +9,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useI18n from '@/hooks/useI18n'; import useI18n from '@/hooks/useI18n';
import { exportNBState, listNBState } from '@/api/neData/nb-state'; import { exportNBState, listNBState } from '@/api/neData/nb-state';
import { Dayjs } from 'dayjs'; import { Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const emit = defineEmits(['cancel', 'update:open']); const emit = defineEmits(['cancel', 'update:open']);
const props = defineProps({ const props = defineProps({
@@ -21,17 +20,12 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: false, default: false,
}, },
/**网元ID */ /**网元标识 */
neUid: { neUid: {
type: String, type: String,
default: '', default: '',
required: true, required: true,
}, },
coreUid: {
type: String,
default: '',
required: true,
},
}); });
/**开始结束时间 */ /**开始结束时间 */
@@ -54,8 +48,6 @@ const nbStateOptions = ref<DictType[]>([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: props.coreUid,
/**网元标识 */ /**网元标识 */
neUid: props.neUid, neUid: props.neUid,
/**排序字段 */ /**排序字段 */
@@ -285,7 +277,6 @@ watch(
() => props.open, () => props.open,
val => { val => {
if (val) { if (val) {
queryParams.coreUid = props.coreUid;
queryParams.neUid = props.neUid; queryParams.neUid = props.neUid;
// 获取列表数据 // 获取列表数据
fnGetList(); fnGetList();

View File

@@ -31,7 +31,6 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { readSheet, writeSheet } from '@/utils/execl-utils'; import { readSheet, writeSheet } from '@/utils/execl-utils';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { currentCoreUid } from '@/hooks/useCoreUid';
const route = useRoute(); const route = useRoute();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -61,8 +60,6 @@ let neCascaderOptions = ref<Record<string, any>[]>([]);
let neTypeAndId = ref<string[]>([]); let neTypeAndId = ref<string[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: '', neUid: '',
/**IMSI */ /**IMSI */
@@ -222,7 +219,6 @@ function fnRecordDelete(index: string) {
title: t('common.tipTitle'), title: t('common.tipTitle'),
content: msg, content: msg,
onOk() { onOk() {
const coreUid = currentCoreUid();
const reqArr = []; const reqArr = [];
if (index === '0') { if (index === '0') {
if (tableState.selectedRowKeys.length <= 0) { if (tableState.selectedRowKeys.length <= 0) {
@@ -230,18 +226,18 @@ function fnRecordDelete(index: string) {
} }
for (const v of tableState.selectedRowKeys) { for (const v of tableState.selectedRowKeys) {
if (neType === 'MME') { if (neType === 'MME') {
reqArr.push(delMMENbState(coreUid, neUid, v)); reqArr.push(delMMENbState(neUid, v));
} }
if (neType === 'AMF') { if (neType === 'AMF') {
reqArr.push(delAMFNbState(coreUid, neUid, v)); reqArr.push(delAMFNbState(neUid, v));
} }
} }
} else { } else {
if (neType === 'MME') { if (neType === 'MME') {
reqArr.push(delMMENbState(coreUid, neUid, index)); reqArr.push(delMMENbState(neUid, index));
} }
if (neType === 'AMF') { if (neType === 'AMF') {
reqArr.push(delAMFNbState(coreUid, neUid, index)); reqArr.push(delAMFNbState(neUid, index));
} }
} }
if (reqArr.length <= 0) return; if (reqArr.length <= 0) return;
@@ -408,7 +404,6 @@ function fnModalVisibleByEdit(edit?: string | number) {
function fnModalOk() { function fnModalOk() {
const [neType, neUid] = neTypeAndId.value; const [neType, neUid] = neTypeAndId.value;
if (!neUid) return; if (!neUid) return;
const coreUid = currentCoreUid();
const from = JSON.parse(JSON.stringify(modalState.from)); const from = JSON.parse(JSON.stringify(modalState.from));
modalStateFrom modalStateFrom
.validate() .validate()
@@ -418,13 +413,13 @@ function fnModalOk() {
let result: any = null; let result: any = null;
if (neType === 'MME') { if (neType === 'MME') {
result = from.state result = from.state
? editMMENbState(coreUid, neUid, from) ? editMMENbState(neUid, from)
: addMMENbState(coreUid, neUid, from); : addMMENbState(neUid, from);
} }
if (neType === 'AMF') { if (neType === 'AMF') {
result = from.state result = from.state
? editAMFNbState(coreUid, neUid, from) ? editAMFNbState(neUid, from)
: addAMFNbState(coreUid, neUid, from); : addAMFNbState(neUid, from);
} }
if (result === null) { if (result === null) {
return; return;
@@ -565,7 +560,6 @@ function fnModalImportUpload(file: File) {
return; return;
} }
// 开始导入 // 开始导入
const coreUid = currentCoreUid();
modalState.confirmLoading = true; modalState.confirmLoading = true;
for (const row of rows) { for (const row of rows) {
const rowId = row[t('common.rowId')]; const rowId = row[t('common.rowId')];
@@ -581,7 +575,6 @@ function fnModalImportUpload(file: File) {
// 定义则更新名称位置 // 定义则更新名称位置
if (neType === 'MME') { if (neType === 'MME') {
result = await editMMENbState( result = await editMMENbState(
coreUid,
neUid, neUid,
Object.assign({}, hasAddress, { Object.assign({}, hasAddress, {
name, name,
@@ -591,7 +584,6 @@ function fnModalImportUpload(file: File) {
} }
if (neType === 'AMF') { if (neType === 'AMF') {
result = await editAMFNbState( result = await editAMFNbState(
coreUid,
neUid, neUid,
Object.assign({}, hasAddress, { Object.assign({}, hasAddress, {
name, name,
@@ -617,10 +609,10 @@ function fnModalImportUpload(file: File) {
address: `${address}`, address: `${address}`,
}; };
if (neType === 'MME') { if (neType === 'MME') {
result = await addMMENbState(coreUid, neUid, form); result = await addMMENbState(neUid, form);
} }
if (neType === 'AMF') { if (neType === 'AMF') {
result = await addAMFNbState(coreUid, neUid, form); result = await addAMFNbState(neUid, form);
} }
let msg = `${t('common.rowId')}: ${rowId} ${t( let msg = `${t('common.rowId')}: ${rowId} ${t(
'views.neData.baseStation.addRadio' 'views.neData.baseStation.addRadio'
@@ -917,7 +909,6 @@ onMounted(() => {
:title="t('views.neData.baseStation.history')" :title="t('views.neData.baseStation.history')"
:ne-type="neTypeAndId[0]" :ne-type="neTypeAndId[0]"
:ne-uid="neTypeAndId[1]" :ne-uid="neTypeAndId[1]"
:core-uid="queryParams.coreUid"
@cancel="fnModalCancel" @cancel="fnModalCancel"
></HistoryModal> ></HistoryModal>

View File

@@ -394,7 +394,6 @@ async function fnGraphDataBase() {
img: parseBasePath('/svg/service_db.svg'), img: parseBasePath('/svg/service_db.svg'),
nInfo: { nInfo: {
online: false, online: false,
coreUid: omcInfo.coreUid,
neUid: omcInfo.neUid, neUid: omcInfo.neUid,
neType: omcInfo.neType, neType: omcInfo.neType,
}, },
@@ -407,14 +406,13 @@ async function fnGraphDataBase() {
if (['AMF', 'MME'].includes(item.value)) { if (['AMF', 'MME'].includes(item.value)) {
if (item.children?.length === 0) continue; if (item.children?.length === 0) continue;
for (const child of item.children) { for (const child of item.children) {
const id = `${child.coreUid}_${child.neUid}`; const id = `${child.neType}_${child.neUid}`;
const node = { const node = {
id: id, id: id,
label: child.neName, label: child.neName,
img: parseBasePath('/svg/service.svg'), img: parseBasePath('/svg/service.svg'),
nInfo: { nInfo: {
online: false, online: false,
coreUid: child.coreUid,
neUid: child.neUid, neUid: child.neUid,
neType: child.neType, neType: child.neType,
}, },
@@ -440,9 +438,8 @@ async function fnGraphDataNb(data: GraphData) {
if (arr === undefined || arr.length === 0) return data; if (arr === undefined || arr.length === 0) return data;
for (const item of arr) { for (const item of arr) {
if (item.nType === 'AMF') { if (item.nType === 'AMF') {
const coreUid = (item.nInfo as any).coreUid;
const neUid = (item.nInfo as any).neUid; const neUid = (item.nInfo as any).neUid;
const res = await listAMFNbStatelist({ coreUid, neUid }); const res = await listAMFNbStatelist({ neUid });
if (res.code !== RESULT_CODE_SUCCESS || !Array.isArray(res.data)) { if (res.code !== RESULT_CODE_SUCCESS || !Array.isArray(res.data)) {
continue; continue;
} }
@@ -462,12 +459,8 @@ async function fnGraphDataNb(data: GraphData) {
} }
} }
if (item.nType === 'MME') { if (item.nType === 'MME') {
const coreUid = (item.nInfo as any).coreUid;
const neUid = (item.nInfo as any).neUid; const neUid = (item.nInfo as any).neUid;
const res = await listMMENbStatelist({ const res = await listMMENbStatelist({ neUid });
coreUid,
neUid,
});
if (res.code !== RESULT_CODE_SUCCESS || !Array.isArray(res.data)) { if (res.code !== RESULT_CODE_SUCCESS || !Array.isArray(res.data)) {
continue; continue;
} }
@@ -502,7 +495,7 @@ async function fnGraphState(reload: boolean = false) {
if (onc) { if (onc) {
const { id, nInfo } = onc as any; const { id, nInfo } = onc as any;
if (!nInfo) return; if (!nInfo) return;
const res = await stateNeInfo(nInfo.coreUid, nInfo.neUid); const res = await stateNeInfo(nInfo.neUid);
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(nInfo, res.data, { Object.assign(nInfo, res.data, {
refreshTime: parseDateToStr(res.data.refreshTime, 'HH:mm:ss'), refreshTime: parseDateToStr(res.data.refreshTime, 'HH:mm:ss'),
@@ -517,7 +510,7 @@ async function fnGraphState(reload: boolean = false) {
.forEach(async (v: any) => { .forEach(async (v: any) => {
const { id, nInfo } = v; const { id, nInfo } = v;
if (!nInfo) return; if (!nInfo) return;
const res = await stateNeInfo(nInfo.coreUid, nInfo.neUid); const res = await stateNeInfo(nInfo.neUid);
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
Object.assign(nInfo, res.data, { Object.assign(nInfo, res.data, {
refreshTime: parseDateToStr(res.data.refreshTime, 'HH:mm:ss'), refreshTime: parseDateToStr(res.data.refreshTime, 'HH:mm:ss'),
@@ -529,7 +522,6 @@ async function fnGraphState(reload: boolean = false) {
// 重载时更新下级基站状态 // 重载时更新下级基站状态
if (reload && nInfo.neType === 'AMF') { if (reload && nInfo.neType === 'AMF') {
const res = await listAMFNbStatelist({ const res = await listAMFNbStatelist({
coreUid: nInfo.coreUid,
neUid: nInfo.neUid, neUid: nInfo.neUid,
}); });
if (res.code == RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code == RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
@@ -551,7 +543,6 @@ async function fnGraphState(reload: boolean = false) {
} }
if (reload && nInfo.neType === 'MME') { if (reload && nInfo.neType === 'MME') {
const res = await listMMENbStatelist({ const res = await listMMENbStatelist({
coreUid: nInfo.coreUid,
neUid: nInfo.neUid, neUid: nInfo.neUid,
}); });
if (res.code == RESULT_CODE_SUCCESS && Array.isArray(res.data)) { if (res.code == RESULT_CODE_SUCCESS && Array.isArray(res.data)) {

View File

@@ -23,7 +23,6 @@ import saveAs from 'file-saver';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_IMS_CDR } from '@/constants/ne-constants'; import { WS_GROUP_IMS_CDR } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
@@ -72,8 +71,6 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
recordType: '', recordType: '',
@@ -448,7 +445,6 @@ function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
@@ -458,7 +454,7 @@ function fnRealTime() {
* *
* IMS_CDR会话事件(GroupID:1005) * IMS_CDR会话事件(GroupID:1005)
*/ */
subGroupID: `${WS_GROUP_IMS_CDR}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_IMS_CDR}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -486,9 +482,8 @@ function wsMessage(res: Record<string, any>) {
return; return;
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// cdrEvent CDR会话事件 // cdrEvent CDR会话事件
if (data.groupId === `${WS_GROUP_IMS_CDR}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_IMS_CDR}_${neUid}`) {
const cdrEvent = data.data; const cdrEvent = data.data;
let cdrJSON = {}; let cdrJSON = {};
try { try {

View File

@@ -9,7 +9,6 @@ import useNeStore from '@/store/modules/ne';
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';
import { listIMSSessionList } from '@/api/neDataNf/ims'; import { listIMSSessionList } from '@/api/neDataNf/ims';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -18,8 +17,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**IMSI */ /**IMSI */

View File

@@ -13,13 +13,16 @@ import {
} from '@/constants/result-constants'; } from '@/constants/result-constants';
import useDictStore from '@/store/modules/dict'; import useDictStore from '@/store/modules/dict';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { listMMEDataUE, delMMEDataUE, exportMMEDataUE } from '@/api/neDataNf/mme'; import {
listMMEDataUE,
delMMEDataUE,
exportMMEDataUE,
} from '@/api/neDataNf/mme';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket'; import { OptionsType, WS } from '@/plugins/ws-websocket';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_MME_UE } from '@/constants/ne-constants'; import { WS_GROUP_MME_UE } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
@@ -68,13 +71,11 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
eventType: '', eventType: '',
imsi: '', imsi: '',
sortField: 'timestamp', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**开始时间 */ /**开始时间 */
beginTime: undefined as undefined | number, beginTime: undefined as undefined | number,
@@ -392,18 +393,17 @@ const realTimeData = ref<boolean>(false);
function fnRealTime() { function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
url: '/ws', url: '/ws',
params: { params: {
/**订阅通道组 /**订阅通道组
* *
* MME_UE会话事件(GroupID:1011_coreUid_neUid) * MME_UE会话事件(GroupID:1011_neUid)
*/ */
subGroupID: `${WS_GROUP_MME_UE}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_MME_UE}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -431,7 +431,7 @@ function wsMessage(res: Record<string, any>) {
return; return;
} }
// ueEvent MME_UE会话事件 // ueEvent MME_UE会话事件
if (data.groupId === `${WS_GROUP_MME_UE}_${queryParams.coreUid}_${queryParams.neUid}`) { if (data.groupId === `${WS_GROUP_MME_UE}_${queryParams.neUid}`) {
const ueEvent = data.data; const ueEvent = data.data;
queue.add(async () => { queue.add(async () => {
modalState.maxId += 1; modalState.maxId += 1;

View File

@@ -9,7 +9,6 @@ import { listN3IWFSubList } from '@/api/neDataNf/n3iwf';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
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';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
@@ -17,8 +16,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**imsi */ /**imsi */

View File

@@ -7,7 +7,6 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { listNSSFAmfList } from '@/api/neDataNf/nssf'; import { listNSSFAmfList } from '@/api/neDataNf/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';
import { currentCoreUid } from '@/hooks/useCoreUid';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
const { t } = useI18n(); const { t } = useI18n();
@@ -17,8 +16,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**imsi */ /**imsi */

View File

@@ -7,7 +7,6 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { listNSSFSubList } from '@/api/neDataNf/nssf'; import { listNSSFSubList } from '@/api/neDataNf/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';
import { currentCoreUid } from '@/hooks/useCoreUid';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
const { t } = useI18n(); const { t } = useI18n();
@@ -17,8 +16,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**imsi */ /**imsi */
@@ -73,7 +70,7 @@ let tableColumns: ColumnsType = [
{ {
title: 'Event', title: 'Event',
dataIndex: 'event', dataIndex: 'event',
align: 'left', align: 'left',
}, },
]; ];

View File

@@ -20,7 +20,6 @@ import { getPCFRule } from '@/api/ne/neConfig';
import { uploadFileToNE } from '@/api/tool/file'; import { uploadFileToNE } from '@/api/tool/file';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { saveAs } from 'file-saver'; import { saveAs } from 'file-saver';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
@@ -37,8 +36,6 @@ const pcfRuleOption = ref<Record<string, any[]>>({
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**移动编号 */ /**移动编号 */
@@ -283,8 +280,7 @@ const modalStateFrom = Form.useForm(
*/ */
function fnModalVisibleByEdit(row?: Record<string, any>) { function fnModalVisibleByEdit(row?: Record<string, any>) {
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; getPCFRule(neUid)
getPCFRule(coreUid, neUid)
.then((data: any) => { .then((data: any) => {
pcfRuleOption.value = data; pcfRuleOption.value = data;
}) })
@@ -336,7 +332,6 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
function fnModalOk() { function fnModalOk() {
const from = JSON.parse(JSON.stringify(modalState.from)); const from = JSON.parse(JSON.stringify(modalState.from));
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-';
from.rfsp = Number(from.rfsp) || 0; from.rfsp = Number(from.rfsp) || 0;
// 处理多选框数据 // 处理多选框数据
let pccRules = modalState.from.pccRules; let pccRules = modalState.from.pccRules;
@@ -375,7 +370,6 @@ function fnModalOk() {
if (modalState.isBatch) { if (modalState.isBatch) {
if (modalState.type === 'add') { if (modalState.type === 'add') {
result = addPCFRule({ result = addPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
num: from.num, num: from.num,
paramData: from, paramData: from,
@@ -383,7 +377,6 @@ function fnModalOk() {
} }
if (modalState.type === 'update') { if (modalState.type === 'update') {
result = editPCFRule({ result = editPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
num: from.num, num: from.num,
paramData: from, paramData: from,
@@ -391,7 +384,6 @@ function fnModalOk() {
} }
if (modalState.type === 'delete') { if (modalState.type === 'delete') {
result = delPCFRule({ result = delPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
num: from.num, num: from.num,
imsi: from.imsi, imsi: from.imsi,
@@ -400,7 +392,6 @@ function fnModalOk() {
} else { } else {
if (modalState.type === 'add') { if (modalState.type === 'add') {
result = addPCFRule({ result = addPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
num: 0, num: 0,
paramData: from, paramData: from,
@@ -408,7 +399,6 @@ function fnModalOk() {
} }
if (modalState.type === 'update') { if (modalState.type === 'update') {
result = editPCFRule({ result = editPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
num: 0, num: 0,
paramData: from, paramData: from,
@@ -477,8 +467,7 @@ function fnModalCancel() {
*/ */
function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') { function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; getPCFRule(neUid)
getPCFRule(coreUid, neUid)
.then((data: any) => { .then((data: any) => {
pcfRuleOption.value = data; pcfRuleOption.value = data;
console.log(data); console.log(data);
@@ -509,8 +498,7 @@ function fnModalVisibleByBatch(type: 'delete' | 'add' | 'update') {
*/ */
function fnRecordDelete(imsi: string) { function fnRecordDelete(imsi: string) {
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; if (!neUid) return;
if (!coreUid || !neUid) return;
let imsiMsg = imsi; let imsiMsg = imsi;
if (imsi === '0') { if (imsi === '0') {
imsiMsg = `${tableState.selectedRowKeys[0]}... ${tableState.selectedRowKeys.length}`; imsiMsg = `${tableState.selectedRowKeys[0]}... ${tableState.selectedRowKeys.length}`;
@@ -523,7 +511,6 @@ function fnRecordDelete(imsi: string) {
onOk() { onOk() {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
delPCFRule({ delPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
imsi: imsi, imsi: imsi,
}) })
@@ -551,11 +538,9 @@ function fnRecordDelete(imsi: string) {
/**列表导出 */ /**列表导出 */
function fnExportList(type: string) { function fnExportList(type: string) {
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; if (!neUid) return;
if (!coreUid || !neUid) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
exportPCFRule({ exportPCFRule({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
fileType: type, fileType: type,
}) })
@@ -640,14 +625,13 @@ function fnModalUploadImportClose() {
/**对话框表格信息导入上传 */ /**对话框表格信息导入上传 */
function fnModalUploadImportUpload(file: File) { function fnModalUploadImportUpload(file: File) {
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; if (!neUid) {
if (!neUid || !coreUid) {
return Promise.reject('Unknown network element'); return Promise.reject('Unknown network element');
} }
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
uploadImportState.loading = true; uploadImportState.loading = true;
// 上传文件 // 上传文件
uploadFileToNE('PCF', neUid, coreUid, file, 3) uploadFileToNE('PCF', neUid, file, 3)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
return res.data; return res.data;
@@ -662,7 +646,6 @@ function fnModalUploadImportUpload(file: File) {
// 文件导入 // 文件导入
return importPCFRule({ return importPCFRule({
neUid: neUid, neUid: neUid,
coreUid: coreUid,
fileType: 'txt', fileType: 'txt',
filePath: filePath, filePath: filePath,
}); });

View File

@@ -21,7 +21,6 @@ import dayjs, { type Dayjs } from 'dayjs';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_SGWC_CDR } from '@/constants/ne-constants'; import { WS_GROUP_SGWC_CDR } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
@@ -55,8 +54,6 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
imsi: '', imsi: '',
@@ -418,7 +415,6 @@ function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
@@ -428,7 +424,7 @@ function fnRealTime() {
* *
* CDR会话事件-SGWC (GroupID:1008_neId) * CDR会话事件-SGWC (GroupID:1008_neId)
*/ */
subGroupID: `${WS_GROUP_SGWC_CDR}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_SGWC_CDR}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -456,9 +452,8 @@ function wsMessage(res: Record<string, any>) {
return; return;
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// cdrEvent CDR会话事件 // cdrEvent CDR会话事件
if (data.groupId === `${WS_GROUP_SGWC_CDR}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_SGWC_CDR}_${neUid}`) {
const cdrEvent = data.data; const cdrEvent = data.data;
let cdrJSON = {}; let cdrJSON = {};
try { try {

View File

@@ -37,8 +37,7 @@ import { parseSizeFromByte } from '@/utils/parse-utils';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
import dayjs, { Dayjs } from 'dayjs'; import dayjs, { Dayjs } from 'dayjs';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_SMF_CDR } from '@/constants/ne-constants'; import { WS_GROUP_SMF_CDR } from '@/constants/ne-constants';
const { t, currentLocale } = useI18n(); const { t, currentLocale } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -266,14 +265,12 @@ let rangePickerPresets = ref([
]); ]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
subscriberID: '', subscriberID: '',
dnn: '', dnn: '',
sortField: 'timestamp', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**开始时间 */ /**开始时间 */
beginTime: undefined as undefined | number, beginTime: undefined as undefined | number,
@@ -487,7 +484,6 @@ function fnRealTime() {
ws.close(); ws.close();
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
url: '/ws', url: '/ws',
@@ -496,7 +492,7 @@ function fnRealTime() {
* *
* CDR会话事件-SMF (GroupID:1006) * CDR会话事件-SMF (GroupID:1006)
*/ */
subGroupID: `${WS_GROUP_SMF_CDR}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_SMF_CDR}_${neUid}`,
}, },
onmessage: (res: Record<string, any>) => { onmessage: (res: Record<string, any>) => {
const { code, requestId, data } = res; const { code, requestId, data } = res;
@@ -510,7 +506,7 @@ function fnRealTime() {
return; return;
} }
// cdrEvent CDR会话事件 // cdrEvent CDR会话事件
if (data.groupId === `${WS_GROUP_SMF_CDR}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_SMF_CDR}_${neUid}`) {
const cdrEvent = data.data; const cdrEvent = data.data;
let cdrJSON: any = {}; let cdrJSON: any = {};
try { try {

View File

@@ -21,7 +21,6 @@ import PQueue from 'p-queue';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_SMF_CDR } from '@/constants/ne-constants'; import { WS_GROUP_SMF_CDR } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { t } = useI18n(); const { t } = useI18n();
@@ -55,12 +54,10 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
subscriberID: '', subscriberID: '',
sortField: 'timestamp', sortField: 'createdTime',
sortOrder: 'desc', sortOrder: 'desc',
/**开始时间 */ /**开始时间 */
beginTime: undefined as undefined | number, beginTime: undefined as undefined | number,
@@ -445,7 +442,6 @@ function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
@@ -455,7 +451,7 @@ function fnRealTime() {
* *
* CDR会话事件-SMF (GroupID:1006) * CDR会话事件-SMF (GroupID:1006)
*/ */
subGroupID: `${WS_GROUP_SMF_CDR}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_SMF_CDR}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -483,9 +479,8 @@ function wsMessage(res: Record<string, any>) {
return; return;
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// cdrEvent CDR会话事件 // cdrEvent CDR会话事件
if (data.groupId === `${WS_GROUP_SMF_CDR}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_SMF_CDR}_${neUid}`) {
const cdrEvent = data.data; const cdrEvent = data.data;
let cdrJSON = {}; let cdrJSON = {};
try { try {

View File

@@ -9,17 +9,14 @@ import { ColumnsType } from 'ant-design-vue/es/table';
import { listSMFSubList } from '@/api/neDataNf/smf'; import { listSMFSubList } from '@/api/neDataNf/smf';
import useNeStore from '@/store/modules/ne'; import useNeStore from '@/store/modules/ne';
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';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
let neOtions = ref<Record<string, any>[]>([]); let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
/**IMSI */ /**IMSI */

View File

@@ -24,7 +24,6 @@ import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { hasPermissions } from '@/plugins/auth-user'; import { hasPermissions } from '@/plugins/auth-user';
import dayjs, { type Dayjs } from 'dayjs'; import dayjs, { type Dayjs } from 'dayjs';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { WS_GROUP_SMSC_CDR } from '@/constants/ne-constants'; import { WS_GROUP_SMSC_CDR } from '@/constants/ne-constants';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { getDict } = useDictStore(); const { getDict } = useDictStore();
@@ -67,8 +66,6 @@ let rangePickerPresets = ref([
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元标识 */ /**网元标识 */
neUid: undefined, neUid: undefined,
recordType: '', recordType: '',
@@ -412,7 +409,6 @@ function fnRealTime() {
realTimeData.value = !realTimeData.value; realTimeData.value = !realTimeData.value;
if (realTimeData.value) { if (realTimeData.value) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
tableState.seached = false; tableState.seached = false;
// 建立链接 // 建立链接
const options: OptionsType = { const options: OptionsType = {
@@ -422,7 +418,7 @@ function fnRealTime() {
* *
* SMSC_CDR会话事件(GroupID:1007_neId) * SMSC_CDR会话事件(GroupID:1007_neId)
*/ */
subGroupID: `${WS_GROUP_SMSC_CDR}_${coreUid}_${neUid}`, subGroupID: `${WS_GROUP_SMSC_CDR}_${neUid}`,
}, },
onmessage: wsMessage, onmessage: wsMessage,
onerror: (ev: any) => { onerror: (ev: any) => {
@@ -449,10 +445,9 @@ function wsMessage(res: Record<string, any>) {
if (!data?.groupId) { if (!data?.groupId) {
return; return;
} }
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid;
// cdrEvent CDR会话事件 // cdrEvent CDR会话事件
if (data.groupId === `${WS_GROUP_SMSC_CDR}_${coreUid}_${neUid}`) { if (data.groupId === `${WS_GROUP_SMSC_CDR}_${neUid}`) {
const cdrEvent = data.data; const cdrEvent = data.data;
let cdrJSON = {}; let cdrJSON = {};
try { try {

View File

@@ -24,7 +24,6 @@ import {
} from '@/api/neDataNf/udm_auth'; } from '@/api/neDataNf/udm_auth';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
import { currentCoreUid } from '@/hooks/useCoreUid';
import { parseDateToStr } from '@/utils/date-utils'; import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
@@ -33,8 +32,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元ID */ /**网元ID */
neUid: undefined, neUid: undefined,
/**移动编号 */ /**移动编号 */
@@ -119,7 +116,7 @@ let tableColumns = ref<ColumnsType>([
align: 'left', align: 'left',
width: 100, width: 100,
}, },
{ {
title: 'Create Time', title: 'Create Time',
dataIndex: 'createTime', dataIndex: 'createTime',
align: 'left', align: 'left',
@@ -218,7 +215,6 @@ let modalState: ModalStateType = reactive({
from: { from: {
num: 1, num: 1,
id: undefined, id: undefined,
coreUid: '',
neUid: '', neUid: '',
neType: 'UDM', neType: 'UDM',
imsi: '', imsi: '',
@@ -288,8 +284,7 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true; modalState.confirmLoading = true;
getUDMAuth({ getUDMAuth({
coreUid: row.coreUid, neUid: queryParams.neUid,
neUid: row.neUid,
imsi: row.imsi, imsi: row.imsi,
}) })
.then(res => { .then(res => {
@@ -331,7 +326,6 @@ function fnModalOk() {
modalState.confirmLoading = true; modalState.confirmLoading = true;
const from = toRaw(modalState.from); const from = toRaw(modalState.from);
from.algoIndex = `${from.algoIndex}`; from.algoIndex = `${from.algoIndex}`;
from.coreUid = queryParams.coreUid || '-';
from.neUid = queryParams.neUid || '-'; from.neUid = queryParams.neUid || '-';
from.neType = 'UDM'; from.neType = 'UDM';
const result = from.id ? updateUDMAuth(from) : addUDMAuth(from); const result = from.id ? updateUDMAuth(from) : addUDMAuth(from);
@@ -399,32 +393,29 @@ function fnBatchDelModalOk() {
modalState.confirmLoading = true; modalState.confirmLoading = true;
const from = toRaw(modalState.BatchDelForm); const from = toRaw(modalState.BatchDelForm);
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; delUDMAuth({ neUid, imsi: from.imsi, num: from.num }).then(res => {
delUDMAuth({ coreUid, neUid, imsi: from.imsi, num: from.num }).then( if (res.code === RESULT_CODE_SUCCESS) {
res => { const timerS = Math.ceil(+from.num / 800) + 1;
if (res.code === RESULT_CODE_SUCCESS) { notification.success({
const timerS = Math.ceil(+from.num / 800) + 1; message: modalState.title,
notification.success({ description: t('common.operateOk'),
message: modalState.title, duration: timerS,
description: t('common.operateOk'), });
duration: timerS, setTimeout(() => {
}); modalState.openByBatchDel = false;
setTimeout(() => {
modalState.openByBatchDel = false;
modalState.confirmLoading = false;
modalStateBatchDelFrom.resetFields();
fnGetList(1);
}, timerS * 1000);
} else {
modalState.confirmLoading = false; modalState.confirmLoading = false;
notification.error({ modalStateBatchDelFrom.resetFields();
message: modalState.title, fnGetList(1);
description: res.msg, }, timerS * 1000);
duration: 3, } else {
}); modalState.confirmLoading = false;
} notification.error({
message: modalState.title,
description: res.msg,
duration: 3,
});
} }
); });
}) })
.catch(e => { .catch(e => {
message.error(t('common.errorFields', { num: e.errorFields.length }), 3); message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
@@ -455,8 +446,7 @@ function fnModalCancel() {
*/ */
function fnRecordDelete(imsi: string) { function fnRecordDelete(imsi: string) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
let imsiMsg = imsi; let imsiMsg = imsi;
if (imsi === '0') { if (imsi === '0') {
imsiMsg = `${tableState.selectedRowKeys[0]}... ${t( imsiMsg = `${tableState.selectedRowKeys[0]}... ${t(
@@ -471,7 +461,7 @@ function fnRecordDelete(imsi: string) {
onOk() { onOk() {
modalState.loadDataLoading = true; modalState.loadDataLoading = true;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
delUDMAuth({ coreUid, neUid, imsi, num: 0 }) delUDMAuth({ neUid, imsi, num: 0 })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const msgContent = t('common.msgSuccess', { const msgContent = t('common.msgSuccess', {
@@ -504,12 +494,11 @@ function fnRecordExport(type: string = 'txt') {
const selectLen = tableState.selectedRowKeys.length; const selectLen = tableState.selectedRowKeys.length;
if (selectLen <= 0) return; if (selectLen <= 0) return;
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1; queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total; queryParams.pageSize = tablePagination.total;
exportUDMAuth({ type, coreUid, neUid, imsis: tableState.selectedRowKeys }) exportUDMAuth({ type, neUid, imsis: tableState.selectedRowKeys })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('common.msgSuccess', { msg: t('common.export') }), 3); message.success(t('common.msgSuccess', { msg: t('common.export') }), 3);
@@ -526,8 +515,7 @@ function fnRecordExport(type: string = 'txt') {
/**列表导出全部数据 */ /**列表导出全部数据 */
function fnExportList(type: string) { function fnExportList(type: string) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
exportUDMAuth(Object.assign({ type: type }, queryParams)) exportUDMAuth(Object.assign({ type: type }, queryParams))
.then(res => { .then(res => {
@@ -545,14 +533,13 @@ function fnExportList(type: string) {
/**重新加载数据 */ /**重新加载数据 */
function fnLoadData() { function fnLoadData() {
const coreUid = queryParams.coreUid;
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
if (tableState.loading || !neUid || !coreUid) return; if (tableState.loading || !neUid) return;
modalState.loadDataLoading = true; modalState.loadDataLoading = true;
tablePagination.total = 0; tablePagination.total = 0;
tableState.data = []; tableState.data = [];
tableState.loading = true; // 表格loading tableState.loading = true; // 表格loading
resetUDMAuth(coreUid, neUid).then(res => { resetUDMAuth(neUid).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const num = res.data; const num = res.data;
const timerS = Math.ceil(+num / 800) + 3; const timerS = Math.ceil(+num / 800) + 3;
@@ -696,8 +683,7 @@ function fnModalUploadImportClose() {
/**对话框表格信息导入上传 */ /**对话框表格信息导入上传 */
function fnModalUploadImportUpload(file: File) { function fnModalUploadImportUpload(file: File) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) {
if (!neUid || !coreUid) {
return Promise.reject('Unknown network element'); return Promise.reject('Unknown network element');
} }
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
@@ -720,7 +706,6 @@ function fnModalUploadImportUpload(file: File) {
if (!filePath) return; if (!filePath) return;
// 文件导入 // 文件导入
return importUDMAuth({ return importUDMAuth({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
uploadPath: filePath, uploadPath: filePath,
...uploadImportState.from, ...uploadImportState.from,

View File

@@ -24,7 +24,6 @@ import {
} from '@/api/neDataNf/udm_sub'; } from '@/api/neDataNf/udm_sub';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
import { currentCoreUid } from '@/hooks/useCoreUid';
const { t } = useI18n(); const { t } = useI18n();
const neStore = useNeStore(); const neStore = useNeStore();
/**网元参数 */ /**网元参数 */
@@ -32,8 +31,6 @@ let neOtions = ref<Record<string, any>[]>([]);
/**查询参数 */ /**查询参数 */
let queryParams = reactive({ let queryParams = reactive({
/**核心网标识 */
coreUid: currentCoreUid(),
/**网元ID */ /**网元ID */
neUid: undefined, neUid: undefined,
/**移动编号 */ /**移动编号 */
@@ -397,8 +394,7 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
modalState.confirmLoading = true; modalState.confirmLoading = true;
getUDMSub({ getUDMSub({
coreUid: row.coreUid, neUid: queryParams.neUid,
neUid: row.neUid,
imsi: row.imsi, imsi: row.imsi,
}) })
.then(res => { .then(res => {
@@ -649,7 +645,6 @@ function fnModalOk() {
from.rfspIndex = `${from.rfspIndex}`; from.rfspIndex = `${from.rfspIndex}`;
from.regTimer = `${from.regTimer}`; from.regTimer = `${from.regTimer}`;
from.ueUsageType = `${from.ueUsageType}`; from.ueUsageType = `${from.ueUsageType}`;
from.coreUid = queryParams.coreUid || '-';
from.neUid = queryParams.neUid || '-'; from.neUid = queryParams.neUid || '-';
from.neType = 'UDM'; from.neType = 'UDM';
const result = from.id ? updateUDMSub(from) : addUDMSub(from); const result = from.id ? updateUDMSub(from) : addUDMSub(from);
@@ -725,32 +720,29 @@ function fnBatchDelModalOk() {
modalState.confirmLoading = true; modalState.confirmLoading = true;
const from = toRaw(modalState.BatchDelForm); const from = toRaw(modalState.BatchDelForm);
const neUid = queryParams.neUid || '-'; const neUid = queryParams.neUid || '-';
const coreUid = queryParams.coreUid || '-'; delUDMSub({ neUid, imsi: from.imsi, num: from.num }).then(res => {
delUDMSub({ coreUid, neUid, imsi: from.imsi, num: from.num }).then( if (res.code === RESULT_CODE_SUCCESS) {
res => { const timerS = Math.ceil(+from.num / 800) + 1;
if (res.code === RESULT_CODE_SUCCESS) { notification.success({
const timerS = Math.ceil(+from.num / 800) + 1; message: modalState.title,
notification.success({ description: t('common.operateOk'),
message: modalState.title, duration: timerS,
description: t('common.operateOk'), });
duration: timerS, setTimeout(() => {
}); modalState.openByBatchDel = false;
setTimeout(() => {
modalState.openByBatchDel = false;
modalState.confirmLoading = false;
modalStateBatchDelFrom.resetFields();
fnGetList();
}, timerS * 1000);
} else {
modalState.confirmLoading = false; modalState.confirmLoading = false;
notification.error({ modalStateBatchDelFrom.resetFields();
message: modalState.title, fnGetList();
description: res.msg, }, timerS * 1000);
duration: 3, } else {
}); modalState.confirmLoading = false;
} notification.error({
message: modalState.title,
description: res.msg,
duration: 3,
});
} }
); });
}) })
.catch(e => { .catch(e => {
message.error(t('common.errorFields', { num: e.errorFields.length }), 3); message.error(t('common.errorFields', { num: e.errorFields.length }), 3);
@@ -805,8 +797,7 @@ function fnBatchDelModalCancel() {
*/ */
function fnRecordDelete(imsi: string) { function fnRecordDelete(imsi: string) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
let imsiMsg = imsi; let imsiMsg = imsi;
if (imsi === '0') { if (imsi === '0') {
imsiMsg = `${tableState.selectedRowKeys[0]}... ${t( imsiMsg = `${tableState.selectedRowKeys[0]}... ${t(
@@ -821,7 +812,7 @@ function fnRecordDelete(imsi: string) {
onOk() { onOk() {
modalState.loadDataLoading = true; modalState.loadDataLoading = true;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
delUDMSub({ coreUid, neUid, imsi, num: 0 }) delUDMSub({ neUid, imsi, num: 0 })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const msgContent = t('common.msgSuccess', { const msgContent = t('common.msgSuccess', {
@@ -854,10 +845,9 @@ function fnRecordExport(type: string = 'txt') {
const selectLen = tableState.selectedRowKeys.length; const selectLen = tableState.selectedRowKeys.length;
if (selectLen <= 0) return; if (selectLen <= 0) return;
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
exportUDMSub({ type, coreUid, neUid, imsis: tableState.selectedRowKeys }) exportUDMSub({ type, neUid, imsis: tableState.selectedRowKeys })
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
message.success({ message.success({
@@ -880,8 +870,7 @@ function fnRecordExport(type: string = 'txt') {
/**列表导出 */ /**列表导出 */
function fnExportList(type: string) { function fnExportList(type: string) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) return;
if (!neUid || !coreUid) return;
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
queryParams.pageNum = 1; queryParams.pageNum = 1;
queryParams.pageSize = tablePagination.total; queryParams.pageSize = tablePagination.total;
@@ -907,14 +896,13 @@ function fnExportList(type: string) {
/**重新加载数据 */ /**重新加载数据 */
function fnLoadData() { function fnLoadData() {
const coreUid = queryParams.coreUid;
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
if (tableState.loading || !neUid || !coreUid) return; if (tableState.loading || !neUid) return;
modalState.loadDataLoading = true; modalState.loadDataLoading = true;
tablePagination.total = 0; tablePagination.total = 0;
tableState.data = []; tableState.data = [];
tableState.loading = true; // 表格loading tableState.loading = true; // 表格loading
resetUDMSub(coreUid, neUid).then(res => { resetUDMSub(neUid).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const num = res.data; const num = res.data;
const timerS = Math.ceil(+num / 800) + 3; const timerS = Math.ceil(+num / 800) + 3;
@@ -1039,8 +1027,7 @@ function fnModalUploadImportClose() {
/**对话框表格信息导入上传 */ /**对话框表格信息导入上传 */
function fnModalUploadImportUpload(file: File) { function fnModalUploadImportUpload(file: File) {
const neUid = queryParams.neUid; const neUid = queryParams.neUid;
const coreUid = queryParams.coreUid; if (!neUid) {
if (!neUid || !coreUid) {
return Promise.reject('Unknown network element'); return Promise.reject('Unknown network element');
} }
const hide = message.loading(t('common.loading'), 0); const hide = message.loading(t('common.loading'), 0);
@@ -1063,7 +1050,6 @@ function fnModalUploadImportUpload(file: File) {
if (!filePath) return; if (!filePath) return;
// 文件导入 // 文件导入
return importUDMSub({ return importUDMSub({
coreUid: coreUid,
neUid: neUid, neUid: neUid,
uploadPath: filePath, uploadPath: filePath,
}); });

Some files were not shown because too many files have changed in this diff Show More