Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90395e7464 | ||
|
|
0b15ff1476 | ||
|
|
8ced920aec | ||
|
|
4ae74103f1 | ||
|
|
1c4c1a796d | ||
|
|
a658852772 | ||
|
|
0d13400229 | ||
|
|
7491ccc00b | ||
|
|
fc64460870 | ||
|
|
323da55c9d | ||
|
|
26cf7fa560 | ||
|
|
5ea56e779a | ||
|
|
174a7afc47 | ||
|
|
f4e61a0ebc | ||
|
|
97e5533d6e | ||
|
|
e1c4229e58 | ||
|
|
c6e21c6c38 | ||
|
|
b1d0771d56 | ||
|
|
22b0b7e204 | ||
|
|
93f31eded4 | ||
|
|
1eec47f410 | ||
|
|
d9bc5b9f02 | ||
|
|
3116e51338 | ||
|
|
3026ac1dd8 | ||
|
|
c01380da6b | ||
|
|
98e4d39cdf | ||
|
|
1c025c2cc1 | ||
|
|
20a12eba56 | ||
|
|
904488f59a | ||
|
|
a2f93f7862 | ||
|
|
d249d14c49 | ||
|
|
58d0e6e884 | ||
|
|
510e3e1006 | ||
|
|
02b12d76a7 | ||
|
|
5839aa3cb1 | ||
|
|
83a289492d | ||
|
|
05d59ec526 | ||
|
|
c22d7604cf | ||
|
|
6f9639d3d4 | ||
|
|
5932662e7c | ||
|
|
cdbe9a1e42 | ||
|
|
a032236d7d | ||
|
|
1dcd8a6e25 | ||
|
|
e075779b91 | ||
|
|
e5ce2ebb02 | ||
|
|
3da786f6b9 | ||
|
|
d4e603be63 | ||
|
|
a7024df325 | ||
|
|
b525b92163 |
47
CHANGELOG.md
47
CHANGELOG.md
@@ -1,5 +1,52 @@
|
||||
# 版本发布日志
|
||||
|
||||
## 2.2510.4-20251024
|
||||
|
||||
- 新增 同步语音仪表盘:修改useNeInfoStore导入地址、补充接口导入、修改ims请求参数、修改响应码
|
||||
- 新增 基站状态补充randId列
|
||||
|
||||
## 2.2510.3-20251018
|
||||
|
||||
- 新增 备份网元日志文件数据查看
|
||||
- 修复 更新根网管节点处理逻辑,支持无OMC情况
|
||||
- 新增 网元配置选择传入neId查询相应版本配置数据
|
||||
- 修复 网元配置备份修改表单校验规则,添加备注字段必填项
|
||||
|
||||
## 2.2510.2-20251011
|
||||
|
||||
- 新增 UDM-auth数据导出按钮权限定义
|
||||
- 新增 SMSC-CDR添加结果原因说明
|
||||
- 优化 移除CDR/UE/网元版本/授权列表显示ID列
|
||||
- 修复 MML回车undefined问题,关闭搜索匹配
|
||||
|
||||
## 2.2509.4-20250926
|
||||
|
||||
- 优化 UDM数据显示创建时间列
|
||||
- 优化 中英文补充
|
||||
- 新增 添加系统备份功能,包括导入导出OMC的API和界面支持
|
||||
- 新增 日志备份文件查看kpi文件记录
|
||||
- 优化 根据搜索条件导出,去除最大记录限制
|
||||
- 新增 添加活动告警自动刷新功能并优化代码结构
|
||||
- 修复 奇安信浏览器时区格式错误
|
||||
- 新增 添加网元配置快速PLMN修改框
|
||||
- 新增 ue和ne模块权限按钮
|
||||
- 新增 监控模块按钮权限
|
||||
- 修复 UDM数据导出提示信息,导出总数
|
||||
- 新增 网元许可快速上传功能
|
||||
- 新增 网元信息快速OAM功能
|
||||
|
||||
## 2.2508.4-20250829
|
||||
|
||||
- 新增 网元授权显示用户数/基站数
|
||||
- 优化 网元当前版本显示是否有包存在
|
||||
- 优化 cdr/ue导出操作后锁定按钮事件防重发
|
||||
- 优化 网元可选静态可选项添加PGWC
|
||||
- 优化 参数配置添加校验过滤长度~和-定义范围
|
||||
- 修复 UPF流量统计数据同时获取刷新
|
||||
- 修复 UPF流量统计字节数据格式化显示不一致问题
|
||||
- 新增 指标Title管理页面功能
|
||||
- 新增 增加多个导出操作的超时时间至180秒
|
||||
|
||||
## 2.2508.2-20250815
|
||||
|
||||
- 优化 给config.js加随机数避免缓存
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
# !!! Remove lines containing the # symbol when importing files.
|
||||
#imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video
|
||||
#imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video,online,offline
|
||||
460996650000580,62357000580,internet|ims_sig,internet|ims_sig,dnn,1,def_sar,qos_audio,qos_video,0,0
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# !!! Remove lines containing the # symbol when importing files.
|
||||
#imsi,ki,aigoIndex,amf,opc
|
||||
460996650000580,1234567890ABCDEF1234567890ABCDEF,0,8000
|
||||
460996650000581,1234567890ABCDEF1234567890ABCDEF,0,8000
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# !!! Remove lines containing the # symbol when importing files.
|
||||
#IMSI,MSISDN,UeAmbrTpl,NssaiTpl,AreaForbiddenTpl,ServiceAreaRestrictionTpl,RatRestrictions,CnTypeRestrictions,SmfSel,SmData,EPSDat
|
||||
460996650000580,62357000580,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&content&ims,1,64,24,65,def_eps,1,010200000000,-
|
||||
460996650000581,62357000581,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&content&ims,1,64,24,65,def_eps,1,010200000000,-
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# !!! Remove lines containing the # symbol when importing files.
|
||||
#username,password
|
||||
62357000580,123456
|
||||
62357000581,123456
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# !!! Remove lines containing the # symbol when importing files.
|
||||
#vlote=0 MSISDN and IMSI need to be filled in the same way.
|
||||
#imsi,msisdn,vlote,vni
|
||||
460996650000580,62357000580,1,ims.mnc000.mcc460.3gppnetwork.org
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC列表
|
||||
* @param query 查询参数
|
||||
@@ -7,13 +9,15 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listCBC(query: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/cbc/message/list`,
|
||||
url: `/neData/cbc/message/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC签约用户新增
|
||||
* @param data 签约对象
|
||||
@@ -21,30 +25,36 @@ export function listCBC(query: Record<string, any>) {
|
||||
*/
|
||||
export function addCBC(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/cbc/message?neId=${data.neId}`,
|
||||
url: `/neData/cbc/message?neId=${data.neId}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateCBCStatus(data: any) {
|
||||
|
||||
|
||||
|
||||
export function updateCBCStatus(data:any) {
|
||||
return request({
|
||||
url: `/nf/cbc/message/${data.id}/${data.status}?neId=${data.neId}`,
|
||||
url: `/neData/cbc/message/${data.id}/${data.status}?neId=${data.neId}`,
|
||||
method: 'PUT',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
export function updateCBC(data: any) {
|
||||
|
||||
export function updateCBC(data:any) {
|
||||
return request({
|
||||
url: `/nf/cbc/message/${data.id}?neId=${data.neId}`,
|
||||
url: `/neData/cbc/message/${data.id}?neId=${data.neId}`,
|
||||
method: 'PUT',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* CBC删除
|
||||
* @param data 签约对象
|
||||
@@ -52,8 +62,14 @@ export function updateCBC(data: any) {
|
||||
*/
|
||||
export function delCBC(neId: string, id: string) {
|
||||
return request({
|
||||
url: `/nf/cbc/message/${id}?neId=${neId}`,
|
||||
url: `/neData/cbc/message/${id}?neId=${neId}`,
|
||||
method: 'DELETE',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
export async function getActiveAlarmTotal() {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/ne/data/alarm/list`,
|
||||
url: `/neData/alarm/list`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
alarmStatus: 'Active',
|
||||
sortField: 'createdTime',
|
||||
sortField: 'event_time',
|
||||
sortOrder: 'desc',
|
||||
pageNum: 1,
|
||||
pageSize: 1,
|
||||
@@ -34,7 +34,7 @@ export async function getActiveAlarmTotal() {
|
||||
*/
|
||||
export async function listAct(query: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/list`,
|
||||
url: `/neData/alarm/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -42,15 +42,18 @@ export async function listAct(query: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* 确认告警信息
|
||||
* @param id 记录ID
|
||||
* @param ids 记录ID
|
||||
* @param state 状态 true确认 false取消确认
|
||||
* @returns object
|
||||
*/
|
||||
export function ackAlarm(data: Record<string, any>) {
|
||||
export function ackAlarm(ids: number[], state: boolean) {
|
||||
return request({
|
||||
url: `/ne/data/alarm/ack'`,
|
||||
url: `/neData/alarm/ack'`,
|
||||
method: 'PUT',
|
||||
data,
|
||||
data: {
|
||||
ids: ids,
|
||||
ackState: state,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -102,14 +105,14 @@ export function getPass() {
|
||||
|
||||
/**
|
||||
* 清除告警信息
|
||||
* @param id 记录ID
|
||||
* @param ids 记录ID
|
||||
* @returns object
|
||||
*/
|
||||
export function clearAlarm(id: number | string) {
|
||||
export function clearAlarm(ids: number[]) {
|
||||
return request({
|
||||
url: `/ne/data/alarm/clear`,
|
||||
url: `/neData/alarm/clear`,
|
||||
method: 'PUT',
|
||||
data: { id },
|
||||
data: { ids },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,7 +123,7 @@ export function clearAlarm(id: number | string) {
|
||||
*/
|
||||
export function exportAlarm(params: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/data/alarm/export',
|
||||
url: '/neData/alarm/export',
|
||||
method: 'GET',
|
||||
params: params,
|
||||
responseType: 'blob',
|
||||
@@ -190,12 +193,12 @@ export async function exportAll(query: Record<string, any>) {
|
||||
* @param query 查询参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export async function origGet(alarmStatus: 'Active' | 'Clear') {
|
||||
export async function origGet() {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/count/severity`,
|
||||
url: `/neData/alarm/count/severity`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
alarmStatus: alarmStatus,
|
||||
alarmStatus: 'Active',
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -205,12 +208,12 @@ export async function origGet(alarmStatus: 'Active' | 'Clear') {
|
||||
* @param filterFlag 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function top3Sel(alarmStatus: 'Active' | 'Clear') {
|
||||
export async function top3Sel() {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/count/top`,
|
||||
url: `/neData/alarm/count/ne`,
|
||||
method: 'GET',
|
||||
params: {
|
||||
alarmStatus: alarmStatus,
|
||||
alarmStatus: 'Active',
|
||||
top: 3,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
*/
|
||||
export async function listAct(query: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/log/event`,
|
||||
url: `/neData/alarm/log/event`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export async function listAlarm(query: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/log/list`,
|
||||
url: `/neData/alarm/log/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export async function listForwarding(query: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/alarm/forward/log/list`,
|
||||
url: `/neData/alarm/forward/log/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
|
||||
@@ -19,55 +19,27 @@ export async function getMMLByNE(neType: string) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询UDM可用cmd命令
|
||||
* @returns object
|
||||
*/
|
||||
export async function getMMLByUDM() {
|
||||
return request({
|
||||
url: '/tool/mml/subscriber/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
neType: 'UDM',
|
||||
status: 'Active',
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
},
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送网元的mml命令
|
||||
* @param neType 网元类型
|
||||
* @param coreUid 网元类型
|
||||
* @param neId 网元ID
|
||||
* @param objectType 接口类型
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMML(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/tool/mml/command',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送网元的mml命令
|
||||
* @param neUid 网元ID
|
||||
* @param cmdArr 命令数组
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByGeneral(neUid: string, cmdArr: string[]) {
|
||||
export async function sendMMlByNE(
|
||||
neType: string,
|
||||
neId: string,
|
||||
objectType: string,
|
||||
cmdArr: string[]
|
||||
) {
|
||||
return request({
|
||||
url: '/tool/mml/command',
|
||||
method: 'POST',
|
||||
data: {
|
||||
neUid: neUid,
|
||||
type: 'General',
|
||||
neType: neType,
|
||||
neId: neId,
|
||||
type: objectType,
|
||||
command: cmdArr,
|
||||
},
|
||||
timeout: 180_000,
|
||||
|
||||
39
src/api/mmlManage/udmOperate.ts
Normal file
39
src/api/mmlManage/udmOperate.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询UDM可用cmd命令
|
||||
* @returns object
|
||||
*/
|
||||
export async function getMMLByUDM() {
|
||||
return request({
|
||||
url: '/tool/mml/subscriber/list',
|
||||
method: 'GET',
|
||||
params: {
|
||||
neType: 'UDM',
|
||||
status: 'Active',
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
},
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送UDM的mml命令
|
||||
* @param neId 网元ID
|
||||
* @param cmdStr 命令串
|
||||
* @returns
|
||||
*/
|
||||
export async function sendMMlByUDM(neId: string, cmdArr: string[]) {
|
||||
return request({
|
||||
url: '/tool/mml/command',
|
||||
method: 'POST',
|
||||
data: {
|
||||
neType: 'UDM',
|
||||
neId: neId,
|
||||
type: 'General',
|
||||
command: cmdArr,
|
||||
},
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询网元状态
|
||||
* @param neUid 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function stateNeInfo(neUid: string) {
|
||||
return request({
|
||||
url: '/ne/info/state',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元信息
|
||||
* @param neUid 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeInfoByNF(neUid: string) {
|
||||
return request({
|
||||
url: '/ne/info/nf',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端OAM配置文件读取
|
||||
* @param neUid 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getOAMFile(neUid: string) {
|
||||
return request({
|
||||
url: '/ne/info/file/oam',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端配置文件写入
|
||||
* @param neUid 网元ID
|
||||
* @param content 用json对象
|
||||
* @param sync 同步到网元
|
||||
* @returns object
|
||||
*/
|
||||
export function saveOAMFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/file/oam`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件读取
|
||||
* @returns object
|
||||
*/
|
||||
export function getPara5GFilee() {
|
||||
return request({
|
||||
url: '/ne/info/file/para5g',
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件写入
|
||||
* @param content txt内容为字符串 其他文件格式都用json对象
|
||||
* @param syncNe 同步到网元端 neUid
|
||||
* @returns object
|
||||
*/
|
||||
export function savePara5GFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/file/para5g`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元服务操作
|
||||
* @param data 对象 {neUid, action}
|
||||
* @returns object
|
||||
*/
|
||||
export function serviceNeAction(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/action/service`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -6,10 +6,11 @@ import { request } from '@/plugins/http-fetch';
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function getAllNeConfig(neType: string) {
|
||||
export function getAllNeConfig(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/config/list/${neType}`,
|
||||
method: 'GET',
|
||||
params: { neId },
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -68,10 +69,10 @@ export function delNeConfigData(params: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* 从参数配置PCF中获取对应信息提供给PCF用户策略输入框
|
||||
* @param neUid 网元标识
|
||||
* @param neId
|
||||
* @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction}
|
||||
*/
|
||||
export async function getPCFRule(neUid: string) {
|
||||
export async function getPCFRule(neId: any) {
|
||||
const paramNameArr = [
|
||||
'pccRules',
|
||||
'sessionRules',
|
||||
@@ -84,7 +85,7 @@ export async function getPCFRule(neUid: string) {
|
||||
reqArr.push(
|
||||
request({
|
||||
url: `/ne/config/data`,
|
||||
params: { neType: 'PCF', neUid, paramName },
|
||||
params: { neType: 'PCF', neId, paramName },
|
||||
method: 'GET',
|
||||
})
|
||||
);
|
||||
|
||||
@@ -33,11 +33,11 @@ export function updateNeConfigBackup(data: Record<string, any>) {
|
||||
* @param id 记录ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function downNeConfigBackup(query: Record<string, any>) {
|
||||
export async function downNeConfigBackup(id: string) {
|
||||
return await request({
|
||||
url: '/ne/config/backup/download',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
params: { id },
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
@@ -48,11 +48,11 @@ export async function downNeConfigBackup(query: Record<string, any>) {
|
||||
* @param id 记录ID
|
||||
* @returns object
|
||||
*/
|
||||
export async function delNeConfigBackup(query: Record<string, any>) {
|
||||
export async function delNeConfigBackup(id: string) {
|
||||
return request({
|
||||
url: '/ne/config/backup',
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,10 @@ export function listNeInfo(query: Record<string, any>) {
|
||||
* @param infoId 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeInfo(id: string | number) {
|
||||
export function getNeInfo(infoId: string | number) {
|
||||
return request({
|
||||
url: `/ne/info`,
|
||||
url: `/ne/info/${infoId}`,
|
||||
method: 'GET',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -61,26 +60,25 @@ export function updateNeInfo(data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* 网元信息删除
|
||||
* @param query 查询参数 id
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delNeInfo(query: Record<string, any>) {
|
||||
export function delNeInfo(infoIds: string | number) {
|
||||
return request({
|
||||
url: `/ne/info`,
|
||||
url: `/ne/info/${infoIds}`,
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网元列表全部无分页
|
||||
* @param query 查询参数 coreId, neUid bandStatus bandHost
|
||||
* @param query 查询参数 neType neId bandStatus bandHost
|
||||
* @returns object
|
||||
*/
|
||||
export function listAllNeInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/info/list/all',
|
||||
url: '/ne/info/listAll',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -88,42 +86,100 @@ export function listAllNeInfo(query: Record<string, any>) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权申请码
|
||||
* 查询网元状态
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元id
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function codeNeLicense(neUid: string) {
|
||||
export function stateNeInfo(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/info/license/code`,
|
||||
url: '/ne/info/state',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权文件替换
|
||||
* @param data 网元对象 {"neUid": "", "licensePath": "", "reload": true}
|
||||
* 查询网元信息
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function updateNeLicense(data: Record<string, any>) {
|
||||
export function getNeInfoByTypeAndID(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/info/license/update`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
url: '/ne/info/byTypeAndID',
|
||||
method: 'GET',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元核心关联
|
||||
* @param data 网元对象 {"neUid": "", "coreUid": ""}
|
||||
* 网元端OAM配置文件读取
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function changeNeCore(data: Record<string, any>) {
|
||||
export function getOAMFile(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/info/core`,
|
||||
url: '/ne/info/oamFile',
|
||||
method: 'GET',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端配置文件写入
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @param content 用json对象
|
||||
* @param sync 同步到网元
|
||||
* @returns object
|
||||
*/
|
||||
export function saveOAMFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/oamFile`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件读取
|
||||
* @returns object
|
||||
*/
|
||||
export function getPara5GFilee() {
|
||||
return request({
|
||||
url: '/ne/info/para5GFile',
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元端公共配置文件写入
|
||||
* @param content txt内容为字符串 其他文件格式都用json对象
|
||||
* @param syncNe 同步到网元端 NeType@ NeId
|
||||
* @returns object
|
||||
*/
|
||||
export function savePara5GFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/info/para5GFile`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元服务操作
|
||||
* @param data 对象 {neType,neId,action}
|
||||
* @returns object
|
||||
*/
|
||||
export function serviceNeAction(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/action/service`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
83
src/api/ne/neLicense.ts
Normal file
83
src/api/ne/neLicense.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
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(licenseId: string | number) {
|
||||
return request({
|
||||
url: `/ne/license/${licenseId}`,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元neType和neID查询
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getNeLicenseByTypeAndID(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/byTypeAndID`,
|
||||
method: 'GET',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权申请码
|
||||
* @param neType 网元类型
|
||||
* @param neId 网元id
|
||||
* @returns object
|
||||
*/
|
||||
export function codeNeLicense(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/code`,
|
||||
method: 'GET',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 网元授权激活授权文件替换
|
||||
* @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 neType 网元类型
|
||||
* @param neId 网元id
|
||||
* @returns object
|
||||
*/
|
||||
export function stateNeLicense(neType: string, neId: string) {
|
||||
return request({
|
||||
url: `/ne/license/state`,
|
||||
method: 'GET',
|
||||
params: { neType, neId },
|
||||
});
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listAMFDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/amf/ue/list',
|
||||
url: '/neData/amf/ue/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listAMFDataUE(query: Record<string, any>) {
|
||||
*/
|
||||
export function delAMFDataUE(ueIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/amf/ue/${ueIds}`,
|
||||
url: `/neData/amf/ue/${ueIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delAMFDataUE(ueIds: string | number) {
|
||||
*/
|
||||
export function exportAMFDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/amf/ue/export',
|
||||
url: '/neData/amf/ue/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -44,12 +44,12 @@ export function exportAMFDataUE(query: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* AMF-接入基站信息列表
|
||||
* @param query 查询参数 neUid=001&id=1
|
||||
* @param query 查询参数 neId=001&id=1
|
||||
* @returns object
|
||||
*/
|
||||
export function listAMFNblist(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/amf/nb/list',
|
||||
url: '/neData/amf/nb/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -58,12 +58,12 @@ export function listAMFNblist(query: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* AMF-接入基站状态信息列表
|
||||
* @param query 查询参数 neUid=001&state=1
|
||||
* @param query 查询参数 neId=001&state=1
|
||||
* @returns object
|
||||
*/
|
||||
export function listAMFNbStatelist(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/amf/nb/addrs',
|
||||
url: '/neData/amf/nb/list-cfg',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -76,13 +76,13 @@ export function listAMFNbStatelist(query: Record<string, any>) {
|
||||
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
|
||||
* @returns object
|
||||
*/
|
||||
export function addAMFNbState(neUid: string, data: Record<string, any>) {
|
||||
export function addAMFNbState(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
neType: 'AMF',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'gnbList',
|
||||
paramData: data,
|
||||
loc: `${data.index}`,
|
||||
@@ -92,17 +92,17 @@ export function addAMFNbState(neUid: string, data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* AMF-接入基站状态信息修改
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
|
||||
* @returns object
|
||||
*/
|
||||
export function editAMFNbState(neUid: string, data: Record<string, any>) {
|
||||
export function editAMFNbState(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'PUT',
|
||||
data: {
|
||||
neType: 'AMF',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'gnbList',
|
||||
paramData: data,
|
||||
loc: `${data.index}`,
|
||||
@@ -112,17 +112,17 @@ export function editAMFNbState(neUid: string, data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* AMF-接入基站状态信息删除
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param index 数据index
|
||||
* @returns object
|
||||
*/
|
||||
export function delAMFNbState(neUid: string, index: string | number) {
|
||||
export function delAMFNbState(neId: string, index: string | number) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'DELETE',
|
||||
params: {
|
||||
neType: 'AMF',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'gnbList',
|
||||
loc: `${index}`,
|
||||
},
|
||||
@@ -6,7 +6,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function getBackupFTP() {
|
||||
return request({
|
||||
url: '/nf/backup/ftp',
|
||||
url: '/neData/backup/ftp',
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export function getBackupFTP() {
|
||||
*/
|
||||
export function pushBackupFTP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/backup/ftp',
|
||||
url: '/neData/backup/ftp',
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
@@ -31,8 +31,38 @@ export function pushBackupFTP(data: Record<string, any>) {
|
||||
*/
|
||||
export function updateBackupFTP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/backup/ftp',
|
||||
url: '/neData/backup/ftp',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 备份文件-导出OMC
|
||||
* @returns object
|
||||
*/
|
||||
export function exportBackupOMC() {
|
||||
return request({
|
||||
url: '/neData/backup/export-omc',
|
||||
method: 'POST',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 备份文件-导入OMC
|
||||
* @param filePath 备份文件上传返回的/upload 路径
|
||||
* @returns object
|
||||
*/
|
||||
export function importBackupOMC(filePath: string) {
|
||||
return request({
|
||||
url: '/neData/backup/import-omc',
|
||||
method: 'POST',
|
||||
data: {
|
||||
neType: 'OMC',
|
||||
path: filePath,
|
||||
},
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listIMSDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/ims/cdr/list',
|
||||
url: '/neData/ims/cdr/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listIMSDataCDR(query: Record<string, any>) {
|
||||
*/
|
||||
export function delIMSDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/ims/cdr/${cdrIds}`,
|
||||
url: `/neData/ims/cdr/${cdrIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delIMSDataCDR(cdrIds: string | number) {
|
||||
*/
|
||||
export function exportIMSDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/ims/cdr/export',
|
||||
url: '/neData/ims/cdr/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -47,22 +47,22 @@ export function exportIMSDataCDR(query: Record<string, any>) {
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listIMSSessionNum(neUid: string) {
|
||||
export function listIMSSessionNum(neId: string) {
|
||||
return request({
|
||||
url: '/nf/ims/session/num',
|
||||
url: '/neData/ims/session/num',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
params: { neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* IMS-在线会话用户列表信息
|
||||
* @param query 查询参数 { neUid, imsi, msisdn}
|
||||
* @param query 查询参数 {neId, imsi, msisdn}
|
||||
* @returns objectv
|
||||
*/
|
||||
export function listIMSSessionList(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/ims/session/list',
|
||||
url: '/neData/ims/session/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -1,18 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询黄金指标数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listKPIData(query: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/ne/data/kpi/data`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listMMEDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/mme/ue/list',
|
||||
url: '/neData/mme/ue/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listMMEDataUE(query: Record<string, any>) {
|
||||
*/
|
||||
export function delMMEDataUE(ueIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/mme/ue/${ueIds}`,
|
||||
url: `/neData/mme/ue/${ueIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delMMEDataUE(ueIds: string | number) {
|
||||
*/
|
||||
export function exportMMEDataUE(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/mme/ue/export',
|
||||
url: '/neData/mme/ue/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -49,7 +49,7 @@ export function exportMMEDataUE(query: Record<string, any>) {
|
||||
*/
|
||||
export function listMMENblist(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/mme/nb/list',
|
||||
url: '/neData/mme/nb/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -63,7 +63,7 @@ export function listMMENblist(query: Record<string, any>) {
|
||||
*/
|
||||
export function listMMENbStatelist(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/mme/nb/addrs',
|
||||
url: '/neData/mme/nb/list-cfg',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -72,17 +72,17 @@ export function listMMENbStatelist(query: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* MME-接入基站状态信息新增
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
|
||||
* @returns object
|
||||
*/
|
||||
export function addMMENbState(neUid: string, data: Record<string, any>) {
|
||||
export function addMMENbState(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
neType: 'MME',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'enbList',
|
||||
paramData: data,
|
||||
loc: `${data.index}`,
|
||||
@@ -92,17 +92,17 @@ export function addMMENbState(neUid: string, data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* MME-接入基站状态信息修改
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
|
||||
* @returns object
|
||||
*/
|
||||
export function editMMENbState(neUid: string, data: Record<string, any>) {
|
||||
export function editMMENbState(neId: string, data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'PUT',
|
||||
data: {
|
||||
neType: 'MME',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'enbList',
|
||||
paramData: data,
|
||||
loc: `${data.index}`,
|
||||
@@ -112,17 +112,17 @@ export function editMMENbState(neUid: string, data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* MME-接入基站状态信息删除
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param index 数据index
|
||||
* @returns object
|
||||
*/
|
||||
export function delMMENbState(neUid: string, index: string | number) {
|
||||
export function delMMENbState(neId: string, index: string | number) {
|
||||
return request({
|
||||
url: `/ne/config/data`,
|
||||
method: 'DELETE',
|
||||
params: {
|
||||
neType: 'MME',
|
||||
neUid: neUid,
|
||||
neId: neId,
|
||||
paramName: 'enbList',
|
||||
loc: `${index}`,
|
||||
},
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listNBState(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/state/nb/list',
|
||||
url: '/neData/nb-state/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listNBState(query: Record<string, any>) {
|
||||
*/
|
||||
export function exportNBState(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/state/nb/export',
|
||||
url: '/neData/nb-state/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listPCFRule(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/pcf/rule/list',
|
||||
url: '/neData/pcf/rule/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listPCFRule(query: Record<string, any>) {
|
||||
*/
|
||||
export function addPCFRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/pcf/rule`,
|
||||
url: `/neData/pcf/rule`,
|
||||
method: 'POST',
|
||||
data,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function addPCFRule(data: Record<string, any>) {
|
||||
*/
|
||||
export function editPCFRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/pcf/rule`,
|
||||
url: `/neData/pcf/rule`,
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
@@ -47,7 +47,7 @@ export function editPCFRule(data: Record<string, any>) {
|
||||
*/
|
||||
export function delPCFRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/pcf/rule`,
|
||||
url: `/neData/pcf/rule`,
|
||||
method: 'DELETE',
|
||||
params: data,
|
||||
});
|
||||
@@ -60,7 +60,7 @@ export function delPCFRule(data: Record<string, any>) {
|
||||
*/
|
||||
export function exportPCFRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/pcf/rule/export',
|
||||
url: '/neData/pcf/rule/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
@@ -75,7 +75,7 @@ export function exportPCFRule(data: Record<string, any>) {
|
||||
*/
|
||||
export function importPCFRule(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/pcf/rule/import',
|
||||
url: '/neData/pcf/rule/import',
|
||||
method: 'PUT',
|
||||
data,
|
||||
});
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listSGWCDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/sgwc/cdr/list',
|
||||
url: '/neData/sgwc/cdr/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listSGWCDataCDR(query: Record<string, any>) {
|
||||
*/
|
||||
export function delSGWCDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/sgwc/cdr/${cdrIds}`,
|
||||
url: `/neData/sgwc/cdr/${cdrIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delSGWCDataCDR(cdrIds: string | number) {
|
||||
*/
|
||||
export function exportSGWCDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/sgwc/cdr/export',
|
||||
url: '/neData/sgwc/cdr/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listSMFDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/smf/cdr/list',
|
||||
url: '/neData/smf/cdr/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listSMFDataCDR(query: Record<string, any>) {
|
||||
*/
|
||||
export function delSMFDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/smf/cdr/${cdrIds}`,
|
||||
url: `/neData/smf/cdr/${cdrIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delSMFDataCDR(cdrIds: string | number) {
|
||||
*/
|
||||
export function exportSMFDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/smf/cdr/export',
|
||||
url: '/neData/smf/cdr/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -47,22 +47,22 @@ export function exportSMFDataCDR(query: Record<string, any>) {
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listSMFSubNum(neUid: string) {
|
||||
export function listSMFSubNum(neId: string) {
|
||||
return request({
|
||||
url: '/nf/smf/sub/num',
|
||||
url: '/neData/smf/sub/num',
|
||||
method: 'GET',
|
||||
params: { neUid },
|
||||
params: { neId },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* SMF-在线订阅用户列表信息
|
||||
* @param query 查询参数 { neUid, pageNum, imsi, msisdn, upstate}
|
||||
* @param query 查询参数 {neId, pageNum, imsi, msisdn, upstate}
|
||||
* @returns object
|
||||
*/
|
||||
export function listSMFSubList(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/smf/sub/list',
|
||||
url: '/neData/smf/sub/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listSMSCDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/smsc/cdr/list',
|
||||
url: '/neData/smsc/cdr/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -21,7 +21,7 @@ export function listSMSCDataCDR(query: Record<string, any>) {
|
||||
*/
|
||||
export function delSMSCDataCDR(cdrIds: string | number) {
|
||||
return request({
|
||||
url: `/nf/smsc/cdr/${cdrIds}`,
|
||||
url: `/neData/smsc/cdr/${cdrIds}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
@@ -34,7 +34,7 @@ export function delSMSCDataCDR(cdrIds: string | number) {
|
||||
*/
|
||||
export function exportSMSCDataCDR(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/smsc/cdr/export',
|
||||
url: '/neData/smsc/cdr/export',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -2,14 +2,13 @@ import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDM鉴权用户重载数据
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMAuth(neUid: string) {
|
||||
export function resetUDMAuth(neId: string) {
|
||||
return request({
|
||||
url: `/nf/udm/auth/reset`,
|
||||
url: `/neData/udm/auth/resetData/${neId}`,
|
||||
method: 'PUT',
|
||||
params: { neUid },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -21,24 +20,23 @@ export function resetUDMAuth(neUid: string) {
|
||||
*/
|
||||
export function listUDMAuth(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/auth/list',
|
||||
url: '/neData/udm/auth/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户信息
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMAuth(query: Record<string, any>) {
|
||||
export function getUDMAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/nf/udm/auth`,
|
||||
url: `/neData/udm/auth/${neId}/${imsi}`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,9 +47,23 @@ export function getUDMAuth(query: Record<string, any>) {
|
||||
*/
|
||||
export function addUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/auth`,
|
||||
url: `/neData/udm/auth/${data.neId}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户批量新增
|
||||
* @param data 鉴权对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMAuth(data: Record<string, any>, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${data.neId}/${num}`,
|
||||
method: 'POST',
|
||||
params: { num: data.num },
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
@@ -64,7 +76,7 @@ export function addUDMAuth(data: Record<string, any>) {
|
||||
*/
|
||||
export function updateUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/auth`,
|
||||
url: `/neData/udm/auth/${data.neId}`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
@@ -73,17 +85,29 @@ export function updateUDMAuth(data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* UDM鉴权用户删除
|
||||
* @param coreUid 核心网标识
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量 大于1为批量
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMAuth(query: Record<string, any>) {
|
||||
export function delUDMAuth(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/nf/udm/auth`,
|
||||
url: `/neData/udm/auth/${neId}/${imsi}`,
|
||||
method: 'DELETE',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMAuth(neId: string, imsi: string, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/${neId}/${imsi}/${num}`,
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -95,7 +119,7 @@ export function delUDMAuth(query: Record<string, any>) {
|
||||
*/
|
||||
export function importUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/auth/import`,
|
||||
url: `/neData/udm/auth/import`,
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
@@ -109,10 +133,24 @@ export function importUDMAuth(data: Record<string, any>) {
|
||||
*/
|
||||
export function exportUDMAuth(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/auth/export',
|
||||
url: '/neData/udm/auth/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM鉴权用户导出DecAuth
|
||||
* @param neId 网元ID
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportUDMDecAuth(neId: string) {
|
||||
return request({
|
||||
url: `/neData/udm/auth/export-dec?neId=${neId}`,
|
||||
method: 'GET',
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -2,14 +2,13 @@ import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDM签约用户重载数据
|
||||
* @param neUid 网元ID
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMSub(neUid: string) {
|
||||
export function resetUDMSub(neId: string) {
|
||||
return request({
|
||||
url: `/nf/udm/sub/reset`,
|
||||
url: `/neData/udm/sub/resetData/${neId}`,
|
||||
method: 'PUT',
|
||||
params: { neUid },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -21,24 +20,23 @@ export function resetUDMSub(neUid: string) {
|
||||
*/
|
||||
export function listUDMSub(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/sub/list',
|
||||
url: '/neData/udm/sub/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户信息
|
||||
* @param neUid 网元标识
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMSub(query: Record<string, any>) {
|
||||
export function getUDMSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/nf/udm/sub`,
|
||||
url: `/neData/udm/sub/${neId}/${imsi}`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,9 +47,23 @@ export function getUDMSub(query: Record<string, any>) {
|
||||
*/
|
||||
export function addUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/sub`,
|
||||
url: `/neData/udm/sub/${data.neId}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户批量新增
|
||||
* @param data 签约对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMSub(data: Record<string, any>, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${data.neId}/${num}`,
|
||||
method: 'POST',
|
||||
params: { num: data.num },
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
@@ -64,7 +76,7 @@ export function addUDMSub(data: Record<string, any>) {
|
||||
*/
|
||||
export function updateUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/sub`,
|
||||
url: `/neData/udm/sub/${data.neId}`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
@@ -76,11 +88,25 @@ export function updateUDMSub(data: Record<string, any>) {
|
||||
* @param data 签约对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMSub(query: Record<string, any>) {
|
||||
export function delUDMSub(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/nf/udm/sub`,
|
||||
url: `/neData/udm/sub/${neId}/${imsi}`,
|
||||
method: 'DELETE',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDM签约用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMSub(neId: string, imsi: string, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/sub/${neId}/${imsi}/${num}`,
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -92,7 +118,7 @@ export function delUDMSub(query: Record<string, any>) {
|
||||
*/
|
||||
export function exportUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/sub/export',
|
||||
url: '/neData/udm/sub/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
@@ -107,7 +133,7 @@ export function exportUDMSub(data: Record<string, any>) {
|
||||
*/
|
||||
export function importUDMSub(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/sub/import`,
|
||||
url: `/neData/udm/sub/import`,
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
134
src/api/neData/udm_voip.ts
Normal file
134
src/api/neData/udm_voip.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDMVOIP用户重载数据
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMVOIP(neId: string) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/resetData/${neId}`,
|
||||
method: 'PUT',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listUDMVOIP(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/voip/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户信息
|
||||
* @param neId 网元ID
|
||||
* @param username username
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMVOIP(neId: string, username: string) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/${neId}/${username}`,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户新增
|
||||
* @param data VOIP对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addUDMVOIP(
|
||||
neId: string,
|
||||
data: { username: string; password: string }
|
||||
) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/${neId}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户批量新增
|
||||
* @param data VOIP对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMVOIP(
|
||||
neId: string,
|
||||
data: { username: string; password: string },
|
||||
num: number
|
||||
) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/${neId}/${num}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户删除
|
||||
* @param data VOIP对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMVOIP(neId: string, username: string) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/${neId}/${username}`,
|
||||
method: 'DELETE',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param username username
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMVOIP(neId: string, username: string, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/${neId}/${username}/${num}`,
|
||||
method: 'DELETE',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户导出
|
||||
* @param data 数据参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportUDMVOIP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/udm/voip/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVOIP用户导入
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importUDMVOIP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/neData/udm/voip/import`,
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -2,14 +2,13 @@ import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDMVolteIMS用户重载数据
|
||||
* @param neUid 网元ID
|
||||
* @param neId 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMVolteIMS(neUid: string) {
|
||||
export function resetUDMVolteIMS(neId: string) {
|
||||
return request({
|
||||
url: `/nf/udm/volte-ims/reset`,
|
||||
url: `/neData/udm/volte-ims/resetData/${neId}`,
|
||||
method: 'PUT',
|
||||
params: { neUid },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -21,10 +20,10 @@ export function resetUDMVolteIMS(neUid: string) {
|
||||
*/
|
||||
export function listUDMVolteIMS(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/volte-ims/list',
|
||||
url: '/neData/udm/volte-ims/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,11 +33,10 @@ export function listUDMVolteIMS(query: Record<string, any>) {
|
||||
* @param imsi IMSI
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMVolteIMS(query: Record<string, any>) {
|
||||
export function getUDMVolteIMS(neId: string, imsi: string) {
|
||||
return request({
|
||||
url: `/nf/udm/volte-ims`,
|
||||
url: `/neData/udm/volte-ims/${neId}/${imsi}`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,9 +47,23 @@ export function getUDMVolteIMS(query: Record<string, any>) {
|
||||
*/
|
||||
export function addUDMVolteIMS(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/volte-ims`,
|
||||
url: `/neData/udm/volte-ims/${data.neId}`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVolteIMS用户批量新增
|
||||
* @param data 签约对象
|
||||
* @param num 数量
|
||||
* @returns object
|
||||
*/
|
||||
export function batchAddUDMVolteIMS(data: Record<string, any>, num: number) {
|
||||
return request({
|
||||
url: `/neData/udm/volte-ims/${data.neId}/${num}`,
|
||||
method: 'POST',
|
||||
params: { num: data.num },
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
@@ -59,18 +71,38 @@ export function addUDMVolteIMS(data: Record<string, any>) {
|
||||
|
||||
/**
|
||||
* UDMVolteIMS用户删除
|
||||
* @param neUid 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param msisdn MSISDN
|
||||
* @param volte 标签 0-voip 1-volte
|
||||
* @param num 数量
|
||||
* @param neId 网元ID
|
||||
* @param imsi_msisdn IMSI/MSISDN
|
||||
* @param tag 标签 0-voip 1-volte
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMVolteIMS(query: Record<string, any>) {
|
||||
export function delUDMVolteIMS(neId: string, imsi_msisdn: string, tag: string) {
|
||||
return request({
|
||||
url: `/nf/udm/volte-ims`,
|
||||
url: `/neData/udm/volte-ims/${neId}/${imsi_msisdn}`,
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
params: { volte: tag },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVolteIMS用户批量删除
|
||||
* @param neId 网元ID
|
||||
* @param imsi IMSI
|
||||
* @param num 数量
|
||||
* @param tag 标签 0-voip 1-volte
|
||||
* @returns object
|
||||
*/
|
||||
export function batchDelUDMVolteIMS(
|
||||
neId: string,
|
||||
imsi: string,
|
||||
num: number,
|
||||
tag: string
|
||||
) {
|
||||
return request({
|
||||
url: `/neData/udm/volte-ims/${neId}/${imsi}/${num}`,
|
||||
method: 'DELETE',
|
||||
params: { volte: tag },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -82,7 +114,7 @@ export function delUDMVolteIMS(query: Record<string, any>) {
|
||||
*/
|
||||
export function exportUDMVolteIMS(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/volte-ims/export',
|
||||
url: '/neData/udm/volte-ims/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
@@ -97,7 +129,7 @@ export function exportUDMVolteIMS(data: Record<string, any>) {
|
||||
*/
|
||||
export function importUDMVolteIMS(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/volte-ims/import`,
|
||||
url: `/neData/udm/volte-ims/import`,
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
@@ -1,101 +0,0 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* UDMVoIP用户重载数据
|
||||
* @param neUid 网元ID
|
||||
* @returns object
|
||||
*/
|
||||
export function resetUDMVoIP(neUid: string) {
|
||||
return request({
|
||||
url: `/nf/udm/voip/reset`,
|
||||
method: 'PUT',
|
||||
params: { neUid },
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listUDMVoIP(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/voip/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户信息
|
||||
* @param neUid 网元标识
|
||||
* @param username username
|
||||
* @returns object
|
||||
*/
|
||||
export function getUDMVoIP(query: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/voip`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户新增
|
||||
* @param data VoIP对象 username password
|
||||
* @returns object
|
||||
*/
|
||||
export function addUDMVoIP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/voip`,
|
||||
method: 'POST',
|
||||
params: { num: data.num },
|
||||
data: data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户删除
|
||||
* @param data VoIP对象
|
||||
* @returns object
|
||||
*/
|
||||
export function delUDMVoIP(query: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/voip`,
|
||||
method: 'DELETE',
|
||||
params: query,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户导出
|
||||
* @param data 数据参数
|
||||
* @returns bolb
|
||||
*/
|
||||
export function exportUDMVoIP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/udm/voip/export',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* UDMVoIP用户导入
|
||||
* @param data 表单数据对象
|
||||
* @returns object
|
||||
*/
|
||||
export function importUDMVoIP(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/nf/udm/voip/import`,
|
||||
method: 'POST',
|
||||
data,
|
||||
timeout: 180_000,
|
||||
});
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
*/
|
||||
export function listN3IWFSubList(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/nf/n3iwf/sub/list',
|
||||
url: '/neData/n3iwf/sub/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -7,11 +7,10 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
* @param query 查询参数 {imsi}
|
||||
* @returns object
|
||||
*/
|
||||
export function listNSSFSubList(query: Record<string, any>) {
|
||||
export function listNSSFSubList() {
|
||||
return request({
|
||||
url: '/nf/nssf/sub/list',
|
||||
url: '/neData/nssf/sub/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,10 +18,9 @@ export function listNSSFSubList(query: Record<string, any>) {
|
||||
* NSSF-可用AMF列表信息
|
||||
* @returns object
|
||||
*/
|
||||
export function listNSSFAmfList(query: Record<string, any>) {
|
||||
export function listNSSFAmfList() {
|
||||
return request({
|
||||
url: '/nf/nssf/amf/list',
|
||||
url: '/neData/nssf/amf/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
|
||||
import { sessionGet } from '@/utils/cache-session-utils';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询核心网列表
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listCoreInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/core/info/list',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询核心网列表全部无分页
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export function listAllCoreInfo(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/core/info/list/all',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询核心网信息详细
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function getCoreInfo(id: string | number) {
|
||||
return request({
|
||||
url: `/ne/core/info/${id}`,
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息新增
|
||||
* @param data 核心网对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addCoreInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/core/info`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息修改
|
||||
* @param data 核心网对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateCoreInfo(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/core/info`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
|
||||
timeout: 30_000,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心网信息删除
|
||||
* @param id 信息ID
|
||||
* @returns object
|
||||
*/
|
||||
export function delCoreInfo(id: string | number) {
|
||||
return request({
|
||||
url: `/ne/core/info/${id}`,
|
||||
method: 'DELETE',
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询自定义指标数据
|
||||
* 新 查询自定义指标数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listKPICData(query: Record<string, any>) {
|
||||
export async function listCustomData(query: Record<string, any>) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/ne/data/kpic/data`,
|
||||
url: `/neData/kpic/data`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
@@ -5,9 +5,9 @@ import { request } from '@/plugins/http-fetch';
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listKPICTitle(query?: Record<string, any>) {
|
||||
export async function listCustom(query?: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/kpic/title/list`,
|
||||
url: `/neData/kpic/title/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -18,9 +18,9 @@ export async function listKPICTitle(query?: Record<string, any>) {
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function addKPICTitle(data: Record<string, any>) {
|
||||
export function addCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/data/kpic/title`,
|
||||
url: `/neData/kpic/title`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
});
|
||||
@@ -31,9 +31,9 @@ export function addKPICTitle(data: Record<string, any>) {
|
||||
* @param data 网元对象
|
||||
* @returns object
|
||||
*/
|
||||
export function updateKPICTitle(data: Record<string, any>) {
|
||||
export function updateCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/data/kpic/title`,
|
||||
url: `/neData/kpic/title`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
});
|
||||
@@ -43,9 +43,9 @@ export function updateKPICTitle(data: Record<string, any>) {
|
||||
* 删除自定义指标
|
||||
* @returns object
|
||||
*/
|
||||
export async function delKPICTitle(data: Record<string, any>) {
|
||||
export async function delCustom(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/data/kpic/title?id=${data.id}`,
|
||||
url: `/neData/kpic/title?id=${data.id}`,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
60
src/api/perfManage/goldTarget.ts
Normal file
60
src/api/perfManage/goldTarget.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询黄金指标数据
|
||||
* @param query 查询参数
|
||||
* @returns object
|
||||
*/
|
||||
export async function listKPIData(query: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/neData/kpi/data`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询黄金指标数据kpi.id转换title
|
||||
* @param neType 网元类型
|
||||
* @returns object
|
||||
*/
|
||||
export async function getKPITitle(neType: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/neData/kpi/title`,
|
||||
method: 'GET',
|
||||
params: { neType },
|
||||
});
|
||||
// 解析数据//
|
||||
return result;
|
||||
}
|
||||
//忙时呼叫
|
||||
export async function getbusyhour(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/ims/kpi/busy-hour',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
//MOS指标
|
||||
export async function getMosHour(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/ims/cdr/mos-hour',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
//CCT指标
|
||||
export async function getCctHour(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/neData/ims/cdr/cct-hour',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
@@ -1,22 +1,5 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
/**
|
||||
* 查询黄金指标数据kpi.id转换title
|
||||
* @param neType 网元类型
|
||||
* @returns object
|
||||
*/
|
||||
export async function getKPITitle(neType: string) {
|
||||
// 发起请求
|
||||
const result = await request({
|
||||
url: `/ne/data/kpi/title`,
|
||||
method: 'GET',
|
||||
params: { neType },
|
||||
});
|
||||
// 解析数据//
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询统计指标
|
||||
* @param query 查询参数
|
||||
@@ -24,7 +7,7 @@ export async function getKPITitle(neType: string) {
|
||||
*/
|
||||
export async function listKPITitle(query?: Record<string, any>) {
|
||||
return await request({
|
||||
url: `/ne/data/kpi/title/list`,
|
||||
url: `/neData/kpi/title/list`,
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -37,7 +20,7 @@ export async function listKPITitle(query?: Record<string, any>) {
|
||||
*/
|
||||
export function addKPITitle(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/data/kpi/title`,
|
||||
url: `/neData/kpi/title`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
});
|
||||
@@ -50,7 +33,7 @@ export function addKPITitle(data: Record<string, any>) {
|
||||
*/
|
||||
export function updateKPITitle(data: Record<string, any>) {
|
||||
return request({
|
||||
url: `/ne/data/kpi/title`,
|
||||
url: `/neData/kpi/title`,
|
||||
method: 'PUT',
|
||||
data: data,
|
||||
});
|
||||
@@ -62,7 +45,7 @@ export function updateKPITitle(data: Record<string, any>) {
|
||||
*/
|
||||
export async function delKPITitle(id: string) {
|
||||
return request({
|
||||
url: `/ne/data/kpi/title?id=${id}`,
|
||||
url: `/neData/kpi/title?id=${id}`,
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
@@ -277,19 +277,19 @@ export function transferStaticFile(data: Record<string, any>) {
|
||||
*/
|
||||
export async function uploadFileToNE(
|
||||
neType: string,
|
||||
neuid: string,
|
||||
neId: string,
|
||||
fileData: File,
|
||||
chunkSize: number = 1
|
||||
) {
|
||||
const uploadChunkRes = await uploadFileChunk(fileData, chunkSize, 'import');
|
||||
if (uploadChunkRes.code === RESULT_CODE_SUCCESS) {
|
||||
const transferToNeFileRes = await request({
|
||||
url: `/ne/action/file/push`,
|
||||
url: `/ne/action/pushFile`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
uploadPath: uploadChunkRes.data.filePath,
|
||||
neType,
|
||||
neuid,
|
||||
neId,
|
||||
delTemp: true,
|
||||
},
|
||||
timeout: 60_000,
|
||||
|
||||
@@ -8,3 +8,13 @@ export function iperfV(data: Record<string, string>) {
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
|
||||
// iperf 软件安装
|
||||
export function iperfI(data: Record<string, string>) {
|
||||
return request({
|
||||
url: '/tool/iperf/i',
|
||||
method: 'POST',
|
||||
data: data,
|
||||
timeout: 60_000,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
|
||||
// 更新网元配置重新载入
|
||||
export function updateNeConfigReload(neUid: string) {
|
||||
export function updateNeConfigReload(neType: string, neId: string) {
|
||||
return request({
|
||||
url: '/tool/mml/command',
|
||||
method: 'POST',
|
||||
data: {
|
||||
neUid: neUid,
|
||||
neType: neType,
|
||||
neId: neId,
|
||||
type: 'General',
|
||||
command: ['reload'],
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
|
||||
*/
|
||||
export function listNeFiles(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/file/list',
|
||||
url: '/ne/action/files',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
});
|
||||
@@ -20,7 +20,7 @@ export function listNeFiles(query: Record<string, any>) {
|
||||
*/
|
||||
export function getNeFile(query: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/file/pull',
|
||||
url: '/ne/action/pullFile',
|
||||
method: 'GET',
|
||||
params: query,
|
||||
responseType: 'blob',
|
||||
@@ -31,7 +31,7 @@ export function getNeFile(query: Record<string, any>) {
|
||||
// 从网元到本地获取目录压缩为ZIP
|
||||
export function getNeDirZip(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/file/pull/dirzip',
|
||||
url: '/ne/action/pullDirZip',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
responseType: 'blob',
|
||||
@@ -42,7 +42,7 @@ export function getNeDirZip(data: Record<string, any>) {
|
||||
// 查看网元端文件内容
|
||||
export function getNeViewFile(data: Record<string, any>) {
|
||||
return request({
|
||||
url: '/ne/action/file/view',
|
||||
url: '/ne/action/viewFile',
|
||||
method: 'GET',
|
||||
params: data,
|
||||
timeout: 60_000,
|
||||
|
||||
@@ -22,9 +22,8 @@ export async function listTraceTask(query: Record<string, any>) {
|
||||
*/
|
||||
export async function getTraceTask(id: string | number) {
|
||||
return request({
|
||||
url: `/trace/task`,
|
||||
url: `/trace/task/${id}`,
|
||||
method: 'GET',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
@@ -59,11 +58,10 @@ export function updateTraceTask(data: Record<string, any>) {
|
||||
* @param ids ID多个逗号分隔
|
||||
* @returns object
|
||||
*/
|
||||
export async function delTraceTask(id: string | number) {
|
||||
export async function delTraceTask(ids: string) {
|
||||
return request({
|
||||
url: `/trace/task`,
|
||||
url: `/trace/task/${ids}`,
|
||||
method: 'DELETE',
|
||||
params: { id },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
/**网元ID,必传 */
|
||||
neUid: {
|
||||
neId: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
@@ -111,7 +111,7 @@ function wsOpen(ev: any) {
|
||||
cols: terminal.value.cols,
|
||||
rows: terminal.value.rows,
|
||||
neType: props.neType,
|
||||
neUid: props.neUid,
|
||||
neId: props.neId,
|
||||
id: props.id,
|
||||
});
|
||||
});
|
||||
@@ -142,7 +142,7 @@ function wsClose(code: number) {
|
||||
emit('close', {
|
||||
code: code,
|
||||
neType: props.neType,
|
||||
neUid: props.neUid,
|
||||
neId: props.neId,
|
||||
id: props.id,
|
||||
});
|
||||
}
|
||||
@@ -161,8 +161,8 @@ function wsMessage(res: Record<string, any>) {
|
||||
let text = '';
|
||||
// 处理消息
|
||||
if (props.processMessages) {
|
||||
text = props.processMessages(data);
|
||||
} else {
|
||||
text = props.processMessages(data);
|
||||
}else{
|
||||
text = processMessage(data);
|
||||
}
|
||||
// 无消息是则不输出
|
||||
@@ -202,13 +202,13 @@ function processMessage(data: string): string {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.neType && props.neUid) {
|
||||
if (props.neType && props.neId) {
|
||||
// 建立链接
|
||||
const options: OptionsType = {
|
||||
url: props.url,
|
||||
params: {
|
||||
neType: props.neType,
|
||||
neUid: props.neUid,
|
||||
neId: props.neId,
|
||||
cols: props.cols,
|
||||
rows: props.rows,
|
||||
},
|
||||
|
||||
@@ -6,12 +6,3 @@ export const APP_REQUEST_HEADER_VERSION = 'X-App-Version';
|
||||
|
||||
/**应用-请求数据-密钥 */
|
||||
export const APP_DATA_API_KEY = 'T9ox2DCzpLfJIPzkH9pKhsOTMOEMJcFv';
|
||||
|
||||
/**应用-服务类型 单核心网 */
|
||||
export const APP_SERVER_TYPE_O = 'oc';
|
||||
|
||||
/**应用-服务类型 多核心网 */
|
||||
export const APP_SERVER_TYPE_M = 'mc';
|
||||
|
||||
/**应用-服务类型 租户核心网 */
|
||||
export const APP_SERVER_TYPE_T = 'tc';
|
||||
|
||||
@@ -4,12 +4,6 @@ export const CACHE_SESSION_CRYPTO_API = 'cache:session:cryptoApi';
|
||||
/**会话缓存-网络请求 */
|
||||
export const CACHE_SESSION_FATCH = 'cache:session:fatch';
|
||||
|
||||
/**会话缓存-当前选中核心网 */
|
||||
export const CACHE_SESSION_CORE = 'cache:session:core';
|
||||
|
||||
/**会话缓存-当前选中核心网UID */
|
||||
export const CACHE_SESSION_CORE_UID = 'cache:session:core:uid';
|
||||
|
||||
/**本地缓存-布局设置 */
|
||||
export const CACHE_LOCAL_PROCONFIG = 'cache:local:proConfig';
|
||||
|
||||
|
||||
@@ -36,36 +36,3 @@ export const NE_TYPE_LIST = [
|
||||
* UDM-adb/kvdb
|
||||
*/
|
||||
export const NE_EXPAND_LIST = ['ADB', 'KVDB', 'RTPROXY', 'MF'];
|
||||
|
||||
// 组号-其他
|
||||
export const WS_GROUP_OTHER = '0';
|
||||
// 组号-跟踪任务网元数据变更 2_traceId
|
||||
export const WS_GROUP_TRACE_NE = '2';
|
||||
// 组号-信令跟踪Packet 4_taskNo
|
||||
export const WS_GROUP_TRACE_PACKET = '4';
|
||||
// 组号-网元状态 8_neType_neId
|
||||
export const WS_GROUP_NE_STATE = '8';
|
||||
// 组号-指标通用 10_coreUid_neUid
|
||||
export const WS_GROUP_KPI = '10';
|
||||
// 组号-自定义KPI指标 20_coreUid_neUid
|
||||
export const WS_GROUP_KPI_C = '20';
|
||||
// 组号-IMS_CDR会话事件 1005_coreUid_neUid
|
||||
export const WS_GROUP_IMS_CDR = '1005';
|
||||
// 组号-SMF_CDR会话事件 1006_coreUid_neUid
|
||||
export const WS_GROUP_SMF_CDR = '1006';
|
||||
// 组号-SMSC_CDR会话事件 1007_coreUid_neUid
|
||||
export const WS_GROUP_SMSC_CDR = '1007';
|
||||
// 组号-SGWC_CDR会话事件 1008_coreUid_neUid
|
||||
export const WS_GROUP_SGWC_CDR = '1008';
|
||||
// 组号-AMF_UE会话事件 1010_coreUid_neUid
|
||||
export const WS_GROUP_AMF_UE = '1010';
|
||||
// 组号-MME_UE会话事件 1011_coreUid_neUid
|
||||
export const WS_GROUP_MME_UE = '1011';
|
||||
// 组号-AMF_NB状态事件 1014_coreUid_neUid
|
||||
export const WS_GROUP_AMF_NB = '1014';
|
||||
// 组号-MME_NB状态事件 1015_coreUid_neUid
|
||||
export const WS_GROUP_MME_NB = '1015';
|
||||
// 组号-告警 2000_coreUid_neUid
|
||||
export const WS_GROUP_ALARM = '2000';
|
||||
// 组号-告警事件 2002_coreUid_neUid
|
||||
export const WS_GROUP_ALARM_EVENT = '2002';
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
import {
|
||||
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';
|
||||
|
||||
/**
|
||||
* 获取当前coreInfo
|
||||
* @returns coreInfo
|
||||
*/
|
||||
export function current() {
|
||||
return sessionGetJSON(CACHE_SESSION_CORE) || {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前coreInfo
|
||||
* @returns coreUid
|
||||
*/
|
||||
export function changeCurrent(v: Record<string, any>) {
|
||||
sessionSetJSON(CACHE_SESSION_CORE, v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前coreUid
|
||||
* @returns coreUid
|
||||
*/
|
||||
export function currentCoreUid() {
|
||||
return sessionGet(CACHE_SESSION_CORE_UID) || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换coreUid
|
||||
* @param coreUid coreUid
|
||||
*/
|
||||
export function changeCoreUid(coreUid: string) {
|
||||
sessionSet(CACHE_SESSION_CORE_UID, coreUid);
|
||||
}
|
||||
@@ -485,7 +485,7 @@ export default {
|
||||
resultOk: "Success",
|
||||
resultFail: "Fail",
|
||||
delTip: "Confirm deletion of the data item numbered [{msg}]?",
|
||||
exportTip: "Do you confirm to export the current query conditions of the CDR data? (Maximum 10,000 items can be exported.)",
|
||||
exportTip: "Do you confirm to export the current query conditions of the CDR data?",
|
||||
chargingID: 'Charging ID',
|
||||
smfSubscriptionIDData: 'Subscription ID Data',
|
||||
smfSubscriptionIDType: 'Subscription ID Type',
|
||||
@@ -517,19 +517,17 @@ export default {
|
||||
result: "Result",
|
||||
resultOk: "Successes",
|
||||
delTip: "Confirm deletion of the data item numbered [{msg}]?",
|
||||
exportTip: "Do you confirm to export the event data of the current query condition? (Maximum 10,000 items can be exported.)",
|
||||
exportTip: "Do you confirm to export the event data of the current query condition?",
|
||||
},
|
||||
},
|
||||
ne: {
|
||||
common: {
|
||||
coreUid: 'Core UID',
|
||||
coreName: 'Core Name',
|
||||
neType: 'NE Type',
|
||||
neTypePlease: "Please select network element type",
|
||||
neTypeTip: 'Fill in the type of network element to be created, e.g. SMF.',
|
||||
neUid: 'NE UID',
|
||||
neUidPlease: 'Please enter the network element identification',
|
||||
neUidTip: 'Fill in the unique identifier of the network element binding',
|
||||
neId: 'NE ID',
|
||||
neIdPlease: 'Please enter the network element identification',
|
||||
neIdTip: 'Fill in the unique identifier of the network element binding',
|
||||
rmUid: 'Resource Unique ID',
|
||||
rmUidPlease: 'Please enter a resource unique ID',
|
||||
rmUidTip: "Tagging for data reporting of network element logs, alarms, metrics, etc.",
|
||||
@@ -555,7 +553,6 @@ export default {
|
||||
stopTip: 'Are you sure you want to stop the [{ne}] NE Service?',
|
||||
reload: 'Reload',
|
||||
reloadTip: 'Confirm that you want to reload the network element configuration information?',
|
||||
license: 'License Update',
|
||||
oam: 'OAM',
|
||||
log: 'Logs',
|
||||
},
|
||||
@@ -570,13 +567,13 @@ export default {
|
||||
sysDisk: "SYS Store",
|
||||
neCpu: "NE CPU",
|
||||
hostConfig: "Connection Configuration",
|
||||
pvflag: 'Virtual Flag',
|
||||
pvflag: 'NE Virtualization',
|
||||
pnf: 'physical network element',
|
||||
vnf: 'virtual network element',
|
||||
macAddr: 'MAC',
|
||||
macAddrTip: 'Record the physical address (MAC) of the network card of the network element',
|
||||
dn: 'Network Identifier',
|
||||
vendorName: 'Provider',
|
||||
neAddress: 'MAC',
|
||||
neAddressTip: 'Record the physical address (MAC) of the network card of the network element',
|
||||
dn: 'network identifier',
|
||||
vendorName: 'provider',
|
||||
province: 'Service Area',
|
||||
addTitle: 'New network element information',
|
||||
editTitle: 'Edit network element information',
|
||||
@@ -593,6 +590,22 @@ export default {
|
||||
kpiTimerPlease: 'Please enter the reporting period (in seconds)',
|
||||
omcIP: 'OMC IP',
|
||||
},
|
||||
quickOam: {
|
||||
title: 'Quick OAM Configuration',
|
||||
selectNe: 'Select NE',
|
||||
omcIP: 'OMC IP',
|
||||
oamPort: 'OAM Port',
|
||||
progress:'Progress',
|
||||
processing:'Progressing',
|
||||
result:'Result',
|
||||
success:'Success',
|
||||
default:'Default',
|
||||
allsuccess:'All NE have been configured successfully!',
|
||||
},
|
||||
quickUpload: {
|
||||
title: 'Quick License Upload',
|
||||
selectNe: 'Select NE',
|
||||
},
|
||||
backConf: {
|
||||
export: 'Config Export',
|
||||
import: 'Config Import',
|
||||
@@ -704,6 +717,10 @@ export default {
|
||||
uploadFile: "Upload License",
|
||||
uploadChangeOk: 'Network Element renewed license successfully and is being calibrated in the background!',
|
||||
uploadChangeFail: "Some network elements failed to update the license, please check whether the service terminal environment is available!",
|
||||
quickUpload: {
|
||||
title: 'Quick License Upload',
|
||||
selectNe: 'Select NE',
|
||||
},
|
||||
},
|
||||
neConfig: {
|
||||
treeTitle: "Navigation Configuration",
|
||||
@@ -821,7 +838,7 @@ export default {
|
||||
checkDel:'Check Delete',
|
||||
importTemplate: 'Download Template',
|
||||
},
|
||||
udmVoIP: {
|
||||
udmVOIP: {
|
||||
startUsername: 'Starting username',
|
||||
username: 'username',
|
||||
usernamePlease: "Please enter your username correctly",
|
||||
@@ -858,6 +875,7 @@ export default {
|
||||
list: "List",
|
||||
topology: "Topology",
|
||||
nbName: "RAN Node Name",
|
||||
nbId: "RAN Node ID",
|
||||
ueNum: "UE Number",
|
||||
topologyTitle: "Radio State Graph",
|
||||
name: "Name",
|
||||
@@ -960,6 +978,21 @@ export default {
|
||||
smDataTip:'The IP in sm_data=1-000001&internet-1.2.3.4&ims-1.2.3.5: 1.2.3.4 is the static IP assigned to the APN of 5G user internet, and 1.2.3.5 is the static IP assigned to the APN of 5G user ims. If it is dynamic allocation, just remove the IP and the previous connector. Need to support multiple dnn uses & connections',
|
||||
smDataArrTip:'SST,DNN/APN is required',
|
||||
},
|
||||
base5G: {
|
||||
neType: 'NE Object',
|
||||
},
|
||||
n3iwf: {
|
||||
neType: 'N3IWF Object',
|
||||
},
|
||||
ue: {
|
||||
neType: 'SMF Object',
|
||||
},
|
||||
ims: {
|
||||
neType: 'IMS Object',
|
||||
},
|
||||
nssf:{
|
||||
neType: 'NSSF Object',
|
||||
},
|
||||
},
|
||||
perfManage: {
|
||||
taskManage:{
|
||||
@@ -1281,6 +1314,8 @@ export default {
|
||||
mml:{
|
||||
account:'Account',
|
||||
ip:'IP',
|
||||
type:'NE Type',
|
||||
neId:'NE ID',
|
||||
MML:'MML',
|
||||
logTime:'Log Time'
|
||||
},
|
||||
@@ -1327,10 +1362,19 @@ export default {
|
||||
deleteTipErr: "Failed to delete file",
|
||||
sysloginLog:'System Login Log',
|
||||
sysOperateLog:'System Operation Log',
|
||||
cdrIMS:'CDR Voice',
|
||||
cdrSMF:'CDR Data',
|
||||
cdrSMSC:'CDR SMS',
|
||||
cdrSGWC:'CDR Roaming Data',
|
||||
neLog:'NE Log',
|
||||
cdrIMS:'CDR IMS Voice',
|
||||
cdrSMF:'CDR SMF Data',
|
||||
cdrSMSC:'CDR SMSC SMS',
|
||||
cdrSGWC:'CDR SGWC Roaming Data',
|
||||
kpiIMS:'KPI IMS',
|
||||
kpiAMF:'KPI AMF',
|
||||
kpiUDM:'KPI UDM',
|
||||
kpiSMF:'KPI SMF',
|
||||
kpiPCF:'KPI PCF',
|
||||
kpiUPF:'KPI UPF',
|
||||
kpiMME:'KPI MME',
|
||||
kpiSMSC:'KPI SMSC',
|
||||
}
|
||||
},
|
||||
monitor: {
|
||||
@@ -1875,6 +1919,10 @@ export default {
|
||||
home: 'Home Page',
|
||||
homeTip:'Do you want to submit the current interface as the system interface?',
|
||||
homeSet:'Home Page Settings',
|
||||
backup: 'System Backup',
|
||||
backupInstruction: 'System backup will back up the net element information records and configuration files running on the current system, and can restore the system to the previous state!',
|
||||
backupExportTip: 'Confirm to export system backup?',
|
||||
backupImportTip: 'Confirm to import system backup?',
|
||||
},
|
||||
role:{
|
||||
allScopeOptions:'All data permissions',
|
||||
@@ -2104,7 +2152,7 @@ export default {
|
||||
stepInstallDesc: "Installation of network element services to service terminals",
|
||||
stepInstallStepPrev: 'Confirm that you want to abandon the current change and return to the previous step?',
|
||||
stepInstallStepNext: 'Confirm that you want to proceed to the next step for network element license authorization?',
|
||||
stepInstallText: 'Install',
|
||||
stepInstallText: 'Select Install',
|
||||
stepInstallTip: 'Confirm the installation of the new version of the chosen Net Meta?',
|
||||
stepInstallModal: 'Network Element For Install',
|
||||
stepInstallNotNewVer: 'No new version found',
|
||||
@@ -2112,9 +2160,9 @@ export default {
|
||||
stepInstallFail: 'Installation fails, check if the service terminal environment is available!',
|
||||
stepLicenseTitle: "Service License",
|
||||
stepLicenseDesc: "Obtaining a license activation code for authorization authentication",
|
||||
stepLicenseReload: 'Refresh',
|
||||
stepLicenseReload: 'Select Refresh',
|
||||
stepLicenseReloadTip: 'Confirm refreshing selected license information?',
|
||||
stepLicenseDownCode: 'Download Activation Code',
|
||||
stepLicenseDownCode: 'Select Download Activation Code',
|
||||
stepLicenseDownCodeTip: 'Confirmed to download the selected network element license activation code to a text file?',
|
||||
stepLicenseStepPrev: 'Confirm that you want to abandon the current change and return to the previous step?',
|
||||
stepLicenseStepNext: 'Confirmed to end the network element installation step?',
|
||||
|
||||
@@ -485,7 +485,7 @@ export default {
|
||||
resultOk: "成功",
|
||||
resultFail: "失败",
|
||||
delTip: "确认删除编号为【{msg}】的数据项?",
|
||||
exportTip: "确认导出当前查询条件的话单数据吗?(导出最大支持一万条)",
|
||||
exportTip: "确认导出当前查询条件的话单数据吗?",
|
||||
chargingID: '计费ID',
|
||||
smfSubscriptionIDData: '订阅 ID 数据',
|
||||
smfSubscriptionIDType: '订阅 ID 类型',
|
||||
@@ -517,19 +517,17 @@ export default {
|
||||
result: "结果",
|
||||
resultOk: "成功",
|
||||
delTip: "确认删除编号为【{msg}】的数据项?",
|
||||
exportTip: "确认导出当前查询条件的事件数据吗?(导出最大支持一万条)",
|
||||
exportTip: "确认导出当前查询条件的事件数据吗?",
|
||||
},
|
||||
},
|
||||
ne: {
|
||||
common: {
|
||||
coreUid: '核心网标识',
|
||||
coreName: '核心网名称',
|
||||
neType: '网元类型',
|
||||
neTypePlease: "请选择网元类型",
|
||||
neTypeTip: '填写创建的网元类型,如:SMF',
|
||||
neUid: '网元标识',
|
||||
neUidPlease: '请输入网元标识',
|
||||
neUidTip: '填写网元绑定的唯一标识',
|
||||
neId: '网元标识',
|
||||
neIdPlease: '请输入网元标识',
|
||||
neIdTip: '填写网元绑定的唯一标识',
|
||||
rmUid: '资源唯一标识',
|
||||
rmUidPlease: '请输入资源唯一标识',
|
||||
rmUidTip: "用于网元日志、告警、指标等数据上报的标记",
|
||||
@@ -555,7 +553,6 @@ export default {
|
||||
stopTip: '确认要停止【{ne}】网元服务吗?',
|
||||
reload: '重载',
|
||||
reloadTip: '确认要重载网元配置信息吗?',
|
||||
license: '更新许可',
|
||||
oam: 'OAM',
|
||||
log: '日志',
|
||||
},
|
||||
@@ -570,11 +567,11 @@ export default {
|
||||
sysDisk: "系统存储",
|
||||
neCpu: "网元CPU",
|
||||
hostConfig: "终端连接配置",
|
||||
pvflag: '虚拟化标识',
|
||||
pvflag: '网元虚拟化标识',
|
||||
pnf: '物理网元',
|
||||
vnf: '虚拟网元',
|
||||
macAddr: '物理地址(MAC)',
|
||||
macAddrTip: '记录网元的网卡物理地址(MAC)',
|
||||
neAddress: '物理地址(MAC)',
|
||||
neAddressTip: '记录网元的网卡物理地址(MAC)',
|
||||
dn: '网络标识',
|
||||
vendorName: '提供厂商',
|
||||
province: '服务地域',
|
||||
@@ -593,6 +590,22 @@ export default {
|
||||
kpiTimerPlease: '请输入上报周期(单位秒)',
|
||||
omcIP: 'OMC IP',
|
||||
},
|
||||
quickOam: {
|
||||
title: '快速OAM配置',
|
||||
selectNe: '选择网元',
|
||||
omcIP: 'OMC IP地址',
|
||||
oamPort: 'OAM端口',
|
||||
progress:'配置进度',
|
||||
processing:'正在处理',
|
||||
result:'操作结果',
|
||||
success:'成功',
|
||||
default:'失败',
|
||||
allsuccess:'所有网元配置成功!',
|
||||
},
|
||||
quickUpload: {
|
||||
title: '快速许可证上传',
|
||||
selectNe: '选择网元',
|
||||
},
|
||||
backConf: {
|
||||
export: '配置导出',
|
||||
import: '配置导入',
|
||||
@@ -696,14 +709,18 @@ export default {
|
||||
reloadBatch: "刷新许可证状态",
|
||||
reloadBatchTip: "对当前列表网元进行许可证状态信息刷新吗?",
|
||||
updateTtile: "更新许可证",
|
||||
downCodeTop: "确认要将授权码保存到文件吗?",
|
||||
activationRequestCode: "授权码",
|
||||
downCodeTop: "确认要将许可激活码保存到文件吗?",
|
||||
activationRequestCode: "许可激活码",
|
||||
licensePath: "许可证文件",
|
||||
licensePathTip: "请上传许可证文件",
|
||||
upload: '上传',
|
||||
uploadFile: "上传许可证",
|
||||
uploadChangeOk: '网元更新许可证成功,正在后台校验!',
|
||||
uploadChangeFail: "部分网元更新许可证失败,请检查服务终端环境是否可用!",
|
||||
quickUpload: {
|
||||
title: '快速许可证上传',
|
||||
selectNe: '选择网元',
|
||||
},
|
||||
},
|
||||
neConfig: {
|
||||
treeTitle: "配置导航",
|
||||
@@ -795,7 +812,7 @@ export default {
|
||||
licenseEnd: '结束',
|
||||
licenseEndTip: "确认要结束安装吗?",
|
||||
licenseCheack: '等待网元验证',
|
||||
licenseTip1: '1. 点击【许可证】可获取授权码,随后联系网元厂商进行激活',
|
||||
licenseTip1: '1. 点击【许可证】可获取许可激活码,随后联系网元厂商进行激活',
|
||||
licenseTip2: '2. 点击【结束】将结束安装过程',
|
||||
},
|
||||
},
|
||||
@@ -821,7 +838,7 @@ export default {
|
||||
checkDel:'勾选删除',
|
||||
importTemplate: '导入模板',
|
||||
},
|
||||
udmVoIP: {
|
||||
udmVOIP: {
|
||||
startUsername: '起始用户名',
|
||||
username: '用户名',
|
||||
usernamePlease: "请正确输入用户名",
|
||||
@@ -858,6 +875,7 @@ export default {
|
||||
list: "列表",
|
||||
topology: "拓扑图",
|
||||
nbName: "设备名称",
|
||||
nbId: "设备ID",
|
||||
ueNum: "在线用户数",
|
||||
topologyTitle: "基站状态关系图",
|
||||
name: "基站名称",
|
||||
@@ -918,9 +936,9 @@ export default {
|
||||
subInfo:'签约信息',
|
||||
neType: 'UDM网元类型',
|
||||
export: '导出',
|
||||
exportConfirm: '确认根据当前搜索条件导出全部签约用户数据吗?',
|
||||
exportConfirm: '确认导出全部签约用户数据吗?',
|
||||
checkExport : '勾选导出',
|
||||
checkExportConfirm: '确认导出已勾选的签约用户数据吗?',
|
||||
checkExportConfirm: '确认根据当前搜索条件导出全部签约用户数据吗?',
|
||||
import: '导入',
|
||||
importFail: '失败记录',
|
||||
loadDataConfirm: '确认要重新加载数据吗?',
|
||||
@@ -960,6 +978,21 @@ export default {
|
||||
smDataTip:'sm_data=1-000001&internet-1.2.3.4&ims-1.2.3.5中的IP:1.2.3.4为5G用户internet这个APN分配的静态IP,1.2.3.5为5G用户ims这个APN分配的静态IP。如果是动态分配,把IP以及前面一个连接符去掉即可。需支持多个dnn用&连接',
|
||||
smDataArrTip:'SST,DNN/APN为必填项',
|
||||
},
|
||||
base5G: {
|
||||
neType: '网元对象',
|
||||
},
|
||||
n3iwf: {
|
||||
neType: 'N3IWF网元对象',
|
||||
},
|
||||
ue: {
|
||||
neType: 'SMF网元对象',
|
||||
},
|
||||
ims: {
|
||||
neType: 'IMS网元对象',
|
||||
},
|
||||
nssf:{
|
||||
neType: 'NSSF网元对象',
|
||||
},
|
||||
},
|
||||
perfManage: {
|
||||
taskManage:{
|
||||
@@ -1281,6 +1314,8 @@ export default {
|
||||
mml:{
|
||||
account:'登录账号',
|
||||
ip:'IP地址',
|
||||
type:'网元类型',
|
||||
neId:'网元唯一标识',
|
||||
MML:'MML',
|
||||
logTime:'记录时间'
|
||||
},
|
||||
@@ -1327,10 +1362,19 @@ export default {
|
||||
deleteTipErr: "文件删除失败",
|
||||
sysloginLog:'系统登录日志',
|
||||
sysOperateLog:'系统操作日志',
|
||||
cdrIMS:'语音话单',
|
||||
cdrSMF:'数据话单',
|
||||
cdrSMSC:'短信话单',
|
||||
cdrSGWC:'漫游数据话单',
|
||||
neLog:'网元日志',
|
||||
cdrIMS:'话单 IMS 语音',
|
||||
cdrSMF:'话单 SMF 数据',
|
||||
cdrSMSC:'话单 SMSC 短信',
|
||||
cdrSGWC:'话单 SGWC 漫游数据',
|
||||
kpiIMS:'KPI IMS',
|
||||
kpiAMF:'KPI AMF',
|
||||
kpiUDM:'KPI UDM',
|
||||
kpiSMF:'KPI SMF',
|
||||
kpiPCF:'KPI PCF',
|
||||
kpiUPF:'KPI UPF',
|
||||
kpiMME:'KPI MME',
|
||||
kpiSMSC:'KPI SMSC',
|
||||
}
|
||||
},
|
||||
monitor: {
|
||||
@@ -1875,6 +1919,10 @@ export default {
|
||||
home: '系统首页',
|
||||
homeTip:'确认要提交当前界面为系统界面吗?',
|
||||
homeSet:'系统首页设置',
|
||||
backup: '系统备份',
|
||||
backupInstruction: '系统备份将会对当前系统上运行的网元信息记录及配置文件进行备份,可进行系统的恢复操作!',
|
||||
backupExportTip: '确认要导出系统备份吗?',
|
||||
backupImportTip: '确认要导入系统备份吗?',
|
||||
},
|
||||
role:{
|
||||
allScopeOptions:'全部数据权限',
|
||||
@@ -2104,18 +2152,18 @@ export default {
|
||||
stepInstallDesc: "将网元服务安装到服务终端",
|
||||
stepInstallStepPrev: '确认要放弃当前变更返回上一步吗?',
|
||||
stepInstallStepNext: '确认要下一步进行网元许可授权吗?',
|
||||
stepInstallText: '安装',
|
||||
stepInstallText: '选择安装',
|
||||
stepInstallTip: '确认安装选择的网元新版本吗?',
|
||||
stepInstallModal: '网元进行安装',
|
||||
stepInstallNotNewVer: '没有发现新版本',
|
||||
stepInstallDone: '安装完成,服务进入初始化',
|
||||
stepInstallFail: '安装失败,请检查服务终端环境是否可用!',
|
||||
stepLicenseTitle: "网元许可授权",
|
||||
stepLicenseDesc: "获取网元授权码进行授权认证",
|
||||
stepLicenseReload: '刷新',
|
||||
stepLicenseDesc: "获取网元许可激活码进行授权认证",
|
||||
stepLicenseReload: '选择刷新许可证',
|
||||
stepLicenseReloadTip: '确认刷新选择的许可证信息吗?',
|
||||
stepLicenseDownCode: '下载授权码',
|
||||
stepLicenseDownCodeTip: '确认下载选择的网元授权码到文本文件吗?',
|
||||
stepLicenseDownCode: '选择下载网元许可激活码',
|
||||
stepLicenseDownCodeTip: '确认下载选择的网元许可激活码到文本文件吗?',
|
||||
stepLicenseStepPrev: '确认要放弃当前变更返回上一步吗?',
|
||||
stepLicenseStepNext: '确认要结束网元安装步骤吗?',
|
||||
stepLicenseStepNext2: '请下载网元许可授权码文件保存,并联系网元厂商获取授权许可证',
|
||||
|
||||
@@ -5,8 +5,7 @@ import {
|
||||
clearMenuItem,
|
||||
MenuDataItem,
|
||||
} from 'antdv-pro-layout';
|
||||
import CoreSelect from './components/CoreSelect.vue';
|
||||
import HeaderContentRight from './components/HeaderContentRight/HeaderContentRight.vue';
|
||||
import RightContent from './components/RightContent.vue';
|
||||
import Tabs from './components/Tabs.vue';
|
||||
import GlobalMask from '@/components/GlobalMask/index.vue';
|
||||
import ForcePasswdChange from '@/components/ForcePasswdChange/index.vue';
|
||||
@@ -22,24 +21,20 @@ import {
|
||||
import { useRouter } from 'vue-router';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useTabsStore from '@/store/modules/tabs';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import useCoreStore from '@/store/modules/core';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import { getServerTime } from '@/api';
|
||||
import { MENU_PATH_INLINE } from '@/constants/menu-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { APP_SERVER_TYPE_M } from '@/constants/app-constants';
|
||||
import { getTimezoneOffset, parseDateUTCToStr } from '@/utils/date-utils';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
import { CORE_NE_PATH } from '@/hooks/useCoreUid';
|
||||
const { proConfig, waterMarkContent } = useLayoutStore();
|
||||
const { t, currentLocale } = useI18n();
|
||||
const routerStore = useRouterStore();
|
||||
const coreStore = useCoreStore();
|
||||
const neStore = useNeStore();
|
||||
const neListStore = useNeListStore();
|
||||
const tabsStore = useTabsStore();
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
@@ -56,29 +51,12 @@ watch(
|
||||
router.currentRoute,
|
||||
v => {
|
||||
const matched = v.matched.concat();
|
||||
let openKeys: string[] = [];
|
||||
let selectedKeys: string[] = [];
|
||||
|
||||
// 多核心网切换菜单显示
|
||||
if (
|
||||
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;
|
||||
|
||||
layoutState.openKeys = matched
|
||||
.filter(r => r.path !== v.path)
|
||||
.map(r => r.path);
|
||||
layoutState.selectedKeys = matched
|
||||
.filter(r => r.name !== 'Root')
|
||||
.map(r => r.path);
|
||||
// 路由地址含有内嵌地址标识又是隐藏菜单需要处理打开高亮菜单栏
|
||||
if (v.path.includes(MENU_PATH_INLINE) && v.meta.hideInMenu) {
|
||||
const idx = v.path.lastIndexOf(MENU_PATH_INLINE);
|
||||
@@ -90,46 +68,31 @@ watch(
|
||||
);
|
||||
|
||||
// 动态路由添加到菜单面板
|
||||
// const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
// if (rootRoute) {
|
||||
// const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
// const buildRouterData = routerStore.buildRouterData;
|
||||
// if (buildRouterData.length > 0) {
|
||||
// rootRoute.children = children.concat(buildRouterData);
|
||||
// } else {
|
||||
// rootRoute.children = children;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// const { menuData } = getMenuData(clearMenuItem(router.getRoutes()));
|
||||
//
|
||||
const menuData = computed(() => {
|
||||
const rootRoute = router.getRoutes().find(r => r.name === 'Root');
|
||||
if (rootRoute) {
|
||||
const rootRouteChildren = routerStore.setRootRouterData(rootRoute.children);
|
||||
const children = routerStore.setRootRouterData(rootRoute.children);
|
||||
const buildRouterData = routerStore.buildRouterData;
|
||||
if (buildRouterData.length > 0) {
|
||||
// 多核心网切换菜单显示
|
||||
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);
|
||||
}
|
||||
rootRoute.children = children.concat(buildRouterData);
|
||||
} else {
|
||||
rootRoute.children = rootRouteChildren;
|
||||
rootRoute.children = children;
|
||||
}
|
||||
}
|
||||
|
||||
// 过滤网元限定菜单
|
||||
let neTypes = [];
|
||||
// 多核心网切换菜单显示
|
||||
if (appStore.serverType === APP_SERVER_TYPE_M) {
|
||||
neTypes = neStore.getCoreDataNeSelectOtions.map(v => v.value);
|
||||
} else {
|
||||
neTypes = neStore.getNeSelectOtions.map(v => v.value);
|
||||
}
|
||||
|
||||
const neTypes = neListStore.getNeSelectOtions.map(v => v.value);
|
||||
let routes = clearMenuItem(router.getRoutes());
|
||||
routes = routerStore.clearMenuItemByNeList(routes, neTypes);
|
||||
const { menuData } = getMenuData(routes);
|
||||
@@ -188,13 +151,10 @@ tabsStore.clear();
|
||||
|
||||
// LOGO地址
|
||||
const logoUrl = computed(() => {
|
||||
let url = parseUrlPath(appStore.filePathIcon);
|
||||
if (appStore.logoType === 'brand') {
|
||||
url = parseUrlPath(appStore.filePathBrand);
|
||||
}
|
||||
if (layoutState.collapsed) {
|
||||
url = parseUrlPath(appStore.filePathIcon);
|
||||
}
|
||||
let url =
|
||||
appStore.logoType === 'brand'
|
||||
? parseUrlPath(appStore.filePathBrand)
|
||||
: parseUrlPath(appStore.filePathIcon);
|
||||
|
||||
if (url.indexOf('{language}') === -1) {
|
||||
return url;
|
||||
@@ -257,6 +217,7 @@ onMounted(() => {
|
||||
let serverTimeInterval: any = null;
|
||||
let serverTime = 0;
|
||||
let serverTimeZone = getTimezoneOffset();
|
||||
let activeAlarmRefresh = 0;
|
||||
|
||||
// 获取服务器时间
|
||||
function fnGetServerTime() {
|
||||
@@ -270,6 +231,7 @@ function fnGetServerTime() {
|
||||
const serverTimeDom = document.getElementById('serverTimeDom');
|
||||
serverTimeInterval = setInterval(() => {
|
||||
serverTime += 1000;
|
||||
activeAlarmRefresh += 1;
|
||||
if (serverTimeDom) {
|
||||
serverTimeDom.innerText = parseDateUTCToStr(
|
||||
serverTime,
|
||||
@@ -279,6 +241,10 @@ function fnGetServerTime() {
|
||||
clearInterval(serverTimeInterval);
|
||||
serverTimeInterval = null;
|
||||
}
|
||||
if (activeAlarmRefresh === 5) {
|
||||
useAlarmStore().fnGetActiveAlarmInfo();
|
||||
activeAlarmRefresh = 0;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
@@ -318,7 +284,6 @@ onUnmounted(() => {
|
||||
v-bind="proConfig"
|
||||
:iconfont-url="scriptUrl"
|
||||
:locale="fnLocale"
|
||||
:sider-width="256"
|
||||
>
|
||||
<!--插槽-菜单头-->
|
||||
<template #menuHeaderRender>
|
||||
@@ -335,17 +300,13 @@ onUnmounted(() => {
|
||||
:alt="appStore.appName"
|
||||
:title="appStore.appName"
|
||||
/>
|
||||
<h1
|
||||
class="app-name"
|
||||
:title="appStore.appName"
|
||||
v-show="!layoutState.collapsed"
|
||||
>
|
||||
<h1 class="app-name" :title="appStore.appName">
|
||||
<span class="marquee app-name_scrollable">
|
||||
{{ appStore.appName }}
|
||||
</span>
|
||||
</h1>
|
||||
</template>
|
||||
<template v-else-if="appStore.logoType === 'brand'">
|
||||
<template v-if="appStore.logoType === 'brand'">
|
||||
<img
|
||||
class="logo-brand"
|
||||
:src="logoUrl"
|
||||
@@ -357,16 +318,11 @@ onUnmounted(() => {
|
||||
</template>
|
||||
|
||||
<!--插槽-渲染顶部内容区域,仅布局side有效-->
|
||||
<template
|
||||
#headerContentRender
|
||||
v-if="appStore.serverType === APP_SERVER_TYPE_M"
|
||||
>
|
||||
<CoreSelect></CoreSelect>
|
||||
</template>
|
||||
<template #headerContentRender></template>
|
||||
|
||||
<!--插槽-渲染顶部内容右端区域-->
|
||||
<template #headerContentRightRender>
|
||||
<HeaderContentRight />
|
||||
<RightContent />
|
||||
</template>
|
||||
|
||||
<!--插槽-导航标签项-->
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
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 neStore = useNeStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**选择列表数据 */
|
||||
const coreOtions = ref(coreStore.getSelectOtions);
|
||||
/**选择过滤名称 */
|
||||
const coreName = ref('');
|
||||
|
||||
/**选择 */
|
||||
async function handleSelect(v: any, item: any) {
|
||||
if (v === coreStore.globalDefaultCoreUid) {
|
||||
coreStore.setCurrent(coreStore.globalDefaultSelect);
|
||||
} else {
|
||||
coreStore.setCurrent(item);
|
||||
}
|
||||
await neStore.fnNelistRefresh();
|
||||
// 切换核心网后,刷新路由
|
||||
await router.replace({ name: 'Index' }).finally(() => {
|
||||
// location.replace(location.origin);
|
||||
});
|
||||
}
|
||||
|
||||
/**搜索过滤 */
|
||||
function handleSearchFilter(e: any) {
|
||||
const label = e.target.value;
|
||||
coreOtions.value = coreStore.getSelectOtions.filter((item: any) => {
|
||||
return item.label.indexOf(label) !== -1;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-select
|
||||
v-model:value="coreStore.currentCoreUid"
|
||||
:options="coreOtions"
|
||||
style="width: 200px"
|
||||
@change="handleSelect"
|
||||
>
|
||||
<template #option="{ label }">
|
||||
<span>{{ label }}</span>
|
||||
</template>
|
||||
<template #dropdownRender="{ menuNode: menu }">
|
||||
<strong>核心网</strong>
|
||||
<!-- <a-button
|
||||
type="default"
|
||||
:block="true"
|
||||
@click="handleSelect(globalCoreUid(), {})"
|
||||
>
|
||||
<template #icon> <HomeOutlined /> </template>
|
||||
Global
|
||||
</a-button> -->
|
||||
<a-input-search
|
||||
placeholder="Search Core Name"
|
||||
style="width: 100%; margin: 4px 0"
|
||||
size="small"
|
||||
v-model:value="coreName"
|
||||
@change="handleSearchFilter"
|
||||
@keydown.enter="handleSearchFilter"
|
||||
>
|
||||
</a-input-search>
|
||||
<a-divider style="margin: 4px 0" />
|
||||
<component :is="menu" />
|
||||
</template>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped></style>
|
||||
@@ -1,120 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import svgLight from '@/assets/svg/light.svg';
|
||||
import svgDark from '@/assets/svg/dark.svg';
|
||||
import { viewTransitionTheme } from 'antdv-pro-layout';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import LockScreen from './components/LockScreen.vue';
|
||||
import UserProfile from './components/UserProfile.vue';
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
const { t, changeLocale, optionsLocale, currentLocale } = useI18n();
|
||||
const layoutStore = useLayoutStore();
|
||||
const appStore = useAppStore();
|
||||
const router = useRouter();
|
||||
|
||||
/**告警数按钮提示跳转 */
|
||||
function fnClickAlarm() {
|
||||
router.push({ name: 'Active_2088' });
|
||||
}
|
||||
|
||||
/**改变主题色 */
|
||||
function fnClickTheme(e: any) {
|
||||
viewTransitionTheme(isDarkMode => {
|
||||
layoutStore.changeConf('theme', isDarkMode ? 'light' : 'dark');
|
||||
}, e);
|
||||
}
|
||||
|
||||
/**改变多语言 */
|
||||
function fnChangeLocale(e: any) {
|
||||
changeLocale(e.key);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-space :size="12" align="center">
|
||||
<!-- 告警气泡 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.alarm') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickAlarm">
|
||||
<template #icon>
|
||||
<a-badge
|
||||
:count="useAlarmStore().activeAlarmTotal"
|
||||
:overflow-count="99"
|
||||
status="warning"
|
||||
style="color: inherit"
|
||||
>
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 锁屏操作 -->
|
||||
<LockScreen></LockScreen>
|
||||
|
||||
<!-- 全屏操作 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="toggle">
|
||||
<template #icon>
|
||||
<FullscreenExitOutlined v-if="isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 明暗主题操作 -->
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.theme') }}</template>
|
||||
<a-button type="text" @click="fnClickTheme">
|
||||
<template #icon>
|
||||
<img
|
||||
v-if="layoutStore.proConfig.theme === 'dark'"
|
||||
:src="svgDark"
|
||||
class="theme-icon"
|
||||
/>
|
||||
<img v-else :src="svgLight" class="theme-icon" />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 多语言操作 -->
|
||||
<a-dropdown
|
||||
placement="bottomRight"
|
||||
trigger="click"
|
||||
v-if="appStore.i18nOpen && hasPermissions(['system:setting:i18n'])"
|
||||
>
|
||||
<a-button type="text" style="color: inherit">
|
||||
<template #icon> <TranslationOutlined /> </template>
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnChangeLocale">
|
||||
<a-menu-item
|
||||
v-for="opt in optionsLocale"
|
||||
:key="opt.value"
|
||||
:disabled="opt.value == currentLocale"
|
||||
>
|
||||
{{ opt.label }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<!-- 用户信息操作 -->
|
||||
<UserProfile></UserProfile>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<style lang="css" scoped>
|
||||
.theme-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
@@ -1,71 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const maskStore = useMaskStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**锁屏确认 */
|
||||
const lockConfirm = ref<boolean>(false);
|
||||
/**锁屏密码 */
|
||||
const lockPasswd = ref<string>('');
|
||||
|
||||
/**锁屏按钮提示 */
|
||||
function fnClickLock() {
|
||||
lockConfirm.value = true;
|
||||
lockPasswd.value = '';
|
||||
maskStore.lockPasswd = '';
|
||||
}
|
||||
|
||||
/**锁屏确认跳转锁屏页面 */
|
||||
function fnClickLockToPage() {
|
||||
lockConfirm.value = false;
|
||||
maskStore.lockPasswd = lockPasswd.value;
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span v-perms:has="['system:setting:lock']">
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickLock()">
|
||||
<template #icon>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:center-y="true"
|
||||
:width="400"
|
||||
:minHeight="200"
|
||||
:mask-closable="false"
|
||||
v-model:open="lockConfirm"
|
||||
:title="t('loayouts.rightContent.lockTip')"
|
||||
@ok="fnClickLockToPage()"
|
||||
>
|
||||
<a-space>
|
||||
{{ t('loayouts.rightContent.lockPasswd') }}:
|
||||
<a-input-password
|
||||
v-model:value="lockPasswd"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip
|
||||
:title="t('loayouts.rightContent.lockPasswdTip')"
|
||||
placement="topLeft"
|
||||
>
|
||||
<UnlockOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-space>
|
||||
</ProModal>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
@@ -1,83 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**头像展开项点击 */
|
||||
function fnClick({ key }: MenuInfo) {
|
||||
switch (key) {
|
||||
case 'settings':
|
||||
router.push({ name: 'Settings' });
|
||||
break;
|
||||
case 'profile':
|
||||
router.push({ name: 'Profile' });
|
||||
break;
|
||||
case 'logout':
|
||||
userStore.fnLogOut().finally(() => router.push({ name: 'Login' }));
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-dropdown placement="bottomRight" trigger="click">
|
||||
<div class="user">
|
||||
<a-avatar
|
||||
shape="circle"
|
||||
size="default"
|
||||
:src="userStore.getAvatar"
|
||||
:alt="userStore.userName"
|
||||
></a-avatar>
|
||||
<span class="nick">
|
||||
{{ userStore.nickName }}
|
||||
</span>
|
||||
</div>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnClick">
|
||||
<!-- <a-menu-item key="profile">
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.profile') }}</span>
|
||||
</a-menu-item> -->
|
||||
<a-menu-item key="settings">
|
||||
<template #icon>
|
||||
<SettingOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.settings') }}</span>
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="logout">
|
||||
<template #icon>
|
||||
<LogoutOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.logout') }}</span>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.nick {
|
||||
padding-left: 8px;
|
||||
padding-right: 16px;
|
||||
font-size: 16px;
|
||||
max-width: 164px;
|
||||
white-space: nowrap;
|
||||
text-align: start;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
246
src/layouts/components/RightContent.vue
Normal file
246
src/layouts/components/RightContent.vue
Normal file
@@ -0,0 +1,246 @@
|
||||
<script setup lang="ts">
|
||||
import svgLight from '@/assets/svg/light.svg';
|
||||
import svgDark from '@/assets/svg/dark.svg';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { viewTransitionTheme } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useFullscreen } from '@vueuse/core';
|
||||
import { hasPermissions } from '@/plugins/auth-user';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import useLayoutStore from '@/store/modules/layout';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAlarmStore from '@/store/modules/alarm';
|
||||
import useMaskStore from '@/store/modules/mask';
|
||||
const { isFullscreen, toggle } = useFullscreen();
|
||||
const { t, changeLocale, optionsLocale } = useI18n();
|
||||
const layoutStore = useLayoutStore();
|
||||
const maskStore = useMaskStore();
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
/**头像展开项点击 */
|
||||
function fnClick({ key }: MenuInfo) {
|
||||
switch (key) {
|
||||
case 'settings':
|
||||
router.push({ name: 'Settings' });
|
||||
break;
|
||||
case 'profile':
|
||||
router.push({ name: 'Profile' });
|
||||
break;
|
||||
case 'logout':
|
||||
userStore.fnLogOut().finally(() => router.push({ name: 'Login' }));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**锁屏确认 */
|
||||
const lockConfirm = ref<boolean>(false);
|
||||
/**锁屏密码 */
|
||||
const lockPasswd = ref<string>('');
|
||||
|
||||
/**锁屏按钮提示 */
|
||||
function fnClickLock() {
|
||||
lockConfirm.value = true;
|
||||
lockPasswd.value = '';
|
||||
maskStore.lockPasswd = '';
|
||||
}
|
||||
|
||||
/**锁屏确认跳转锁屏页面 */
|
||||
function fnClickLockToPage() {
|
||||
lockConfirm.value = false;
|
||||
maskStore.lockPasswd = lockPasswd.value;
|
||||
maskStore.handleMaskType('lock');
|
||||
router.push({ name: 'LockScreen', query: { redirect: route.path } });
|
||||
}
|
||||
|
||||
/**告警数按钮提示跳转 */
|
||||
function fnClickAlarm() {
|
||||
router.push({ name: 'ActiveAlarm_2088' });
|
||||
}
|
||||
|
||||
/**改变主题色 */
|
||||
function fnClickTheme(e: any) {
|
||||
viewTransitionTheme(isDarkMode => {
|
||||
layoutStore.changeConf('theme', isDarkMode ? 'light' : 'dark');
|
||||
}, e);
|
||||
}
|
||||
|
||||
/**改变多语言 */
|
||||
function fnChangeLocale(e: any) {
|
||||
changeLocale(e.key);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a-space :size="12" align="center">
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.alarm') }}</template>
|
||||
<a-button
|
||||
type="text"
|
||||
style="color: inherit"
|
||||
@click="fnClickAlarm"
|
||||
v-perms:has="['faultManage:active-alarm:index']"
|
||||
>
|
||||
<template #icon>
|
||||
<a-badge
|
||||
:count="useAlarmStore().activeAlarmTotal"
|
||||
:overflow-count="99"
|
||||
status="warning"
|
||||
style="color: inherit"
|
||||
>
|
||||
<BellOutlined />
|
||||
</a-badge>
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<!-- 锁屏操作 -->
|
||||
<span v-perms:has="['system:setting:lock']">
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.lock') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="fnClickLock()">
|
||||
<template #icon>
|
||||
<LockOutlined />
|
||||
</template>
|
||||
</a-button>
|
||||
<ProModal
|
||||
:drag="true"
|
||||
:center-y="true"
|
||||
:width="400"
|
||||
:minHeight="200"
|
||||
:mask-closable="false"
|
||||
v-model:open="lockConfirm"
|
||||
:title="t('loayouts.rightContent.lockTip')"
|
||||
@ok="fnClickLockToPage()"
|
||||
>
|
||||
<a-space>
|
||||
{{ t('loayouts.rightContent.lockPasswd') }}:
|
||||
<a-input-password
|
||||
v-model:value="lockPasswd"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
>
|
||||
<template #prefix>
|
||||
<a-tooltip
|
||||
:title="t('loayouts.rightContent.lockPasswdTip')"
|
||||
placement="topLeft"
|
||||
>
|
||||
<UnlockOutlined />
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-input-password>
|
||||
</a-space>
|
||||
</ProModal>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.fullscreen') }}</template>
|
||||
<a-button type="text" style="color: inherit" @click="toggle">
|
||||
<template #icon>
|
||||
<FullscreenExitOutlined v-if="isFullscreen" />
|
||||
<FullscreenOutlined v-else />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<a-tooltip placement="bottomRight">
|
||||
<template #title>{{ t('loayouts.rightContent.theme') }}</template>
|
||||
<a-button type="text" @click="fnClickTheme">
|
||||
<template #icon>
|
||||
<img
|
||||
v-if="layoutStore.proConfig.theme === 'dark'"
|
||||
:src="svgDark"
|
||||
class="theme-icon"
|
||||
/>
|
||||
<img v-else :src="svgLight" class="theme-icon" />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
||||
<a-dropdown
|
||||
placement="bottomRight"
|
||||
trigger="click"
|
||||
v-if="appStore.i18nOpen && hasPermissions(['system:setting:i18n'])"
|
||||
>
|
||||
<a-button type="text" style="color: inherit">
|
||||
<template #icon> <TranslationOutlined /> </template>
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnChangeLocale">
|
||||
<a-menu-item v-for="opt in optionsLocale" :key="opt.value">
|
||||
{{ opt.label }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
|
||||
<a-dropdown placement="bottomRight" trigger="click">
|
||||
<div class="user">
|
||||
<a-avatar
|
||||
shape="circle"
|
||||
size="default"
|
||||
:src="userStore.getAvatar"
|
||||
:alt="userStore.userName"
|
||||
></a-avatar>
|
||||
<span class="nick">
|
||||
{{ userStore.nickName }}
|
||||
</span>
|
||||
</div>
|
||||
<template #overlay>
|
||||
<a-menu @click="fnClick">
|
||||
<!-- <a-menu-item key="profile">
|
||||
<template #icon>
|
||||
<UserOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.profile') }}</span>
|
||||
</a-menu-item> -->
|
||||
<a-menu-item key="settings">
|
||||
<template #icon>
|
||||
<SettingOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.settings') }}</span>
|
||||
</a-menu-item>
|
||||
<a-menu-divider />
|
||||
<a-menu-item key="logout">
|
||||
<template #icon>
|
||||
<LogoutOutlined />
|
||||
</template>
|
||||
<span>{{ t('loayouts.rightContent.logout') }}</span>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.user {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
.nick {
|
||||
padding-left: 8px;
|
||||
padding-right: 16px;
|
||||
font-size: 16px;
|
||||
max-width: 164px;
|
||||
white-space: nowrap;
|
||||
text-align: start;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.theme-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
color: inherit;
|
||||
}
|
||||
</style>
|
||||
@@ -10,11 +10,8 @@ import { getAccessToken } from '@/plugins/auth-token';
|
||||
import { validHttp } from '@/utils/regular-utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useRouterStore from '@/store/modules/router';
|
||||
import useCoreStore from '@/store/modules/core';
|
||||
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.configure({ showSpinner: false });
|
||||
@@ -98,66 +95,46 @@ router.beforeEach(async (to, from, next) => {
|
||||
|
||||
// 有Token
|
||||
if (token) {
|
||||
// 防止重复访问登录页面
|
||||
if (to.path === '/login') {
|
||||
// 防止重复访问登录页面
|
||||
next({ name: 'Index' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 多核心网菜单跳转判断非网元路径
|
||||
const useCore = useCoreStore();
|
||||
if (
|
||||
appStore.serverType === APP_SERVER_TYPE_M &&
|
||||
useCore.currentCoreUid == useCore.globalDefaultCoreUid &&
|
||||
to.path.startsWith(CORE_NE_PATH)
|
||||
) {
|
||||
next({ name: 'NotPermission' });
|
||||
return;
|
||||
}
|
||||
|
||||
// 判断当前用户是否有角色信息
|
||||
const useUser = useUserStore();
|
||||
const useNe = useNeStore();
|
||||
if (useUser.roles && useUser.roles.length === 0) {
|
||||
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);
|
||||
} else {
|
||||
// 判断当前用户是否有角色信息
|
||||
const user = useUserStore();
|
||||
if (user.roles && user.roles.length === 0) {
|
||||
try {
|
||||
// 获取网元信息
|
||||
await useNeListStore().fnNelist();
|
||||
// 获取用户信息
|
||||
await user.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' });
|
||||
}
|
||||
// 刷新替换原先路由,确保addRoutes已完成
|
||||
next({ ...to, replace: true });
|
||||
} catch (error: any) {
|
||||
console.error(`[${to.path}]: ${error.message}`);
|
||||
await useUser.fnLogOut();
|
||||
next({ name: 'Login' });
|
||||
} else if (
|
||||
to.meta.neType &&
|
||||
to.meta.neType.length > 0 &&
|
||||
!useNeListStore().fnHasNe(to.meta.neType)
|
||||
) {
|
||||
next({ name: 'NotPermission' });
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 网元是否存在权限判断
|
||||
if (
|
||||
Array.isArray(to.meta.neType) &&
|
||||
to.meta.neType.length > 0 &&
|
||||
!useNe.fnHasNe(to.meta.neType)
|
||||
) {
|
||||
next({ name: 'NotPermission' });
|
||||
return;
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
path: '/index',
|
||||
name: 'Index',
|
||||
meta: { title: 'router.index', icon: 'icon-pcduan' },
|
||||
component: () => import('@/views/index/index.vue'),
|
||||
component: () => import('@/views/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/account',
|
||||
@@ -59,7 +59,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
path: '/trace-task-hlr',
|
||||
name: 'TraceTaskHLR', // 跟踪任务HLR
|
||||
meta: { title: 'router.traceTaskHLR', neType: ['UDM', 'HLR'] },
|
||||
component: () => import('@/views/ne/trace/task-hlr/index.vue'),
|
||||
component: () => import('@/views/traceManage/task-hlr/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/quick-start',
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
CACHE_LOCAL_I18N,
|
||||
CACHE_SESSION_CRYPTO_API,
|
||||
} from '@/constants/cache-keys-constants';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { RESULT_CODE_EXCEPTION, RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { delAccessToken, delRefreshToken } from '@/plugins/auth-token';
|
||||
import { parseUrlPath } from '@/plugins/file-static-url';
|
||||
import { localGet, localSet } from '@/utils/cache-local-utils';
|
||||
@@ -23,8 +23,8 @@ type AppStore = {
|
||||
version: string;
|
||||
/**系统引导使用 */
|
||||
bootloader: boolean;
|
||||
/**服务类型 oc 单核心网 mc 多核心网 tc 租户核心网 */
|
||||
serverType: string;
|
||||
/**服务版本 */
|
||||
serverVersion: string;
|
||||
// 用户登录认证
|
||||
loginAuth: boolean;
|
||||
// 用户接口加密
|
||||
@@ -60,7 +60,7 @@ const useAppStore = defineStore('app', {
|
||||
|
||||
version: '-',
|
||||
bootloader: false,
|
||||
serverType: '-',
|
||||
serverVersion: '-',
|
||||
loginAuth: true,
|
||||
cryptoApi: true,
|
||||
serialNum: '-',
|
||||
@@ -90,7 +90,7 @@ const useAppStore = defineStore('app', {
|
||||
const res = await getSysConf();
|
||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||
this.version = res.data.version;
|
||||
this.serverType = res.data.serverType;
|
||||
this.serverVersion = res.data.serverVersion;
|
||||
this.bootloader = res.data.bootloader === 'true';
|
||||
// 引导时
|
||||
if (this.bootloader) {
|
||||
@@ -131,7 +131,7 @@ const useAppStore = defineStore('app', {
|
||||
if (localI18n == null || (!this.i18nOpen && this.i18nDefault)) {
|
||||
localSet(CACHE_LOCAL_I18N, this.i18nDefault);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { defineStore } from 'pinia';
|
||||
import { listAllCoreInfo } from '@/api/ne_core/coreInfo';
|
||||
import {
|
||||
changeCoreUid,
|
||||
changeCurrent,
|
||||
current,
|
||||
currentCoreUid,
|
||||
} from '@/hooks/useCoreUid';
|
||||
|
||||
/**核心网信息类型 */
|
||||
type Core = {
|
||||
/**核心网列表 */
|
||||
coreList: Record<string, any>[];
|
||||
|
||||
/**当前选择 */
|
||||
currentSelect: Record<string, any>;
|
||||
/**当前核心网标识 */
|
||||
currentCoreUid: string;
|
||||
|
||||
/**选择器单级父类型 */
|
||||
coreSelectOtions: Record<string, any>[];
|
||||
/**全局选择 */
|
||||
globalDefaultSelect: { label: string; value: string };
|
||||
/**默认核心网标识 */
|
||||
globalDefaultCoreUid: string;
|
||||
};
|
||||
|
||||
const useCoreStore = defineStore('core', {
|
||||
state: (): Core => ({
|
||||
coreList: [],
|
||||
currentSelect: current(),
|
||||
currentCoreUid: currentCoreUid(),
|
||||
coreSelectOtions: [],
|
||||
globalDefaultSelect: {
|
||||
label: 'Global',
|
||||
value: 'YYMMDDHH',
|
||||
},
|
||||
globalDefaultCoreUid: 'YYMMDDHH',
|
||||
}),
|
||||
getters: {
|
||||
getSelectOtions(): Record<string, any>[] {
|
||||
return this.coreSelectOtions;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
/**设置当前选择 */
|
||||
setCurrent(v: { label: string; value: string }) {
|
||||
this.currentSelect = v;
|
||||
this.currentCoreUid = v.value;
|
||||
// 存储
|
||||
changeCurrent(v);
|
||||
changeCoreUid(v.value);
|
||||
},
|
||||
/**刷新核心网列表 */
|
||||
async fnCorelistRefresh() {
|
||||
this.coreList = [];
|
||||
return await this.fnCorelist();
|
||||
},
|
||||
// 获取核心网列表
|
||||
async fnCorelist() {
|
||||
// 有数据不请求
|
||||
if (this.coreList.length > 0) {
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS['en_US'],
|
||||
data: this.coreList,
|
||||
};
|
||||
}
|
||||
const res = await listAllCoreInfo({});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 原始列表
|
||||
this.coreList = JSON.parse(JSON.stringify(res.data));
|
||||
|
||||
// 转选择器单级父类型
|
||||
this.coreSelectOtions = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.coreName,
|
||||
value: item.coreUid,
|
||||
};
|
||||
});
|
||||
}
|
||||
// 当前未选择时
|
||||
this.coreSelectOtions.unshift(this.globalDefaultSelect);
|
||||
if (!this.currentSelect) {
|
||||
this.setCurrent(this.globalDefaultSelect);
|
||||
}
|
||||
return res;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default useCoreStore;
|
||||
@@ -70,9 +70,9 @@ const proRender = (render: any) => (render === false ? false : undefined);
|
||||
const proConfigLocal: LayoutStore['proConfig'] = localGetJSON(
|
||||
CACHE_LOCAL_PROCONFIG
|
||||
) || {
|
||||
layout: 'side',
|
||||
layout: 'mix',
|
||||
theme: 'light',
|
||||
menuTheme: 'dark',
|
||||
menuTheme: 'light',
|
||||
fixSiderbar: true,
|
||||
fixedHeader: true,
|
||||
splitMenus: true,
|
||||
|
||||
@@ -5,31 +5,22 @@ import {
|
||||
} from '@/constants/result-constants';
|
||||
import { listAllNeInfo } from '@/api/ne/neInfo';
|
||||
import { parseDataToOptions } from '@/utils/parse-tree-utils';
|
||||
import { currentCoreUid } from '@/hooks/useCoreUid';
|
||||
|
||||
/**网元信息类型 */
|
||||
type Ne = {
|
||||
/**网元列表信息类型 */
|
||||
type NeList = {
|
||||
/**网元列表 */
|
||||
list: Record<string, any>[];
|
||||
neList: Record<string, any>[];
|
||||
/**级联options树结构 */
|
||||
neCascaderOptions: Record<string, any>[];
|
||||
/**选择器单级父类型 */
|
||||
neSelectOtions: Record<string, any>[];
|
||||
/**Core数据级联options树结构 coreUid */
|
||||
coreDataNeCascaderOptions: Map<string, Record<string, any>[]>;
|
||||
/**Core选择器单级父类型 coreUid */
|
||||
coreDataNeSelectOtions: Map<string, Record<string, any>[]>;
|
||||
};
|
||||
|
||||
const useNeStore = defineStore('ne', {
|
||||
state: (): Ne => ({
|
||||
list: [],
|
||||
const useNeListStore = defineStore('ne_list', {
|
||||
state: (): NeList => ({
|
||||
neList: [],
|
||||
neCascaderOptions: [],
|
||||
neSelectOtions: [],
|
||||
/**Core数据级联options树结构 coreUid */
|
||||
coreDataNeCascaderOptions: new Map(),
|
||||
/**Core选择器单级父类型 coreUid */
|
||||
coreDataNeSelectOtions: new Map(),
|
||||
}),
|
||||
getters: {
|
||||
/**
|
||||
@@ -38,7 +29,7 @@ const useNeStore = defineStore('ne', {
|
||||
* @returns 级联options
|
||||
*/
|
||||
getNeList(state) {
|
||||
return state.list;
|
||||
return state.neList;
|
||||
},
|
||||
/**
|
||||
* 获取级联options树结构
|
||||
@@ -49,46 +40,28 @@ const useNeStore = defineStore('ne', {
|
||||
return state.neCascaderOptions;
|
||||
},
|
||||
/**
|
||||
* Core选择器单级父类型
|
||||
* 选择器单级父类型
|
||||
* @param state 内部属性不用传入
|
||||
* @returns 选择options
|
||||
*/
|
||||
getNeSelectOtions(state) {
|
||||
return state.neSelectOtions;
|
||||
},
|
||||
/**
|
||||
* Core获取级联options树结构
|
||||
* @param state 内部属性不用传入
|
||||
* @returns 级联options
|
||||
*/
|
||||
getCoreDataNeCascaderOptions(state) {
|
||||
const coreUid = currentCoreUid();
|
||||
return state.coreDataNeCascaderOptions.get(coreUid) || [];
|
||||
},
|
||||
/**
|
||||
* 选择器单级父类型
|
||||
* @param state 内部属性不用传入
|
||||
* @returns 选择options
|
||||
*/
|
||||
getCoreDataNeSelectOtions(state) {
|
||||
const coreUid = currentCoreUid();
|
||||
return state.coreDataNeSelectOtions.get(coreUid) || [];
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
// 刷新网元列表
|
||||
async fnNelistRefresh() {
|
||||
this.list = [];
|
||||
this.neList = [];
|
||||
return await this.fnNelist();
|
||||
},
|
||||
// 获取网元列表
|
||||
async fnNelist() {
|
||||
// 有数据不请求
|
||||
if (this.list.length > 0) {
|
||||
if (this.neList.length > 0) {
|
||||
return {
|
||||
code: RESULT_CODE_SUCCESS,
|
||||
msg: RESULT_MSG_SUCCESS['en_US'],
|
||||
data: this.list,
|
||||
data: this.neList,
|
||||
};
|
||||
}
|
||||
const res = await listAllNeInfo({
|
||||
@@ -97,15 +70,14 @@ const useNeStore = defineStore('ne', {
|
||||
});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 原始列表
|
||||
const originalList = JSON.parse(JSON.stringify(res.data));
|
||||
this.list = originalList;
|
||||
this.neList = JSON.parse(JSON.stringify(res.data));
|
||||
|
||||
// 转级联数据
|
||||
const options = parseDataToOptions(
|
||||
originalList,
|
||||
res.data,
|
||||
'neType',
|
||||
'neName',
|
||||
'neUid'
|
||||
'neId'
|
||||
);
|
||||
this.neCascaderOptions = options;
|
||||
|
||||
@@ -116,39 +88,6 @@ const useNeStore = defineStore('ne', {
|
||||
value: item.value,
|
||||
};
|
||||
});
|
||||
|
||||
// 根据coreUid分组
|
||||
let groupCore: Record<string, any[]> = {};
|
||||
for (const element of originalList) {
|
||||
if (element.coreId !== 0 && element.coreUid) {
|
||||
if (groupCore[element.coreUid]) {
|
||||
groupCore[element.coreUid].push(element);
|
||||
} else {
|
||||
groupCore[element.coreUid] = [element];
|
||||
}
|
||||
}
|
||||
}
|
||||
// 转Core数据级联options树结构
|
||||
for (const coreUid in groupCore) {
|
||||
const arr = groupCore[coreUid];
|
||||
// 转级联数据
|
||||
const cascaderOptions = parseDataToOptions(
|
||||
arr,
|
||||
'neType',
|
||||
'neName',
|
||||
'neUid'
|
||||
);
|
||||
this.coreDataNeCascaderOptions.set(coreUid, cascaderOptions);
|
||||
|
||||
// 转选择器单级父类型
|
||||
const selectOtions = cascaderOptions.map(item => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
};
|
||||
});
|
||||
this.coreDataNeSelectOtions.set(coreUid, selectOtions);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
},
|
||||
@@ -158,7 +97,7 @@ const useNeStore = defineStore('ne', {
|
||||
* @returns boolean
|
||||
*/
|
||||
fnHasNe(metaNeType: string[]) {
|
||||
if (this.list.length > 0) {
|
||||
if (this.neList.length > 0) {
|
||||
const neTypes = this.neSelectOtions.map(item => item.value);
|
||||
let match = false; // 匹配
|
||||
for (const netype of metaNeType) {
|
||||
@@ -181,4 +120,4 @@ const useNeStore = defineStore('ne', {
|
||||
},
|
||||
});
|
||||
|
||||
export default useNeStore;
|
||||
export default useNeListStore;
|
||||
@@ -68,10 +68,12 @@ const useRouterStore = defineStore('router', {
|
||||
return routes
|
||||
.map((item: RouteRecord | RouteRecordRaw) => {
|
||||
const finalItem = { ...item };
|
||||
|
||||
// 过滤网元类型
|
||||
let metaNeType: string[] = finalItem.meta?.neType || [];
|
||||
if (Array.isArray(metaNeType) && metaNeType.length > 0) {
|
||||
if (
|
||||
Array.isArray(finalItem.meta?.neType) &&
|
||||
finalItem.meta?.neType.length > 0
|
||||
) {
|
||||
let metaNeType: string[] = finalItem.meta.neType;
|
||||
let match = false; // 匹配
|
||||
for (const netype of metaNeType) {
|
||||
if (netype.indexOf('+') > -1) {
|
||||
|
||||
@@ -17,6 +17,35 @@ export const RFC3339 = 'YYYY-MM-DDTHH:mm:ssZ';
|
||||
/**国际时间 列如:Thu, Nov 14 2024 10:19 GMT+08:00 */
|
||||
export const RFC822Z = 'ddd, MMM DD YYYY HH:mm [GMT]Z';
|
||||
|
||||
// 映射时区偏移量与IANA时区名称关联
|
||||
export const offsetToIanaMap: Record<string, string> = {
|
||||
'+0000': 'UTC',
|
||||
'+0100': 'Europe/London',
|
||||
'+0200': 'Europe/Paris',
|
||||
'+0300': 'Europe/Moscow',
|
||||
'+0400': 'Asia/Dubai',
|
||||
'+0500': 'Asia/Karachi',
|
||||
'+0600': 'Asia/Almaty',
|
||||
'+0700': 'Asia/Bangkok',
|
||||
'+0800': 'Asia/Shanghai',
|
||||
'+0900': 'Asia/Tokyo',
|
||||
'+1000': 'Australia/Sydney',
|
||||
'+1100': 'Pacific/Noumea',
|
||||
'+1200': 'Pacific/Fiji',
|
||||
'-0100': 'America/Noronha',
|
||||
'-0200': 'Atlantic/Azores',
|
||||
'-0300': 'America/Argentina/Buenos_Aires',
|
||||
'-0400': 'America/New_York',
|
||||
'-0500': 'America/New_York',
|
||||
'-0600': 'America/Chicago',
|
||||
'-0700': 'America/Denver',
|
||||
'-0800': 'America/Los_Angeles',
|
||||
'-0900': 'Pacific/Honolulu',
|
||||
'-1000': 'Pacific/Honolulu',
|
||||
'-1100': 'Pacific/Pago_Pago',
|
||||
'-1200': 'Pacific/Kwajalein',
|
||||
};
|
||||
|
||||
/**
|
||||
* 格式时间字符串
|
||||
* @param dateStr 时间字符串
|
||||
@@ -53,9 +82,10 @@ export function parseDateUTCToStr(
|
||||
date: string | number | Date,
|
||||
offset: string = '+0000'
|
||||
): string {
|
||||
const ianaTimezone = offsetToIanaMap[offset] || 'UTC';
|
||||
return dayjs
|
||||
.utc(date) // 将时间戳按 UTC 时间
|
||||
.tz(offset) // 使用时区偏移
|
||||
.tz(ianaTimezone) // 使用时区偏移
|
||||
.format(`YYYY-MM-DD HH:mm:ss [UTC${offset}]`); // 格式化时间
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,11 +2,12 @@
|
||||
import { reactive, ref, onMounted, toRaw } from 'vue';
|
||||
import { PageContainer } from 'antdv-pro-layout';
|
||||
import { ProModal } from 'antdv-pro-modal';
|
||||
import { message, Modal, Form } from 'ant-design-vue/es';
|
||||
import { message, Modal, Form, notification } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
|
||||
import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import useNeStore from '@/store/modules/ne';
|
||||
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||
import useNeListStore from '@/store/modules/ne_list';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import {
|
||||
@@ -15,9 +16,9 @@ import {
|
||||
listCBC,
|
||||
updateCBCStatus,
|
||||
updateCBC,
|
||||
} from '@/api/neDataNf/cbc';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const neStore = useNeStore();
|
||||
} from '@/api/cbc/cbe';
|
||||
import { parseDateToStr, parseDuration } from '@/utils/date-utils';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
/**网元参数 */
|
||||
@@ -87,12 +88,12 @@ let tableState: TabeStateType = reactive({
|
||||
|
||||
/**表格字段列 */
|
||||
let tableColumns: ColumnsType = [
|
||||
{
|
||||
title: t('common.rowId'),
|
||||
dataIndex: 'id',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
// {
|
||||
// title: t('common.rowId'),
|
||||
// dataIndex: 'id',
|
||||
// align: 'left',
|
||||
// width: 100,
|
||||
// },
|
||||
{
|
||||
title: t('views.cbc.cbe.eventName'),
|
||||
dataIndex: 'messageJson',
|
||||
@@ -831,29 +832,33 @@ function pwsTypeChange(value: any) {
|
||||
|
||||
onMounted(() => {
|
||||
// 获取网元网元列表
|
||||
neStore.neCascaderOptions.forEach(item => {
|
||||
if (item.value === 'CBC') {
|
||||
neOtions.value = JSON.parse(JSON.stringify(item.children));
|
||||
}
|
||||
});
|
||||
if (neOtions.value.length === 0) {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
useNeListStore()
|
||||
.fnNelist()
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
if (res.data.length > 0) {
|
||||
let arr: Record<string, any>[] = [];
|
||||
res.data.forEach(i => {
|
||||
if (i.neType === 'CBC') {
|
||||
arr.push({ value: i.neId, label: i.neName });
|
||||
}
|
||||
});
|
||||
neOtions.value = arr;
|
||||
if (arr.length > 0) {
|
||||
queryParams.neId = arr[0].value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (neOtions.value.length > 0) {
|
||||
queryParams.neId = neOtions.value[0].value;
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('common.noData'),
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取列表数据
|
||||
fnGetList();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -20,13 +20,11 @@ import { PieChart } from 'echarts/charts';
|
||||
import { LabelLayout } from 'echarts/features';
|
||||
import { useRoute } from 'vue-router';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useCoreStore from '@/store/modules/core';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import { listAllNeInfo } from '@/api/ne/neInfo';
|
||||
import { parseDateToStr } from '@/utils/date-utils';
|
||||
const { getDict } = useDictStore();
|
||||
const appStore = useAppStore();
|
||||
const coreStore = useCoreStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
@@ -65,7 +63,7 @@ let tableColumns: ColumnsType = [
|
||||
align: 'left',
|
||||
customRender(opt) {
|
||||
if (opt.value?.refreshTime) {
|
||||
return parseDateToStr(opt.value?.refreshTime, 'HH:mm:ss');
|
||||
return parseDateToStr(opt.value?.refreshTime);
|
||||
}
|
||||
return '-';
|
||||
},
|
||||
@@ -96,11 +94,8 @@ let tableColumns: ColumnsType = [
|
||||
},
|
||||
{
|
||||
title: t('views.index.ipAddress'),
|
||||
dataIndex: 'serverState',
|
||||
dataIndex: 'ip',
|
||||
align: 'left',
|
||||
customRender(opt) {
|
||||
return opt.value?.neIP || '-';
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -128,10 +123,7 @@ let serverState: any = ref({});
|
||||
async function fnGetList(reload: boolean = false) {
|
||||
tableState.loading = !reload;
|
||||
try {
|
||||
const res = await listAllNeInfo({
|
||||
coreUid: coreStore.currentCoreUid,
|
||||
bandStatus: true,
|
||||
});
|
||||
const res = await listAllNeInfo({ bandStatus: true });
|
||||
tableState.data = res.data;
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
@@ -156,7 +148,7 @@ async function fnGetList(reload: boolean = false) {
|
||||
if (!reload) {
|
||||
// 选择第一个
|
||||
if (tableState.data.length > 0) {
|
||||
const item = tableState.data.find((item: any) => item.status === 1);
|
||||
const item = tableState.data.find((item: any) => item.status === 1)
|
||||
if (item) {
|
||||
const id = item.id;
|
||||
fnTableSelectedRowKeys([id]);
|
||||
@@ -257,6 +249,7 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
|
||||
{
|
||||
// cpuUse: `NE:${nfCpuP}%; SYS:${sysCpuP}%`,
|
||||
// memoryUse: `Total: ${totalMemInMB}MB; NE: ${nfUsedMemInMB}MB; SYS: ${sysMemUsageInMB}MB`,
|
||||
neIP: row.ip,
|
||||
},
|
||||
neState
|
||||
);
|
||||
@@ -320,22 +313,13 @@ onBeforeUnmount(() => {
|
||||
<a-row :gutter="16">
|
||||
<a-col :lg="14" :md="16" :xs="24">
|
||||
<!-- 表格列表 -->
|
||||
<a-table
|
||||
class="table"
|
||||
row-key="id"
|
||||
size="small"
|
||||
:columns="tableColumns"
|
||||
:data-source="tableState.data"
|
||||
:loading="tableState.loading"
|
||||
:pagination="false"
|
||||
:scroll="{ x: true }"
|
||||
:row-selection="{
|
||||
<a-table class="table" row-key="id" size="small" :columns="tableColumns" :data-source="tableState.data"
|
||||
:loading="tableState.loading" :pagination="false" :scroll="{ x: true }" :row-selection="{
|
||||
type: 'radio',
|
||||
columnWidth: '48px',
|
||||
selectedRowKeys: tableState.selectedRowKeys,
|
||||
onChange: fnTableSelectedRowKeys,
|
||||
}"
|
||||
>
|
||||
}">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'status'">
|
||||
<DictTag :options="dict.neInfoStatus" :value="record.status" />
|
||||
@@ -344,24 +328,12 @@ onBeforeUnmount(() => {
|
||||
</a-table>
|
||||
</a-col>
|
||||
<a-col :lg="10" :md="8" :xs="24">
|
||||
<a-card
|
||||
:title="t('views.index.runStatus')"
|
||||
style="margin-bottom: 16px"
|
||||
size="small"
|
||||
>
|
||||
<a-card :title="t('views.index.runStatus')" style="margin-bottom: 16px" size="small">
|
||||
<div style="width: 100%; min-height: 200px" ref="statusBar"></div>
|
||||
</a-card>
|
||||
<a-card
|
||||
:loading="tableState.loading"
|
||||
:title="`${t('views.index.mark')} - ${serverState.neName || 'OMC'}`"
|
||||
style="margin-top: 16px"
|
||||
size="small"
|
||||
>
|
||||
<a-descriptions
|
||||
bordered
|
||||
:column="1"
|
||||
:label-style="{ width: '160px' }"
|
||||
>
|
||||
<a-card :loading="tableState.loading" :title="`${t('views.index.mark')} - ${serverState.neName || 'OMC'}`"
|
||||
style="margin-top: 16px" size="small">
|
||||
<a-descriptions bordered :column="1" :label-style="{ width: '160px' }">
|
||||
<a-descriptions-item :label="t('views.index.hostName')">
|
||||
{{ serverState.hostname }}
|
||||
</a-descriptions-item>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>UE接入事件 实时</h1>
|
||||
</a-card>
|
||||
</PageContainer>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>网元VM资源 周期获取</h1>
|
||||
</a-card>
|
||||
</PageContainer>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,16 +0,0 @@
|
||||
<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>
|
||||
@@ -1,85 +0,0 @@
|
||||
import { delNeConfigData } from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { reactive } from 'vue';
|
||||
|
||||
/**
|
||||
* 批量删除array
|
||||
* @param param 父级传入 { t, neTypeSelect, fnActiveConfigNode }
|
||||
* @returns
|
||||
*/
|
||||
export default function useArrayBatch({
|
||||
t,
|
||||
neTypeSelect,
|
||||
fnActiveConfigNode,
|
||||
}: any) {
|
||||
/**状态属性 */
|
||||
const batchState = reactive({
|
||||
open: false,
|
||||
loading: false, //批量删除
|
||||
paramName: '',
|
||||
startIndex: 1,
|
||||
num: 1,
|
||||
});
|
||||
|
||||
/**对话框表格信息导入弹出窗口 */
|
||||
function modalBatchOpen(paramName: string) {
|
||||
batchState.paramName = paramName;
|
||||
batchState.open = true;
|
||||
}
|
||||
function modalBatchClose() {
|
||||
if (batchState.loading) {
|
||||
message.error({
|
||||
content: 'Delete is in progress, please wait for it to complete',
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
batchState.open = false;
|
||||
batchState.loading = false;
|
||||
batchState.startIndex = 1;
|
||||
batchState.num = 1;
|
||||
fnActiveConfigNode('#');
|
||||
}
|
||||
|
||||
async function modalBatchOk() {
|
||||
let okNum = 0;
|
||||
let failNum = 0;
|
||||
const endIndex = batchState.startIndex + batchState.num - 1;
|
||||
for (let i = endIndex; i >= batchState.startIndex; i--) {
|
||||
const res = await delNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: batchState.paramName,
|
||||
loc: `${i}`,
|
||||
});
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
okNum++;
|
||||
} else {
|
||||
failNum++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (okNum > 0) {
|
||||
message.success({
|
||||
content: `Successfully deleted ${okNum} items`,
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
if (failNum > 0) {
|
||||
message.error({
|
||||
content: `Delete failed, please check the index range`,
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
modalBatchClose();
|
||||
}
|
||||
|
||||
return {
|
||||
batchState,
|
||||
modalBatchOpen,
|
||||
modalBatchClose,
|
||||
modalBatchOk,
|
||||
};
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
import { addNeConfigData, editNeConfigData } from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { readSheet } from '@/utils/execl-utils';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { reactive } from 'vue';
|
||||
import saveAs from 'file-saver';
|
||||
|
||||
/**
|
||||
* 导入文件加array
|
||||
* @param param 父级传入 { t, neTypeSelect, arrayState, fnActiveConfigNode }
|
||||
* @returns
|
||||
*/
|
||||
export default function useArrayImport({
|
||||
t,
|
||||
neTypeSelect,
|
||||
arrayState,
|
||||
fnActiveConfigNode,
|
||||
}: any) {
|
||||
/**网元导入模板解析 */
|
||||
const m: Record<string, any> = {
|
||||
AMF: {
|
||||
imeiWhitelist: {
|
||||
filename: 'import_amf_imeiWhitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imeiPrefixValue: `${row['IMEI Prefix']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
whitelist: {
|
||||
filename: 'import_amf_whitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imsiValue: `${row['IMSI Value']}`,
|
||||
imeiValue: `${row['IMEI Value/Prefix']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
MME: {
|
||||
white_list: {
|
||||
filename: 'import_mme_imeiWhitelist_template',
|
||||
fileetx: '.xlsx',
|
||||
itemKey: 'index',
|
||||
item: (row: Record<string, any>) => {
|
||||
const index = row['Index'] || 0;
|
||||
return {
|
||||
imei: `${row['IMEI']}`,
|
||||
index: parseInt(index),
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/**状态属性 */
|
||||
const importState = reactive({
|
||||
open: false,
|
||||
msgArr: [] as string[],
|
||||
loading: false, //开始导入
|
||||
itemKey: '', // 解析item的key
|
||||
item: null as any, // 解析item方法
|
||||
paramName: '',
|
||||
filename: '',
|
||||
fileetx: '',
|
||||
});
|
||||
|
||||
/**对话框表格信息导入弹出窗口 */
|
||||
function modalImportOpen(neType: string, paramName: string) {
|
||||
const tmpM = m[neType][paramName];
|
||||
importState.itemKey = tmpM.itemKey;
|
||||
importState.item = tmpM.item;
|
||||
importState.paramName = paramName;
|
||||
importState.filename = tmpM.filename;
|
||||
importState.fileetx = tmpM.fileetx;
|
||||
importState.open = true;
|
||||
}
|
||||
function modalImportClose() {
|
||||
if (importState.loading) {
|
||||
message.error({
|
||||
content: 'Import is in progress, please wait for it to complete',
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
importState.open = false;
|
||||
importState.msgArr = [];
|
||||
importState.loading = false;
|
||||
fnActiveConfigNode('#');
|
||||
}
|
||||
|
||||
/**对话框表格信息导入上传 */
|
||||
async function modalImportUpload(file: File) {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
importState.msgArr = [];
|
||||
|
||||
// 获取最大index
|
||||
let index = 0;
|
||||
if (arrayState.columnsData.length <= 0) {
|
||||
index = 0;
|
||||
} else {
|
||||
const last = arrayState.columnsData[arrayState.columnsData.length - 1];
|
||||
index = last.index.value + 1;
|
||||
}
|
||||
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e: any) {
|
||||
const arrayBuffer = e.target.result;
|
||||
readSheet(arrayBuffer).then(async rows => {
|
||||
if (rows.length <= 0) {
|
||||
hide();
|
||||
message.error({
|
||||
content: t('views.neData.baseStation.importDataEmpty'),
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 开始导入
|
||||
importState.loading = true;
|
||||
for (const row of rows) {
|
||||
const rowItem = importState.item(row);
|
||||
const rowKey = rowItem[importState.itemKey] || -1;
|
||||
let result: any = null;
|
||||
// 检查index是否定义
|
||||
const has = arrayState.columnsData.find(
|
||||
(item: any) => item[importState.itemKey].value === rowKey
|
||||
);
|
||||
if (has) {
|
||||
// 已定义则更新
|
||||
rowItem.index = has.index.value;
|
||||
result = await editNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: importState.paramName,
|
||||
paramData: rowItem,
|
||||
loc: `${rowItem.index}`,
|
||||
});
|
||||
let msg = `index:${rowItem.index} update fail`;
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
msg = `index:${rowItem.index} update success`;
|
||||
}
|
||||
importState.msgArr.push(msg);
|
||||
} else {
|
||||
// 未定义则新增
|
||||
result = await addNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: importState.paramName,
|
||||
paramData: Object.assign(rowItem, { index }),
|
||||
loc: `${index}`,
|
||||
});
|
||||
let msg = `index:${index} add fail`;
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
msg = `index:${index} add success`;
|
||||
index += 1;
|
||||
}
|
||||
importState.msgArr.push(msg);
|
||||
}
|
||||
}
|
||||
|
||||
hide();
|
||||
importState.loading = false;
|
||||
});
|
||||
};
|
||||
reader.onerror = function (e) {
|
||||
hide();
|
||||
console.error('reader file error:', e);
|
||||
};
|
||||
reader.readAsArrayBuffer(file);
|
||||
}
|
||||
|
||||
/**对话框表格信息导入模板 */
|
||||
function modalImportTemplate() {
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
|
||||
const baseUrl = import.meta.env.VITE_HISTORY_BASE_URL;
|
||||
const templateUrl = `${
|
||||
baseUrl.length === 1 && baseUrl.indexOf('/') === 0
|
||||
? ''
|
||||
: baseUrl.indexOf('/') === -1
|
||||
? '/' + baseUrl
|
||||
: baseUrl
|
||||
}/neDataImput`;
|
||||
saveAs(
|
||||
`${templateUrl}/${importState.filename}${importState.fileetx}`,
|
||||
`${importState.filename}_${Date.now()}${importState.fileetx}`
|
||||
);
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
return {
|
||||
importState,
|
||||
modalImportOpen,
|
||||
modalImportClose,
|
||||
modalImportUpload,
|
||||
modalImportTemplate,
|
||||
};
|
||||
}
|
||||
@@ -1,411 +0,0 @@
|
||||
import {
|
||||
addNeConfigData,
|
||||
delNeConfigData,
|
||||
editNeConfigData,
|
||||
} from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { reactive, watch } from 'vue';
|
||||
|
||||
/**
|
||||
* 参数配置array类型
|
||||
* @param param 父级传入 { t, treeState, neTypeSelect, fnActiveConfigNode, ruleVerification, modalState, fnModalCancel}
|
||||
* @returns
|
||||
*/
|
||||
export default function useConfigArray({
|
||||
t,
|
||||
treeState,
|
||||
neTypeSelect,
|
||||
fnActiveConfigNode,
|
||||
ruleVerification,
|
||||
modalState,
|
||||
fnModalCancel,
|
||||
}: any) {
|
||||
/**多列列表状态类型 */
|
||||
type ArrayStateType = {
|
||||
/**紧凑型 */
|
||||
size: SizeType;
|
||||
/**多列嵌套记录字段 */
|
||||
columns: Record<string, any>[];
|
||||
/**表格字段列排序 */
|
||||
columnsDnd: Record<string, any>[];
|
||||
/**多列记录数据 */
|
||||
columnsData: Record<string, any>[];
|
||||
/**多列嵌套展开key */
|
||||
arrayChildExpandKeys: any[];
|
||||
|
||||
/**多列记录数据 */
|
||||
data: Record<string, any>[];
|
||||
/**多列记录规则 */
|
||||
dataRule: Record<string, any>;
|
||||
};
|
||||
|
||||
/**多列列表状态 */
|
||||
let arrayState: ArrayStateType = reactive({
|
||||
size: 'small',
|
||||
columns: [],
|
||||
columnsDnd: [],
|
||||
columnsData: [],
|
||||
arrayChildExpandKeys: [],
|
||||
data: [],
|
||||
dataRule: {},
|
||||
});
|
||||
|
||||
/**多列表编辑 */
|
||||
function arrayEdit(rowIndex: Record<string, any>) {
|
||||
const item = arrayState.data.find((s: any) => s.key === rowIndex.value);
|
||||
if (!item) return;
|
||||
const from = arrayInitEdit(item, arrayState.dataRule);
|
||||
// 处理信息
|
||||
const row: Record<string, any> = {};
|
||||
for (const v of from.record) {
|
||||
if (Array.isArray(v.array)) {
|
||||
continue;
|
||||
}
|
||||
row[v.name] = Object.assign({}, v);
|
||||
}
|
||||
|
||||
// 特殊SMF-upfid选择
|
||||
if (neTypeSelect.value[0] === 'SMF' && Reflect.has(row, 'upfId')) {
|
||||
const v = row.upfId.value;
|
||||
if (typeof v === 'string') {
|
||||
if (v === '') {
|
||||
row.upfId.value = [];
|
||||
} else if (v.includes(';')) {
|
||||
row.upfId.value = v.split(';');
|
||||
} else if (v.includes(',')) {
|
||||
row.upfId.value = v.split(',');
|
||||
} else {
|
||||
row.upfId.value = [v];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modalState.from = row;
|
||||
modalState.type = 'arrayEdit';
|
||||
modalState.title = `${treeState.selectNode.paramDisplay} ${from.title}`;
|
||||
modalState.key = from.key;
|
||||
modalState.data = from.record.filter((v: any) => !Array.isArray(v.array));
|
||||
modalState.open = true;
|
||||
|
||||
// 关闭嵌套
|
||||
arrayState.arrayChildExpandKeys = [];
|
||||
}
|
||||
|
||||
/**多列表编辑关闭 */
|
||||
function arrayEditClose() {
|
||||
arrayState.arrayChildExpandKeys = [];
|
||||
fnModalCancel();
|
||||
}
|
||||
|
||||
/**多列表编辑确认 */
|
||||
function arrayEditOk(from: Record<string, any>) {
|
||||
const loc = `${from['index']['value']}`;
|
||||
|
||||
// 特殊SMF-upfid选择
|
||||
if (neTypeSelect.value[0] === 'SMF' && Reflect.has(from, 'upfId')) {
|
||||
const v = from.upfId.value;
|
||||
if (Array.isArray(v)) {
|
||||
from.upfId.value = v.join(';');
|
||||
}
|
||||
}
|
||||
|
||||
// 遍历提取属性和值
|
||||
let data: Record<string, any> = {};
|
||||
for (const key in from) {
|
||||
// 子嵌套的不插入
|
||||
if (from[key]['array']) {
|
||||
continue;
|
||||
}
|
||||
// 检查规则
|
||||
const [ok, msg] = ruleVerification(from[key]);
|
||||
if (!ok) {
|
||||
message.warning({
|
||||
content: `${msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
data[key] = from[key]['value'];
|
||||
}
|
||||
|
||||
// 发送
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
editNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
paramData: data,
|
||||
loc: loc,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.updateItem', {
|
||||
num: modalState.title,
|
||||
}),
|
||||
duration: 3,
|
||||
});
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('views.ne.neConfig.updateItemErr'),
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
arrayEditClose();
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表删除单行 */
|
||||
function arrayDelete(rowIndex: Record<string, any>) {
|
||||
const loc = `${rowIndex.value}`;
|
||||
const title = `${treeState.selectNode.paramDisplay} Index-${loc}`;
|
||||
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.ne.neConfig.delItemTip', {
|
||||
num: title,
|
||||
}),
|
||||
onOk() {
|
||||
delNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
loc: loc,
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.delItemOk', {
|
||||
num: title,
|
||||
}),
|
||||
duration: 2,
|
||||
});
|
||||
arrayEditClose();
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表新增单行 */
|
||||
function arrayAdd() {
|
||||
const from = arrayInitAdd(arrayState.data, arrayState.dataRule);
|
||||
|
||||
// 处理信息
|
||||
const row: Record<string, any> = {};
|
||||
for (const v of from.record) {
|
||||
if (Array.isArray(v.array)) {
|
||||
continue;
|
||||
}
|
||||
row[v.name] = Object.assign({}, v);
|
||||
}
|
||||
|
||||
// 特殊SMF-upfid选择
|
||||
if (neTypeSelect.value[0] === 'SMF' && Reflect.has(row, 'upfId')) {
|
||||
const v = row.upfId.value;
|
||||
if (typeof v === 'string') {
|
||||
if (v === '') {
|
||||
row.upfId.value = [];
|
||||
} else if (v.includes(';')) {
|
||||
row.upfId.value = v.split(';');
|
||||
} else if (v.includes(',')) {
|
||||
row.upfId.value = v.split(',');
|
||||
} else {
|
||||
row.upfId.value = [v];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
modalState.from = row;
|
||||
modalState.type = 'arrayAdd';
|
||||
modalState.title = `${treeState.selectNode.paramDisplay} ${from.title}`;
|
||||
modalState.key = from.key;
|
||||
modalState.data = from.record.filter((v: any) => !Array.isArray(v.array));
|
||||
modalState.open = true;
|
||||
}
|
||||
|
||||
/**多列表新增单行确认 */
|
||||
function arrayAddOk(from: Record<string, any>) {
|
||||
// 特殊SMF-upfid选择
|
||||
if (neTypeSelect.value[0] === 'SMF' && Reflect.has(from, 'upfId')) {
|
||||
const v = from.upfId.value;
|
||||
if (Array.isArray(v)) {
|
||||
from.upfId.value = v.join(';');
|
||||
}
|
||||
}
|
||||
|
||||
// 遍历提取属性和值
|
||||
let data: Record<string, any> = {};
|
||||
for (const key in from) {
|
||||
// 子嵌套的不插入
|
||||
if (from[key]['array']) {
|
||||
continue;
|
||||
}
|
||||
// 检查规则
|
||||
const [ok, msg] = ruleVerification(from[key]);
|
||||
if (!ok) {
|
||||
message.warning({
|
||||
content: `${msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
data[key] = from[key]['value'];
|
||||
}
|
||||
|
||||
// 发送
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
addNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
paramData: data,
|
||||
loc: `${from['index']['value']}`,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.addItemOk', {
|
||||
num: modalState.title,
|
||||
}),
|
||||
duration: 3,
|
||||
});
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('views.ne.neConfig.addItemErr'),
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
arrayEditClose();
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表编辑行数据初始化 */
|
||||
function arrayInitEdit(data: Record<string, any>, dataRule: any) {
|
||||
const dataFrom = data.record;
|
||||
const ruleFrom = Object.assign({}, JSON.parse(JSON.stringify(dataRule)));
|
||||
for (const row of ruleFrom.record) {
|
||||
// 子嵌套的不初始
|
||||
if (row.array) {
|
||||
row.value = [];
|
||||
continue;
|
||||
}
|
||||
// 查找项的值
|
||||
const item = dataFrom.find((s: any) => s.name === row.name);
|
||||
if (!item) {
|
||||
continue;
|
||||
}
|
||||
// 可选的
|
||||
row.optional = 'true';
|
||||
// 根据规则类型转值
|
||||
if (['enum', 'int'].includes(row.type)) {
|
||||
row.value = Number(item.value);
|
||||
} else if ('bool' === row.type) {
|
||||
row.value = Boolean(item.value);
|
||||
} else {
|
||||
row.value = item.value;
|
||||
}
|
||||
}
|
||||
ruleFrom.key = data.key;
|
||||
ruleFrom.title = data.title;
|
||||
return ruleFrom;
|
||||
}
|
||||
|
||||
/**多列表新增行数据初始化 */
|
||||
function arrayInitAdd(data: any[], dataRule: any) {
|
||||
// 有数据时取得最后的index
|
||||
let dataLastIndex = 0;
|
||||
if (data.length !== 0) {
|
||||
const lastFrom = Object.assign(
|
||||
{},
|
||||
JSON.parse(JSON.stringify(data.at(-1)))
|
||||
);
|
||||
if (lastFrom.record.length > 0) {
|
||||
dataLastIndex = parseInt(lastFrom.key);
|
||||
dataLastIndex += 1;
|
||||
}
|
||||
}
|
||||
|
||||
const ruleFrom = Object.assign({}, JSON.parse(JSON.stringify(dataRule)));
|
||||
for (const row of ruleFrom.record) {
|
||||
// 子嵌套的不初始
|
||||
if (row.array) {
|
||||
row.value = [];
|
||||
continue;
|
||||
}
|
||||
// 可选的
|
||||
row.optional = 'true';
|
||||
// index值
|
||||
if (row.name === 'index') {
|
||||
let newIndex =
|
||||
dataLastIndex !== 0 ? dataLastIndex : parseInt(row.value);
|
||||
if (isNaN(newIndex)) {
|
||||
newIndex = 0;
|
||||
}
|
||||
row.value = newIndex;
|
||||
ruleFrom.key = newIndex;
|
||||
ruleFrom.title = `Index-${newIndex}`;
|
||||
continue;
|
||||
}
|
||||
// 根据规则类型转值
|
||||
if (['enum', 'int'].includes(row.type)) {
|
||||
row.value = Number(row.value);
|
||||
}
|
||||
if ('bool' === row.type) {
|
||||
row.value = Boolean(row.value);
|
||||
}
|
||||
|
||||
// 特殊SMF-upfid选择
|
||||
if (neTypeSelect.value[0] === 'SMF' && row.name === 'upfId') {
|
||||
const v = row.value;
|
||||
if (typeof v === 'string') {
|
||||
if (v === '') {
|
||||
row.value = [];
|
||||
} else if (v.includes(';')) {
|
||||
row.value = v.split(';');
|
||||
} else if (v.includes(',')) {
|
||||
row.value = v.split(',');
|
||||
} else {
|
||||
row.value = [v];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ruleFrom;
|
||||
}
|
||||
|
||||
// 监听表格字段列排序变化关闭展开
|
||||
watch(
|
||||
() => arrayState.columnsDnd,
|
||||
() => {
|
||||
arrayEditClose();
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
arrayState,
|
||||
arrayEdit,
|
||||
arrayEditClose,
|
||||
arrayEditOk,
|
||||
arrayDelete,
|
||||
arrayAdd,
|
||||
arrayAddOk,
|
||||
arrayInitEdit,
|
||||
arrayInitAdd,
|
||||
};
|
||||
}
|
||||
@@ -1,352 +0,0 @@
|
||||
import {
|
||||
addNeConfigData,
|
||||
editNeConfigData,
|
||||
delNeConfigData,
|
||||
} from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { nextTick, reactive } from 'vue';
|
||||
|
||||
/**
|
||||
* 参数配置array类型的嵌套array
|
||||
* @param param 父级传入 { t, treeState, neTypeSelect, fnActiveConfigNode, ruleVerification, modalState, arrayState, arrayInitEdit, arrayInitAdd, arrayEditClose}
|
||||
* @returns
|
||||
*/
|
||||
export default function useConfigArrayChild({
|
||||
t,
|
||||
treeState,
|
||||
neTypeSelect,
|
||||
fnActiveConfigNode,
|
||||
ruleVerification,
|
||||
modalState,
|
||||
arrayState,
|
||||
arrayInitEdit,
|
||||
arrayInitAdd,
|
||||
arrayEditClose,
|
||||
}: any) {
|
||||
/**多列嵌套列表状态类型 */
|
||||
type ArrayChildStateType = {
|
||||
/**标题 */
|
||||
title: string;
|
||||
/**层级index */
|
||||
loc: string;
|
||||
/**紧凑型 */
|
||||
size: SizeType;
|
||||
/**多列嵌套记录字段 */
|
||||
columns: Record<string, any>[];
|
||||
/**表格字段列排序 */
|
||||
columnsDnd: Record<string, any>[];
|
||||
/**多列记录数据 */
|
||||
columnsData: Record<string, any>[];
|
||||
|
||||
/**多列嵌套记录数据 */
|
||||
data: Record<string, any>[];
|
||||
/**多列嵌套记录规则 */
|
||||
dataRule: Record<string, any>;
|
||||
};
|
||||
|
||||
/**多列嵌套表格状态 */
|
||||
let arrayChildState: ArrayChildStateType = reactive({
|
||||
title: '',
|
||||
loc: '',
|
||||
size: 'small',
|
||||
columns: [],
|
||||
columnsDnd: [],
|
||||
columnsData: [],
|
||||
data: [],
|
||||
dataRule: {},
|
||||
});
|
||||
|
||||
/**多列表展开嵌套行 */
|
||||
function arrayChildExpand(
|
||||
indexRow: Record<string, any>,
|
||||
row: Record<string, any>
|
||||
) {
|
||||
const loc = indexRow.value;
|
||||
if (arrayChildState.loc === `${loc}/${row.name}`) {
|
||||
arrayChildState.loc = '';
|
||||
arrayState.arrayChildExpandKeys = [];
|
||||
return;
|
||||
}
|
||||
arrayChildState.loc = '';
|
||||
arrayState.arrayChildExpandKeys = [];
|
||||
const from = Object.assign({}, JSON.parse(JSON.stringify(row)));
|
||||
// 无数据时
|
||||
if (!Array.isArray(from.value)) {
|
||||
from.value = [];
|
||||
}
|
||||
const dataArr = Object.freeze(from.value);
|
||||
const ruleArr = Object.freeze(from.array);
|
||||
|
||||
// 列表项数据
|
||||
const dataArray: Record<string, any>[] = [];
|
||||
for (const item of dataArr) {
|
||||
const index = item['index'];
|
||||
let record: Record<string, any>[] = [];
|
||||
for (const key of Object.keys(item)) {
|
||||
// 规则为准
|
||||
for (const rule of ruleArr) {
|
||||
if (rule['name'] === key) {
|
||||
const ruleItem = Object.assign({ optional: 'true' }, rule, {
|
||||
value: item[key],
|
||||
});
|
||||
record.push(ruleItem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// dataArray.push(record);
|
||||
dataArray.push({ title: `Index-${index}`, key: index, record });
|
||||
}
|
||||
arrayChildState.data = dataArray;
|
||||
|
||||
// 无数据时,用于新增
|
||||
arrayChildState.dataRule = {
|
||||
title: `Index-0`,
|
||||
key: 0,
|
||||
record: ruleArr,
|
||||
};
|
||||
|
||||
// 列表数据
|
||||
const columnsData: Record<string, any>[] = [];
|
||||
for (const v of arrayChildState.data) {
|
||||
const row: Record<string, any> = {};
|
||||
for (const item of v.record) {
|
||||
row[item.name] = item;
|
||||
}
|
||||
columnsData.push(row);
|
||||
}
|
||||
arrayChildState.columnsData = columnsData;
|
||||
|
||||
// 列表字段
|
||||
const columns: Record<string, any>[] = [];
|
||||
for (const rule of arrayChildState.dataRule.record) {
|
||||
columns.push({
|
||||
title: rule.display,
|
||||
dataIndex: rule.name,
|
||||
align: 'left',
|
||||
resizable: true,
|
||||
width: 50,
|
||||
minWidth: 50,
|
||||
maxWidth: 250,
|
||||
});
|
||||
}
|
||||
columns.push({
|
||||
title: t('common.operate'),
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
});
|
||||
arrayChildState.columns = columns;
|
||||
|
||||
nextTick(() => {
|
||||
// 设置展开key
|
||||
arrayState.arrayChildExpandKeys = [indexRow];
|
||||
// 层级标识
|
||||
arrayChildState.loc = `${loc}/${from['name']}`;
|
||||
// 设置展开列表标题
|
||||
arrayChildState.title = `${from['display']}`;
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表嵌套行编辑 */
|
||||
function arrayChildEdit(rowIndex: Record<string, any>) {
|
||||
const item = arrayChildState.data.find(
|
||||
(s: any) => s.key === rowIndex.value
|
||||
);
|
||||
if (!item) return;
|
||||
const from = arrayInitEdit(item, arrayChildState.dataRule);
|
||||
// 处理信息
|
||||
const row: Record<string, any> = {};
|
||||
for (const v of from.record) {
|
||||
if (Array.isArray(v.array)) {
|
||||
continue;
|
||||
}
|
||||
row[v.name] = Object.assign({}, v);
|
||||
}
|
||||
|
||||
modalState.from = row;
|
||||
modalState.type = 'arrayChildEdit';
|
||||
modalState.title = `${arrayChildState.title} ${from.title}`;
|
||||
modalState.key = from.key;
|
||||
modalState.data = from.record.filter((v: any) => !Array.isArray(v.array));
|
||||
modalState.open = true;
|
||||
}
|
||||
|
||||
/**多列表嵌套行编辑确认 */
|
||||
function arrayChildEditOk(from: Record<string, any>) {
|
||||
const loc = `${arrayChildState.loc}/${from['index']['value']}`;
|
||||
|
||||
let data: Record<string, any> = {};
|
||||
for (const key in from) {
|
||||
// 子嵌套的不插入
|
||||
if (from[key]['array']) {
|
||||
continue;
|
||||
}
|
||||
// 检查规则
|
||||
const [ok, msg] = ruleVerification(from[key]);
|
||||
if (!ok) {
|
||||
message.warning({
|
||||
content: `${msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
data[key] = from[key]['value'];
|
||||
}
|
||||
|
||||
// 发送
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
editNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
paramData: data,
|
||||
loc,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.updateItem', {
|
||||
num: modalState.title,
|
||||
}),
|
||||
duration: 3,
|
||||
});
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('views.ne.neConfig.updateItemErr'),
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
arrayEditClose();
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表嵌套行删除单行 */
|
||||
function arrayChildDelete(rowIndex: Record<string, any>) {
|
||||
const index = rowIndex.value;
|
||||
const loc = `${arrayChildState.loc}/${index}`;
|
||||
const title = `${arrayChildState.title} Index-${index}`;
|
||||
|
||||
Modal.confirm({
|
||||
title: t('common.tipTitle'),
|
||||
content: t('views.ne.neConfig.delItemTip', {
|
||||
num: title,
|
||||
}),
|
||||
onOk() {
|
||||
delNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
loc,
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.delItemOk', {
|
||||
num: title,
|
||||
}),
|
||||
duration: 2,
|
||||
});
|
||||
arrayEditClose();
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.error({
|
||||
content: `${res.msg}`,
|
||||
duration: 2,
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**多列表嵌套行新增单行 */
|
||||
function arrayChildAdd() {
|
||||
const from = arrayInitAdd(arrayChildState.data, arrayChildState.dataRule);
|
||||
// 处理信息
|
||||
const row: Record<string, any> = {};
|
||||
for (const v of from.record) {
|
||||
if (Array.isArray(v.array)) {
|
||||
continue;
|
||||
}
|
||||
row[v.name] = Object.assign({}, v);
|
||||
}
|
||||
|
||||
modalState.from = row;
|
||||
modalState.type = 'arrayChildAdd';
|
||||
modalState.title = `${arrayChildState.title} ${from.title}`;
|
||||
modalState.key = from.key;
|
||||
modalState.data = from.record.filter((v: any) => !Array.isArray(v.array));
|
||||
modalState.open = true;
|
||||
}
|
||||
|
||||
/**多列表新增单行确认 */
|
||||
function arrayChildAddOk(from: Record<string, any>) {
|
||||
const loc = `${arrayChildState.loc}/${from['index']['value']}`;
|
||||
|
||||
let data: Record<string, any> = {};
|
||||
for (const key in from) {
|
||||
// 子嵌套的不插入
|
||||
if (from[key]['array']) {
|
||||
continue;
|
||||
}
|
||||
// 检查规则
|
||||
const [ok, msg] = ruleVerification(from[key]);
|
||||
if (!ok) {
|
||||
message.warning({
|
||||
content: `${msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
data[key] = from[key]['value'];
|
||||
}
|
||||
|
||||
// 发送
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
addNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
paramData: data,
|
||||
loc,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.addItemOk', {
|
||||
num: modalState.title,
|
||||
}),
|
||||
duration: 3,
|
||||
});
|
||||
fnActiveConfigNode('#');
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('views.ne.neConfig.addItemErr'),
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
arrayEditClose();
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
arrayChildState,
|
||||
arrayChildExpand,
|
||||
arrayChildEdit,
|
||||
arrayChildEditOk,
|
||||
arrayChildDelete,
|
||||
arrayChildAdd,
|
||||
arrayChildAddOk,
|
||||
};
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
import { editNeConfigData } from '@/api/ne/neConfig';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { SizeType } from 'ant-design-vue/es/config-provider';
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { reactive, toRaw } from 'vue';
|
||||
|
||||
/**
|
||||
* list类型参数处理
|
||||
* @param param 父级传入 {t, treeState, neTypeSelect, ruleVerification}
|
||||
* @returns
|
||||
*/
|
||||
export default function useConfigList({
|
||||
t,
|
||||
treeState,
|
||||
neTypeSelect,
|
||||
ruleVerification,
|
||||
}: any) {
|
||||
/**单列表状态类型 */
|
||||
type ListStateType = {
|
||||
/**紧凑型 */
|
||||
size: SizeType;
|
||||
/**单列记录字段 */
|
||||
columns: Record<string, any>[];
|
||||
/**单列记录数据 */
|
||||
data: Record<string, any>[];
|
||||
/**编辑行记录 */
|
||||
editRecord: Record<string, any>;
|
||||
/**确认提交等待 */
|
||||
confirmLoading: boolean;
|
||||
};
|
||||
|
||||
/**单列表状态 */
|
||||
let listState: ListStateType = reactive({
|
||||
size: 'small',
|
||||
columns: [
|
||||
{
|
||||
title: 'Key',
|
||||
dataIndex: 'display',
|
||||
align: 'left',
|
||||
width: '30%',
|
||||
},
|
||||
{
|
||||
title: 'Value',
|
||||
dataIndex: 'value',
|
||||
align: 'left',
|
||||
width: '70%',
|
||||
},
|
||||
],
|
||||
data: [],
|
||||
confirmLoading: false,
|
||||
editRecord: {},
|
||||
});
|
||||
|
||||
/**单列表编辑 */
|
||||
function listEdit(row: Record<string, any>) {
|
||||
if (
|
||||
listState.confirmLoading ||
|
||||
['read-only', 'read', 'ro'].includes(row.access)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
listState.editRecord = Object.assign({}, row);
|
||||
}
|
||||
|
||||
/**单列表编辑关闭 */
|
||||
function listEditClose() {
|
||||
listState.confirmLoading = false;
|
||||
listState.editRecord = {};
|
||||
}
|
||||
|
||||
/**单列表编辑确认 */
|
||||
function listEditOk() {
|
||||
if (listState.confirmLoading) return;
|
||||
const from = toRaw(listState.editRecord);
|
||||
// 检查规则
|
||||
const [ok, msg] = ruleVerification(from);
|
||||
if (!ok) {
|
||||
message.warning({
|
||||
content: `${msg}`,
|
||||
duration: 3,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 发送
|
||||
listState.confirmLoading = true;
|
||||
const hide = message.loading(t('common.loading'), 0);
|
||||
editNeConfigData({
|
||||
neType: neTypeSelect.value[0],
|
||||
neUid: neTypeSelect.value[1],
|
||||
paramName: treeState.selectNode.paramName,
|
||||
paramData: {
|
||||
[from['name']]: from['value'],
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
content: t('views.ne.neConfig.updateValue', {
|
||||
num: from['display'],
|
||||
}),
|
||||
duration: 3,
|
||||
});
|
||||
// 改变表格数据
|
||||
const item = listState.data.find(
|
||||
(item: Record<string, any>) => from['name'] === item['name']
|
||||
);
|
||||
if (item) {
|
||||
Object.assign(item, listState.editRecord);
|
||||
}
|
||||
} else {
|
||||
message.warning({
|
||||
content: t('views.ne.neConfig.updateValueErr'),
|
||||
duration: 3,
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
hide();
|
||||
listState.confirmLoading = false;
|
||||
listState.editRecord = {};
|
||||
});
|
||||
}
|
||||
|
||||
/**表格分页器参数 */
|
||||
let tablePagination = reactive({
|
||||
/**当前页数 */
|
||||
current: 1,
|
||||
/**每页条数 */
|
||||
pageSize: 10,
|
||||
/**默认的每页条数 */
|
||||
defaultPageSize: 10,
|
||||
/**指定每页可以显示多少条 */
|
||||
pageSizeOptions: ['10', '20', '50', '100'],
|
||||
/**只有一页时是否隐藏分页器 */
|
||||
hideOnSinglePage: true,
|
||||
/**是否可以快速跳转至某页 */
|
||||
showQuickJumper: true,
|
||||
/**是否可以改变 pageSize */
|
||||
showSizeChanger: true,
|
||||
/**数据总数 */
|
||||
total: 0,
|
||||
showTotal: (total: number) => t('common.tablePaginationTotal', { total }),
|
||||
onChange: (page: number, pageSize: number) => {
|
||||
tablePagination.current = page;
|
||||
tablePagination.pageSize = pageSize;
|
||||
},
|
||||
});
|
||||
|
||||
return { tablePagination, listState, listEdit, listEditClose, listEditOk };
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user