Compare commits

..
50 Commits
Author SHA1 Message Date
TsMask 2fb3467fb5 mager: 合并11.2版本 2024-11-23 10:57:55 +08:00
TsMask 63d7d11350 Merge remote-tracking branch 'origin/main' into practical-training 2024-08-03 14:11:19 +08:00
TsMask 2bd98540be Merge remote-tracking branch 'origin/main' into practical-training 2024-08-01 17:53:53 +08:00
TsMask 630c63e23f feat: 配置数据导出成表格,多语言翻译 2024-08-01 16:07:17 +08:00
TsMask ada1f388fc fix: 参数配置array展开显示异常 2024-07-30 09:32:52 +08:00
TsMask b9cf34714f feat: 网元信息允许教师备份操作权限控制 2024-07-29 15:28:22 +08:00
TsMask 53200d5f41 feat: 网元配置备份操作权限控制删除/编辑按钮 2024-07-29 15:27:50 +08:00
TsMask 52d5b9b732 style: 学生关闭右击样式 2024-07-27 16:14:59 +08:00
TsMask 292488f20c fix: 配置载入时禁用切换网元 2024-07-27 16:13:08 +08:00
TsMask b0b844f0f6 fix: 学生禁止操作删除日志CDR/Event 2024-07-27 16:11:59 +08:00
TsMask 0819fbdb44 Merge remote-tracking branch 'origin/main' into practical-training 2024-07-27 15:03:16 +08:00
TsMask a88ae826cc Merge remote-tracking branch 'origin/main' into practical-training 2024-07-27 14:16:15 +08:00
TsMask 76499d98e0 fix: 参数数据与示例对比差异显示功能 2024-07-22 18:16:48 +08:00
TsMask 94ccb45f8c style: 配置历史记录抽屉展开的title初始为空避免显示错误 2024-07-22 18:14:29 +08:00
TsMask 79e2b4ac26 feat: 添加是否系统管理员的权限判断函数 2024-07-22 11:46:23 +08:00
TsMask b2510c0eb3 fix: 班级学生列表搜索时刷新合并申请状态,可直接应用和退回操作 2024-07-22 11:45:15 +08:00
TsMask f977b6ea53 style: 添加用户水印,学生菜单布局侧边栏显示 2024-07-19 17:32:58 +08:00
TsMask 1e9c6a51be fix: 教师只能重启网元,禁止操作网元信息 2024-07-19 17:31:45 +08:00
TsMask d68a773214 feat: 历史记录抽屉查看数据对比差异 2024-07-19 16:23:01 +08:00
TsMask f60f26ae89 fix: 参数配置列表编辑切换属性回显错误 2024-07-19 16:22:15 +08:00
TsMask c35a5a9c33 fix: 参数配置教师操作学生应用和退回 2024-07-18 15:04:51 +08:00
TsMask 4d755cea5d feat: 参数应用申请操作和查看功能 2024-07-17 17:04:13 +08:00
TsMask c87458bc23 feat: 参数配置教师应用和切换学生功能 2024-07-17 17:03:32 +08:00
TsMask cfd04ba1b6 Merge remote-tracking branch 'origin/main' into practical-training 2024-07-16 10:01:32 +08:00
TsMask 4af02693a4 feat: 教师选择学生进行切换查看学生配置数据信息 2024-07-15 17:59:30 +08:00
TsMask 66eb27813f feat: 新增网元应用申请提交列表操作 2024-07-15 17:56:28 +08:00
TsMask 65c8c6f809 perf: 参数配置页面函数重构 2024-07-11 14:49:26 +08:00
TsMask ecaa0ce077 fix: 参数配置接入实训调整网元类型选择,权限按钮 2024-07-11 10:24:27 +08:00
TsMask 99140f0641 feat: 接入实训接口调试参数配置 2024-07-11 10:23:18 +08:00
TsMask f3c46976ae Merge remote-tracking branch 'origin/main' into practical-training 2024-07-09 19:09:04 +08:00
TsMask efa8764bd1 feat: 配置参数直连数据获取优化 2024-07-09 10:05:43 +08:00
TsMask bc0e463191 fix: 用户岗位和角色指定只能选一个 2024-07-08 11:25:10 +08:00
TsMask 45bf9fe115 Merge remote-tracking branch 'origin/main' into practical-training 2024-07-08 10:57:22 +08:00
TsMask 4c85c61f05 fix: 右上角告警和帮助图标仅教师和管理员看见 2024-07-06 14:22:04 +08:00
TsMask 318f84504f fix: 看板数字活动连接禁止学生角色跳转页面 2024-07-06 14:20:06 +08:00
TsMask 53fa36eace Merge remote-tracking branch 'origin/main' into practical-training 2024-07-03 15:33:26 +08:00
TsMask 9123484bf5 Merge remote-tracking branch 'origin/main' into practical-training 2024-06-28 12:04:57 +08:00
TsMask e7e4557e96 style: 个人信息隐藏手机号和邮箱的输入 2024-06-27 16:07:55 +08:00
TsMask 6b1fe4a582 Merge remote-tracking branch 'origin/main' into practical-training 2024-06-27 15:36:40 +08:00
TsMask 2610ab17ad Merge remote-tracking branch 'origin/main' into practical-training 2024-06-26 17:25:33 +08:00
TsMask b84a08d825 fix: 教师不能管理分配部门,屏蔽电话邮箱 2024-06-24 17:13:09 +08:00
TsMask 824c38593b Merge remote-tracking branch 'origin/main' into practical-training 2024-06-24 11:18:30 +08:00
TsMask 69fb3df7ec Merge remote-tracking branch 'origin/main' into practical-training 2024-06-20 14:56:37 +08:00
TsMask 42827796c7 fix: 用户管理内教师角色只能新增学生 2024-06-20 10:28:01 +08:00
TsMask eb38211e3b style: 部门改为班级 2024-06-20 10:27:28 +08:00
TsMask fd1d2a5bad Merge remote-tracking branch 'origin/main' into practical-training 2024-06-20 10:19:01 +08:00
TsMask 2d5bfb9842 Merge remote-tracking branch 'origin/main' into practical-training 2024-06-20 09:34:54 +08:00
TsMask c0a7f28958 Merge remote-tracking branch 'origin/main' into practical-training 2024-06-19 14:26:24 +08:00
TsMask 5f4e47e998 Merge remote-tracking branch 'origin/main' into practical-training 2024-06-19 12:04:40 +08:00
TsMask 19a91936de style: 默认菜单主题色dark 2024-06-19 12:03:59 +08:00
331 changed files with 13879 additions and 41136 deletions

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
# 历史路径-哈希带井号标识
VITE_HISTORY_HASH = true
VITE_HISTORY_HASH = false
# 历史路径-前缀URL如:/h5
VITE_HISTORY_BASE_URL = "/"
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network OMC"
VITE_APP_CODE = "OMC"
# 应用版本
VITE_APP_VERSION = "local-dev"
VITE_APP_VERSION = "2.241115"
# 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api"
+1 -1
View File
@@ -11,7 +11,7 @@ VITE_APP_NAME = "Core Network OMC"
VITE_APP_CODE = "OMC"
# 应用版本
VITE_APP_VERSION = "local-prod"
VITE_APP_VERSION = "2.241115"
# 接口基础URL地址-不带/后缀
VITE_API_BASE_URL = "/omc-api"
-206
View File
@@ -1,211 +1,5 @@
# 版本发布日志
## 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加随机数避免缓存
- 新增 第三方登录认证功能和管理页,第三方用户不可删除和修改密码
- 优化 系统操作日志详情json格式化显示
- 优化 网元信息更新禁止修改neType neId
- 修复 用户数累加问题修复,液体图中浮标显示错误修复
- 修复 基站数修复以及资源模块下拉框修复
- 修复 告警事件时间显示不是时间格式字符串
- 修复 透明柱状图自适应,数值标签定位
- 修复 告警数据参数调整
## 2.2508.1-20250808
- 修复 UDM鉴权更新ki长度提示错误无法发送请求
- 优化 MML命令为空判断不发送,MML日志列表显示
- 优化 关闭网元reload操作,只有amf smf upf udm四个网元支持,改用mml发送
- 优化 网元概览隐藏容量字段显示,CBC创建时间格式显示错误
- 优化 系统用户账号简单4位长度
- 修复 看板2用户数量显示不出,修改广播帮助的数量提示
- 优化 性能栏目相关页面主动呼叫改正在通话,网元切换清除缓存数据
## 2.2507.4-20250801
- 新增 cbc界面
- 修复 数据处理修复,显示优化
- 修复 告警模块优化,底部边距,数据采集说明
## 2.2507.3-20250725
- 优化 将UDM鉴权导出按钮隐藏
- 修复 自定义指标数值格式处理,导出表格修复
- 修复 仪表盘2用户事件显示不正常
- 修复 自定义指标数值格式化保留3位小数
- 优化 参数配置AMF导入Index字段存在更新,不存在默认新增
## 2.2507.2-20250718
- 优化 变更nssf/n3iwf接口调用
- 优化 调整告警类型参数值,参数配置列表项不记录勾选状态
- 优化 调整UE数据返回参数
- 修复 基站状态拓扑图显示失败
- 修复 基站状态记录和smscCDR导出改为get行为
- 新增 mt版本移动过来的的告警/仪表/性能大屏页面
- 移除 删除无用文件
- 修复 指标页面数据获取异常接口调整
## 2.2507.1-20250705
- 修复 缓存管理列表key查询URL路径错误
- 优化 SMF-Date显示图表日期显示不完整,改日期格式
- 修复 跟踪任务编号的传入获取信息不一致
- 修复 参数配置可见visible属性判断
## 2.2506.4-20250627
- 修复 UDM-IMS数据批量新增/批量删除命令调整
- 优化 AMF/MME对应的IMEI白名单模板去除index
## 2.2506.3-20250620
- 新增 UDM签约cnType新增可选1仅5G/2仅4G
- 新增 给AMF/MME对应的IMEI白名单添加批量导入和批量删除功能
- 新增 UDM voup/ims导入失败文件下载
## 2.2506.2-20250613
- 修复 数值控件属性maxlength拼写错误
- 修复 空格内容无法编辑,提示信息显示方向
- 优化 抓包文件目录列表显示文件大小
## 2.2506.1-20250607
- 优化 请求响应码常量,身份信息更换逻辑优化
- 修复 更新tcpdump路径从/tmp到/usr/local以符合新目录结构
## 2.2505.4-20250530
- 优化 网元参数配置修改tooltip位置为bottomLeft防止遮挡
- 修复 服务器时间格式化指定时区
- 优化 网元授权状态更新容量和更新时间局部变化
- 修复 网元信令跟踪支持选择轻量版UPF
- 修复 看板数据加载间隔从5秒调整为10秒
- 修复 看板UDM选择添加下拉菜单的弹出容器属性
## 2.2505.3-20250523
- 修复 修复同步操作加载提示未隐藏的问题
- 修复 告警确认相关提示Tip多语言显示
- 修复 网元授权许可证状态统一刷新功能
- 修复 活动告警启用历史同步按钮
- 修复 更新批量刷新信息,容量仅UDM/AMF/MME
- 修复 仪表盘数据会话属累加
- 修复 网元主机信息编辑表单不验证免密类型, 主机列表的查询类型参数
## 2.2505.2-20250516
- 修复 编译类型检查错误
- 新增 网元授权上传变更确认延迟2s刷新授权状态
- 修复 英文修改基站名称为 RAN Node Name
- 新增 根据网元类型过滤导出备份数据可选的数据来源
- 新增 跟踪任务添加标题,编号后面加任务详情
## 2.2505.1-20250509
- 新增 更新日志文件导出列表,添加系统登录和操作日志
- 新增 网元授权添加用户容量列
- 修复 OAM读取结构错误
- 修复 仪表盘用户数据刷新时显示0闪烁
- 新增 看板含有网元显示区域
- 新增 根据网元显示特有菜单
- 修复 移除网络错误时的退出登录状态处理逻辑
## 2.2504.4-20250430
- 新增 PCF用户策略页面多语言翻译
- 新增 在上传切片文件到网元端时添加删除临时文件选项
- 修复 优化PCF用户策略页面及接口调整
- 修复 时间控件格式移除插件属性value-format="x"
- 新增 服务器时区UTC格式转换
- 新增 添加网络错误处理,退出登录状态
- 修复 替换获取服务器时间接口
- 移除 移除部分旧/apt/rest/直连接口
- 新增 网元服务操作局部状态刷新,补充提示信息
- 修复 时间格式常量定义及默认格式
- 新增 添加IMS SIP响应码原因显示
- 修复 看板流量图确保时间以HH:mm:ss格式显示
- 修复 看板用户活动乱序问题
- 修复 修复引导获取token存储问题
## 2.2503.4-20250331
- 更新 依赖项版本
- 修复 去除请求方法PATCH
- 重构 重构令牌管理逻辑,,统一状态码识别
- 更新 编译文件引用缺失
- 新增 UDMVolte用户特殊VoIP数据
- 优化 补充多语言翻译
- 修复 调度任务参数最大输入2000字符。日志查看id错误修复
- 重构 统一ftp操作功能,备份文件查看下载删除功能
- 优化 neFile目录移动到ne
- 新增 终端目录部分调整,添加udm-voip/volte功能页面
- 新增 修改OAM配置中的同步功能为重启功能
- 新增 添加告警信息导出功能,并优化历史告警页面
- 修复 统一国际时区格式
- 新增 更新锁屏密码Basd64编码处理,无密码直接进入
- 新增 PCAP文件解析功能页面优化
- 修复 移除信令接口查询
- 新增 支持ws工具心跳ping消息
- 重构 重构信令跟踪功能
- 重构 重构网元跟踪任务功能页面
- 修复 看板用户数初始neId传入失败,禁止选择当前项
- 新增 添加网元配置文件备份的FTP配置管理功能
- 修复 mml补充UDM特殊命令处理
- 新增 UE添加导入模板下载功能
- 修复 网元授权上传后点击ok检查状态
- 新增 添加密码过期功能支持,密码有效期时间天
## 2.2404.1-20240402
- 新增 网元安装流程相关页面与操作相关接口联调
+4 -8
View File
@@ -2,18 +2,14 @@
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="google" content="notranslate" />
<meta name="google" content="notranslate">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>loading...</title>
<link rel="icon" href="/favicon.ico" />
<link rel="preload" href="/loading.js" as="script" />
<link rel="preload" href="/loading.js" as="script">
<script async src="/loading.js"></script>
<script>
var script = document.createElement('script');
script.src = '/config.js?nocache=' + new Date().getTime();
script.async = true;
document.head.appendChild(script);
</script>
<link rel="preload" href="/config.js" as="script">
<script async src="/config.js"></script>
</head>
<body>
<div id="app"></div>
+39 -40
View File
@@ -12,51 +12,50 @@
"preview": "vite preview"
},
"dependencies": {
"@ant-design/icons-vue": "7.0.1",
"@antv/g6": "4.8.25",
"@codemirror/lang-javascript": "6.2.3",
"@codemirror/lang-yaml": "6.1.2",
"@codemirror/merge": "6.10.0",
"@codemirror/theme-one-dark": "6.1.2",
"@tato30/vue-pdf": "1.11.3",
"@vueuse/core": "13.0.0",
"@xterm/addon-fit": "0.10.0",
"@xterm/xterm": "5.5.0",
"ant-design-vue": "4.2.6",
"antdv-pro-layout": "4.2.0",
"antdv-pro-modal": "4.0.8",
"codemirror": "6.0.1",
"crypto-js": "4.2.0",
"dayjs": "1.11.13",
"echarts": "5.6.0",
"echarts-liquidfill": "^3.1.0",
"file-saver": "2.0.5",
"grid-layout-plus": "1.0.6",
"intl-tel-input": "25.2.0",
"@ant-design/icons-vue": "^7.0.1",
"@antv/g6": "~4.8.24",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lang-yaml": "^6.1.1",
"@codemirror/merge": "^6.7.2",
"@codemirror/theme-one-dark": "^6.1.2",
"@tato30/vue-pdf": "^1.11.2",
"@vueuse/core": "11.2.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"ant-design-vue": "^4.2.5",
"antdv-pro-layout": "^4.1.9",
"antdv-pro-modal": "^4.0.5",
"codemirror": "^6.0.1",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.11",
"echarts": "~5.5.0",
"file-saver": "^2.0.5",
"grid-layout-plus": "^1.0.5",
"intl-tel-input": "^24.6.0",
"js-base64": "^3.7.7",
"js-cookie": "^3.0.5",
"localforage": "^1.10.0",
"nprogress": "^0.2.0",
"p-queue": "8.0.1",
"pinia": "2.3.0",
"vue": "3.5.13",
"vue-i18n": "11.1.2",
"vue-router": "4.5.0",
"vue3-smooth-dnd": "0.0.6",
"xlsx": "0.18.5"
"p-queue": "~8.0.1",
"pinia": "2.2.6",
"vue": "^3.5.12",
"vue-i18n": "^10.0.4",
"vue-router": "^4.4.5",
"vue3-smooth-dnd": "^0.0.6",
"xlsx": "~0.18.5"
},
"devDependencies": {
"@types/crypto-js": "4.2.2",
"@types/file-saver": "2.0.7",
"@types/js-cookie": "3.0.6",
"@types/node": "^18.0.0",
"@types/nprogress": "0.2.3",
"@vitejs/plugin-vue": "5.2.3",
"less": "4.2.2",
"typescript": "5.8.2",
"unplugin-vue-components": "0.28.0",
"vite": "6.3.3",
"vite-plugin-compression": "0.5.1",
"vue-tsc": "2.2.8"
"@types/crypto-js": "^4.2.2",
"@types/file-saver": "^2.0.7",
"@types/js-cookie": "^3.0.6",
"@types/node": "^22.7.7",
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.1.4",
"less": "^4.2.0",
"typescript": "^5.6.3",
"unplugin-vue-components": "^0.27.4",
"vite": "5.4.10",
"vite-plugin-compression": "~0.5.1",
"vue-tsc": "^2.1.8"
}
}
+5 -12
View File
@@ -10,19 +10,12 @@
*
*/
(function () {
// baseUrl = protocol://ip:port
// baseUrl = 'http://192.168.8.100:33030';
const protocol = window.location.protocol
let wsprotocol = "ws:"
const hostname = window.location.hostname
let host = `${hostname}:33080`;
if (protocol === 'https:') {
host = `${hostname}:33443`;
wsprotocol = "wss:"
}
// host = ip:port
// const host = '192.168.8.100:33030';
const host = `${window.location.hostname}:33030`;
// Service Address
sessionStorage.setItem('baseUrl', `${protocol}//${host}`);
sessionStorage.setItem('baseUrl', `http://${host}`);
// websocket Address
sessionStorage.setItem('wsUrl', `${wsprotocol}//${host}`);
sessionStorage.setItem('wsUrl', `ws://${host}`);
})();
Binary file not shown.
Binary file not shown.
-2
View File
@@ -1,2 +0,0 @@
imsi,msisdn,sess_rules,pcc_rules,hdr_enrich,rfsp,sar,qos_audio,qos_video
001012082101039,1234,internet|ims_sig,internet|ims_sig,321321,255,321312,32131,32131
-2
View File
@@ -1,2 +0,0 @@
001011100001157,1234567890ABCDEF1234567890ABCDEF,0,8000,11111111111111111111111111111111
001011100001158,1234567890ABCDEF1234567890ABCDEF,0,8000,11111111111111111111111111111111
-2
View File
@@ -1,2 +0,0 @@
001011100001157,62357000583,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,-
001011100001158,62357000585,def_ambr,def_nssai,def_arfb,def_sar,0,3,def_snssai,1-000001&internet&ims,1,64,24,65,def_eps,1,010200000000,-
-3
View File
@@ -1,3 +0,0 @@
#username,password
62357000580,123456
62357000581,123456
@@ -1,4 +0,0 @@
#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
62357000581,62357000581,0,ims.mnc000.mcc460.3gppnetwork.org
-28
View File
@@ -1,28 +0,0 @@
<svg width="1024" height="1024" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="1026" width="1026" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="1" x="1" height="768" width="1024"/>
</g>
</g>
<g>
<title>Layer 1</title>
<g stroke="null" id="svg_15">
<path stroke="null" id="svg_4" fill="#B5D6FB" d="m512.094844,961.632039c-1.327621,0 -2.560412,-0.405439 -3.793202,-1.114958l-405.588164,-251.575028c-2.275921,-1.419037 -3.698372,-4.054392 -3.698372,-6.892467l0,-90.007504c0,-2.838074 1.422451,-5.473429 3.698372,-6.892467l405.588164,-255.426701c1.137961,-0.709519 2.465582,-1.114958 3.793202,-1.114958s2.655242,0.405439 3.793202,1.114958l405.493334,255.426701c2.275921,1.419037 3.698372,4.054392 3.698372,6.892467l0,90.007504c0,2.838074 -1.422451,5.473429 -3.698372,6.892467l-405.588164,251.575028c-1.137961,0.709519 -2.465582,1.114958 -3.698372,1.114958z"/>
<path stroke="null" id="svg_5" fill="#0276F7" d="m512.094844,356.615382l405.398504,255.426701l0,90.007504l-66.096551,40.94936l-339.301952,210.625668l-339.491613,-210.625668l-66.096551,-40.94936l0,-90.007504l405.588164,-255.426701m0,-16.014849c-2.655242,0 -5.215653,0.709519 -7.586405,2.229916l-405.588164,255.426701c-4.551843,2.838074 -7.396745,8.108784 -7.396745,13.784933l0,90.007504c0,5.676149 2.844902,10.946859 7.491575,13.886293l66.096551,41.05072l339.491613,210.625668c2.275921,1.419037 4.931163,2.128556 7.491575,2.128556s5.215653,-0.709519 7.491575,-2.128556l339.301952,-210.625668l66.096551,-40.94936c4.646673,-2.838074 7.491575,-8.108784 7.491575,-13.886293l0,-90.007504c0,-5.676149 -2.844902,-10.946859 -7.396745,-13.784933l-405.398504,-255.426701c-2.370751,-1.520397 -5.025993,-2.331275 -7.586405,-2.331275z"/>
<path stroke="null" id="svg_6" fill="#FFFFFF" d="m106.50668,612.042083l405.493334,253.298145l405.493334,-253.298145l-405.398504,-255.426701l-405.588164,255.426701z"/>
<path stroke="null" id="svg_7" fill="#D4E4FC" d="m501.473877,64.192353l-254.9032,498.487506l263.343075,161.162085l266.662127,-162.074323l-275.102002,-497.575268z"/>
<path stroke="null" id="svg_8" fill="#0276F7" d="m229.975417,602.311542c-1.232791,0 -2.465582,-0.304079 -3.698372,-1.013598c-3.603542,-2.128556 -4.931163,-6.993826 -2.844902,-10.845499l279.653845,-532.13896c1.327621,-2.533995 3.793202,-4.054392 6.543274,-4.054392c2.655242,0 5.120823,1.520397 6.543274,4.054392l284.395348,532.13896c2.086261,3.851672 0.75864,8.716943 -2.750072,10.946859c-3.603542,2.128556 -8.155385,0.810878 -10.241646,-2.939434l-277.852074,-519.874424l-273.205401,519.671704c-1.422451,2.635355 -3.982862,4.054392 -6.543274,4.054392z"/>
<path stroke="null" id="svg_9" fill="#0276F7" d="m509.913752,755.567562c-4.172523,0 -7.491575,-3.547593 -7.491575,-8.007424l0,-666.744777c0,-4.459831 3.319052,-8.007424 7.491575,-8.007424s7.491575,3.547593 7.491575,8.007424l0,666.846137c0,4.358471 -3.413882,7.906065 -7.491575,7.906065z"/>
<path stroke="null" id="svg_10" fill="#0276F7" d="m509.913752,731.849369c-1.327621,0 -2.560412,-0.405439 -3.698372,-1.013598l-263.343075,-161.162085c-3.603542,-2.229916 -4.836333,-7.095186 -2.750072,-10.946859c2.086261,-3.851672 6.638104,-5.16935 10.241646,-2.939434l259.549873,158.83081l262.963755,-159.844408c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.946859l-266.662127,162.074323c-1.137961,0.709519 -2.465582,1.013598 -3.698372,1.013598z"/>
<path stroke="null" id="svg_11" fill="#0276F7" d="m509.913752,579.708306c-1.327621,0 -2.560412,-0.405439 -3.793202,-1.114958l-201.988026,-125.686154c-3.603542,-2.229916 -4.741503,-7.095186 -2.750072,-10.946859c2.086261,-3.851672 6.638104,-5.16935 10.241646,-2.838074l198.289654,123.354879l201.798366,-122.138561c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.845499l-205.496739,124.469837c-1.137961,0.709519 -2.465582,1.013598 -3.698372,1.013598zm-2.465582,-157.513132c-1.232791,0 -2.370751,-0.304079 -3.508712,-0.912238l-140.917468,-79.668804c-3.698372,-2.128556 -5.025993,-6.892467 -3.129392,-10.845499c1.896601,-3.953032 6.448444,-5.37207 10.146816,-3.344873l137.503586,77.742968l143.00373,-79.871524c3.698372,-2.027196 8.155385,-0.506799 10.146816,3.344873c1.896601,3.953032 0.47415,8.716943 -3.129392,10.845499l-146.512442,81.79736c-1.232791,0.608159 -2.370751,0.912238 -3.603542,0.912238zm2.465582,-148.49211c-1.232791,0 -2.465582,-0.304079 -3.508712,-0.912238l-82.312492,-47.436387c-3.603542,-2.128556 -5.025993,-6.993826 -3.034562,-10.845499c1.991431,-3.953032 6.543274,-5.27071 10.146816,-3.243514l78.708949,45.409191l78.329629,-47.537747c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.946859l-81.933171,49.666303c-1.232791,0.608159 -2.560412,0.912238 -3.793202,0.912238z"/>
<path stroke="null" id="svg_12" fill="#0276F7" d="m509.913752,579.708306l-0.28449,0l-263.248245,-9.021022c-4.172523,-0.10136 -7.396745,-3.851672 -7.207085,-8.210144c0.09483,-4.459831 4.077693,-7.703345 7.681235,-7.703345l263.343075,9.021022c4.172523,0.10136 7.396745,3.851672 7.207085,8.210144c-0.18966,4.257112 -3.508712,7.703345 -7.491575,7.703345zm0,152.141063c-1.612111,0 -3.224222,-0.608159 -4.646673,-1.723117c-3.224222,-2.736715 -3.793202,-7.804705 -1.232791,-11.250938l205.496739,-276.610899c2.560412,-3.446233 7.301915,-4.054392 10.526137,-1.317677c3.224222,2.736715 3.793202,7.804705 1.232791,11.250938l-205.496739,276.610899c-1.517281,2.027196 -3.698372,3.040794 -5.879464,3.040794z"/>
<path stroke="null" id="svg_13" fill="#0276F7" d="m509.913752,579.708306c-1.422451,0 -2.750072,-0.405439 -4.077693,-1.216318c-3.508712,-2.432635 -4.457013,-7.297906 -2.275921,-11.048218l144.14169,-239.310492c2.275921,-3.750313 6.922594,-4.763911 10.336476,-2.432635c3.508712,2.432635 4.457013,7.297906 2.275921,11.048218l-144.14169,239.310492c-1.422451,2.331275 -3.793202,3.648953 -6.258784,3.648953zm-2.465582,-157.513132c-1.043131,0 -2.086261,-0.20272 -3.129392,-0.709519c-3.793202,-1.824476 -5.405313,-6.588387 -3.698372,-10.642779l84.398753,-198.158413c1.706941,-4.054392 6.069124,-5.777509 9.957156,-3.953032c3.793202,1.824476 5.405313,6.588387 3.698372,10.642779l-84.303923,198.158413c-1.327621,2.939434 -4.077693,4.662551 -6.922594,4.662551z"/>
<path stroke="null" id="svg_14" fill="#0276F7" d="m591.846924,375.062866c-2.750072,0 -5.405313,-1.621757 -6.732934,-4.459831c-1.801771,-3.953032 -0.28449,-8.716943 3.413882,-10.642779l129.253371,-67.302908l-365.759539,-178.089172l20.862613,208.091673l133.994874,-64.262114c3.698372,-1.824476 8.155385,0 9.862326,4.054392c1.706941,4.054392 0,8.716943 -3.793202,10.541419l-143.38305,68.823305c-2.181091,1.013598 -4.646673,0.912238 -6.827764,-0.405439c-2.086261,-1.317677 -3.413882,-3.547593 -3.698372,-6.081588l-23.328195,-233.026185c-0.28449,-2.838074 0.853471,-5.676149 3.034562,-7.297906c2.181091,-1.621757 5.025993,-2.027196 7.491575,-0.810878l392.217126,190.961867c2.655242,1.317677 4.362183,4.054392 4.362183,7.196546c0,3.142154 -1.612111,5.980228 -4.172523,7.297906l-143.57271,74.600814c-1.043131,0.608159 -2.181091,0.810878 -3.224222,0.810878zm-283.921198,78.959286c-3.603542,0 -6.827764,-2.838074 -7.396745,-6.791107c-0.56898,-4.358471 2.181091,-8.412864 6.258784,-9.122382l199.617275,-31.826978c4.077693,-0.608159 7.870895,2.331275 8.534705,6.689747c0.56898,4.358471 -2.181091,8.412864 -6.258784,9.122382l-199.617275,31.826978c-0.47415,0.10136 -0.853471,0.10136 -1.137961,0.10136z"/>
</g>
<text stroke="null" font-style="italic" transform="matrix(6.577099502228161,0,0,7.449448263868419,-1073.2057632249744,-908.8606073938396) " xml:space="preserve" text-anchor="start" font-family="Arvo, sans-serif" font-size="24" id="svg_16" y="177.898525" x="178.621382" stroke-width="0" fill="#B5D6FB">4G</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

-28
View File
@@ -1,28 +0,0 @@
<svg width="1024" height="1024" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="1026" width="1026" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="1" x="1" height="768" width="1024"/>
</g>
</g>
<g>
<title>Layer 1</title>
<g stroke="null" id="svg_15">
<path stroke="null" id="svg_4" fill="#B5D6FB" d="m512.094844,961.632039c-1.327621,0 -2.560412,-0.405439 -3.793202,-1.114958l-405.588164,-251.575028c-2.275921,-1.419037 -3.698372,-4.054392 -3.698372,-6.892467l0,-90.007504c0,-2.838074 1.422451,-5.473429 3.698372,-6.892467l405.588164,-255.426701c1.137961,-0.709519 2.465582,-1.114958 3.793202,-1.114958s2.655242,0.405439 3.793202,1.114958l405.493334,255.426701c2.275921,1.419037 3.698372,4.054392 3.698372,6.892467l0,90.007504c0,2.838074 -1.422451,5.473429 -3.698372,6.892467l-405.588164,251.575028c-1.137961,0.709519 -2.465582,1.114958 -3.698372,1.114958z"/>
<path stroke="null" id="svg_5" fill="#0276F7" d="m512.094844,356.615382l405.398504,255.426701l0,90.007504l-66.096551,40.94936l-339.301952,210.625668l-339.491613,-210.625668l-66.096551,-40.94936l0,-90.007504l405.588164,-255.426701m0,-16.014849c-2.655242,0 -5.215653,0.709519 -7.586405,2.229916l-405.588164,255.426701c-4.551843,2.838074 -7.396745,8.108784 -7.396745,13.784933l0,90.007504c0,5.676149 2.844902,10.946859 7.491575,13.886293l66.096551,41.05072l339.491613,210.625668c2.275921,1.419037 4.931163,2.128556 7.491575,2.128556s5.215653,-0.709519 7.491575,-2.128556l339.301952,-210.625668l66.096551,-40.94936c4.646673,-2.838074 7.491575,-8.108784 7.491575,-13.886293l0,-90.007504c0,-5.676149 -2.844902,-10.946859 -7.396745,-13.784933l-405.398504,-255.426701c-2.370751,-1.520397 -5.025993,-2.331275 -7.586405,-2.331275z"/>
<path stroke="null" id="svg_6" fill="#FFFFFF" d="m106.50668,612.042083l405.493334,253.298145l405.493334,-253.298145l-405.398504,-255.426701l-405.588164,255.426701z"/>
<path stroke="null" id="svg_7" fill="#D4E4FC" d="m501.473877,64.192353l-254.9032,498.487506l263.343075,161.162085l266.662127,-162.074323l-275.102002,-497.575268z"/>
<path stroke="null" id="svg_8" fill="#0276F7" d="m229.975417,602.311542c-1.232791,0 -2.465582,-0.304079 -3.698372,-1.013598c-3.603542,-2.128556 -4.931163,-6.993826 -2.844902,-10.845499l279.653845,-532.13896c1.327621,-2.533995 3.793202,-4.054392 6.543274,-4.054392c2.655242,0 5.120823,1.520397 6.543274,4.054392l284.395348,532.13896c2.086261,3.851672 0.75864,8.716943 -2.750072,10.946859c-3.603542,2.128556 -8.155385,0.810878 -10.241646,-2.939434l-277.852074,-519.874424l-273.205401,519.671704c-1.422451,2.635355 -3.982862,4.054392 -6.543274,4.054392z"/>
<path stroke="null" id="svg_9" fill="#0276F7" d="m509.913752,755.567562c-4.172523,0 -7.491575,-3.547593 -7.491575,-8.007424l0,-666.744777c0,-4.459831 3.319052,-8.007424 7.491575,-8.007424s7.491575,3.547593 7.491575,8.007424l0,666.846137c0,4.358471 -3.413882,7.906065 -7.491575,7.906065z"/>
<path stroke="null" id="svg_10" fill="#0276F7" d="m509.913752,731.849369c-1.327621,0 -2.560412,-0.405439 -3.698372,-1.013598l-263.343075,-161.162085c-3.603542,-2.229916 -4.836333,-7.095186 -2.750072,-10.946859c2.086261,-3.851672 6.638104,-5.16935 10.241646,-2.939434l259.549873,158.83081l262.963755,-159.844408c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.946859l-266.662127,162.074323c-1.137961,0.709519 -2.465582,1.013598 -3.698372,1.013598z"/>
<path stroke="null" id="svg_11" fill="#0276F7" d="m509.913752,579.708306c-1.327621,0 -2.560412,-0.405439 -3.793202,-1.114958l-201.988026,-125.686154c-3.603542,-2.229916 -4.741503,-7.095186 -2.750072,-10.946859c2.086261,-3.851672 6.638104,-5.16935 10.241646,-2.838074l198.289654,123.354879l201.798366,-122.138561c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.845499l-205.496739,124.469837c-1.137961,0.709519 -2.465582,1.013598 -3.698372,1.013598zm-2.465582,-157.513132c-1.232791,0 -2.370751,-0.304079 -3.508712,-0.912238l-140.917468,-79.668804c-3.698372,-2.128556 -5.025993,-6.892467 -3.129392,-10.845499c1.896601,-3.953032 6.448444,-5.37207 10.146816,-3.344873l137.503586,77.742968l143.00373,-79.871524c3.698372,-2.027196 8.155385,-0.506799 10.146816,3.344873c1.896601,3.953032 0.47415,8.716943 -3.129392,10.845499l-146.512442,81.79736c-1.232791,0.608159 -2.370751,0.912238 -3.603542,0.912238zm2.465582,-148.49211c-1.232791,0 -2.465582,-0.304079 -3.508712,-0.912238l-82.312492,-47.436387c-3.603542,-2.128556 -5.025993,-6.993826 -3.034562,-10.845499c1.991431,-3.953032 6.543274,-5.27071 10.146816,-3.243514l78.708949,45.409191l78.329629,-47.537747c3.603542,-2.229916 8.155385,-0.810878 10.241646,3.040794c2.086261,3.851672 0.75864,8.716943 -2.844902,10.946859l-81.933171,49.666303c-1.232791,0.608159 -2.560412,0.912238 -3.793202,0.912238z"/>
<path stroke="null" id="svg_12" fill="#0276F7" d="m509.913752,579.708306l-0.28449,0l-263.248245,-9.021022c-4.172523,-0.10136 -7.396745,-3.851672 -7.207085,-8.210144c0.09483,-4.459831 4.077693,-7.703345 7.681235,-7.703345l263.343075,9.021022c4.172523,0.10136 7.396745,3.851672 7.207085,8.210144c-0.18966,4.257112 -3.508712,7.703345 -7.491575,7.703345zm0,152.141063c-1.612111,0 -3.224222,-0.608159 -4.646673,-1.723117c-3.224222,-2.736715 -3.793202,-7.804705 -1.232791,-11.250938l205.496739,-276.610899c2.560412,-3.446233 7.301915,-4.054392 10.526137,-1.317677c3.224222,2.736715 3.793202,7.804705 1.232791,11.250938l-205.496739,276.610899c-1.517281,2.027196 -3.698372,3.040794 -5.879464,3.040794z"/>
<path stroke="null" id="svg_13" fill="#0276F7" d="m509.913752,579.708306c-1.422451,0 -2.750072,-0.405439 -4.077693,-1.216318c-3.508712,-2.432635 -4.457013,-7.297906 -2.275921,-11.048218l144.14169,-239.310492c2.275921,-3.750313 6.922594,-4.763911 10.336476,-2.432635c3.508712,2.432635 4.457013,7.297906 2.275921,11.048218l-144.14169,239.310492c-1.422451,2.331275 -3.793202,3.648953 -6.258784,3.648953zm-2.465582,-157.513132c-1.043131,0 -2.086261,-0.20272 -3.129392,-0.709519c-3.793202,-1.824476 -5.405313,-6.588387 -3.698372,-10.642779l84.398753,-198.158413c1.706941,-4.054392 6.069124,-5.777509 9.957156,-3.953032c3.793202,1.824476 5.405313,6.588387 3.698372,10.642779l-84.303923,198.158413c-1.327621,2.939434 -4.077693,4.662551 -6.922594,4.662551z"/>
<path stroke="null" id="svg_14" fill="#0276F7" d="m591.846924,375.062866c-2.750072,0 -5.405313,-1.621757 -6.732934,-4.459831c-1.801771,-3.953032 -0.28449,-8.716943 3.413882,-10.642779l129.253371,-67.302908l-365.759539,-178.089172l20.862613,208.091673l133.994874,-64.262114c3.698372,-1.824476 8.155385,0 9.862326,4.054392c1.706941,4.054392 0,8.716943 -3.793202,10.541419l-143.38305,68.823305c-2.181091,1.013598 -4.646673,0.912238 -6.827764,-0.405439c-2.086261,-1.317677 -3.413882,-3.547593 -3.698372,-6.081588l-23.328195,-233.026185c-0.28449,-2.838074 0.853471,-5.676149 3.034562,-7.297906c2.181091,-1.621757 5.025993,-2.027196 7.491575,-0.810878l392.217126,190.961867c2.655242,1.317677 4.362183,4.054392 4.362183,7.196546c0,3.142154 -1.612111,5.980228 -4.172523,7.297906l-143.57271,74.600814c-1.043131,0.608159 -2.181091,0.810878 -3.224222,0.810878zm-283.921198,78.959286c-3.603542,0 -6.827764,-2.838074 -7.396745,-6.791107c-0.56898,-4.358471 2.181091,-8.412864 6.258784,-9.122382l199.617275,-31.826978c4.077693,-0.608159 7.870895,2.331275 8.534705,6.689747c0.56898,4.358471 -2.181091,8.412864 -6.258784,9.122382l-199.617275,31.826978c-0.47415,0.10136 -0.853471,0.10136 -1.137961,0.10136z"/>
</g>
<text stroke="null" font-style="italic" transform="matrix(6.577099502228161,0,0,7.449448263868419,-1073.2057632249744,-908.8606073938396) " xml:space="preserve" text-anchor="start" font-family="Arvo, sans-serif" font-size="24" id="svg_16" y="177.898525" x="178.621382" stroke-width="0" fill="#D4E4FC">5G</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

+2
View File
@@ -5,11 +5,13 @@ import zhCN from 'ant-design-vue/es/locale/zh_CN';
import enUS from 'ant-design-vue/es/locale/en_US';
import { usePrefersColorScheme, viewTransitionTheme } from 'antdv-pro-layout';
import dayjs from 'dayjs';
import advancedFormat from 'dayjs/plugin/advancedFormat';
import useLayoutStore from '@/store/modules/layout';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
const { t, currentLocale } = useI18n();
const { themeConfig, initPrimaryColor, changeConf } = useLayoutStore();
dayjs.extend(advancedFormat);
// dayjs.locale('zh-cn'); // 默认中文
let locale = ref(enUS); // 国际化初始中文
-156
View File
@@ -1,156 +0,0 @@
import { request } from '@/plugins/http-fetch';
import { sessionGet } from '@/utils/cache-session-utils';
/**
* 登录方法
* @param data 数据
* @returns 结果
*/
export function login(data: Record<string, string>) {
return request({
url: '/auth/login',
method: 'POST',
data: data,
whithToken: false,
});
}
/**
* 退出方法
* @returns object
*/
export function logout() {
return request({
url: '/auth/logout',
method: 'POST',
repeatSubmit: false,
});
}
/**
* 注册方法
* @param data 注册对象
* @returns object
*/
export function register(data: Record<string, any>) {
return request({
url: '/auth/register',
method: 'POST',
data: data,
whithToken: false,
});
}
/**
* 刷新登录令牌
* @param data 数据
* @returns 结果
*/
export function refreshToken(refreshToken: string) {
return request({
url: '/auth/refresh-token',
method: 'POST',
data: { refreshToken },
whithToken: false,
});
}
/**
* 获取用户详细信息
* @returns object
*/
export function getInfo() {
return request({
url: '/me',
method: 'GET',
});
}
/**
* 获取路由
* @returns object
*/
export const getRouter = () => {
return request({
url: '/router',
method: 'GET',
});
};
/**
* 获取验证码
* @returns object
*/
export function getCaptchaImage() {
return request({
url: '/captcha-image',
method: 'GET',
whithToken: false,
});
}
/**
* 登录认证源
* @returns object
*/
export function getLoginSource() {
return request({
url: '/auth/login/source',
method: 'GET',
whithToken: false,
});
}
/**
* LDAP登录
* @returns object
*/
export function loginLDAP(data: Record<string, string>) {
return request({
url: '/auth/login/ldap',
method: 'POST',
data: data,
whithToken: false,
});
}
/**
* SMTP登录
* @returns object
*/
export function loginSMTP(data: Record<string, string>) {
return request({
url: '/auth/login/smtp',
method: 'POST',
data: data,
whithToken: false,
});
}
/**
* 登录认证源OAuth2跳转登录URL
* @returns object
*/
export function loginOAuth2URL(state: string): string {
// 兼容旧前端可改配置文件
const baseUrl = import.meta.env.PROD
? sessionGet('baseUrl') || import.meta.env.VITE_API_BASE_URL
: import.meta.env.VITE_API_BASE_URL;
return `${baseUrl}/auth/login/oauth2/authorize?state=${state}`;
}
/**
* 登录认证源OAuth2认证登录
* @returns object
*/
export function loginOAuth2Token(code: string, state: string) {
return request({
url: '/auth/login/oauth2/token',
method: 'POST',
data: {
code,
state,
},
whithToken: false,
});
}
-75
View File
@@ -1,75 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* CBC列表
* @param query 查询参数
* @returns object
*/
export function listCBC(query: Record<string, any>) {
return request({
url: `/neData/cbc/message/list`,
method: 'GET',
params: query,
timeout: 30_000,
});
}
/**
* CBC签约用户新增
* @param data 签约对象
* @returns object
*/
export function addCBC(data: Record<string, any>) {
return request({
url: `/neData/cbc/message?neId=${data.neId}`,
method: 'POST',
data: data,
timeout: 180_000,
});
}
export function updateCBCStatus(data:any) {
return request({
url: `/neData/cbc/message/${data.id}/${data.status}?neId=${data.neId}`,
method: 'PUT',
timeout: 180_000,
});
}
export function updateCBC(data:any) {
return request({
url: `/neData/cbc/message/${data.id}?neId=${data.neId}`,
method: 'PUT',
data,
timeout: 180_000,
});
}
/**
* CBC删除
* @param data 签约对象
* @returns object
*/
export function delCBC(neId: string, id: string) {
return request({
url: `/neData/cbc/message/${id}?neId=${neId}`,
method: 'DELETE',
timeout: 180_000,
});
}
+95
View File
@@ -0,0 +1,95 @@
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 listNeBackup(query: Record<string, any>) {
let totalSQL = 'select count(id) as total from ne_backup ';
let rowsSQL = ' select * from ne_backup ';
// 查询
let querySQL = 'where 1=1';
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by create_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_backup`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['ne_backup'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
* 删除备份信息
* @param noticeId 网元ID
* @returns object
*/
export async function delNeBackup(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
method: 'delete',
});
}
/**
* 获取备份信息文件
* @param menuId 网元ID
* @returns object
*/
export async function downloadNeBackup(data: Record<string, any>) {
return await request({
url: `/api/rest/systemManagement/v1/${data.neType}/neBackup/${data.fileName}`,
method: 'get',
responseType: 'blob',
timeout: 180_000,
});
}
/**
* 修改备份说明
* @param menuId 网元ID
* @returns object
*/
export async function updateBackInfo(data:Record<string,any>){
return request({
url: `/api/rest/databaseManagement/v1/omc_db/ne_backup?WHERE=id=${data.id}`,
method: 'put',
data: { data: { comment: data.backupInfo } },
});
}
+85
View File
@@ -0,0 +1,85 @@
import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
RESULT_MSG_ERROR,
} from '@/constants/result-constants';
import { language, request } from '@/plugins/http-fetch';
/**
* 更新网元配置重新载入
* @param neType 网元类型
* @param neId 网元ID
* @returns
*/
export async function updateNeConfigReload(neType: string, neId: string) {
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/mml?ne_id=${neId}`,
method: 'post',
data: { mml: ['reload'] },
timeout: 180_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const v = result.data.data[0];
const str = v.toLowerCase();
if (str.indexOf('ok') !== -1) {
delete result.data;
} else if (str.indexOf('success') !== -1) {
delete result.data;
} else {
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
}
}
return result;
}
/**
* 从参数配置PCF中获取对应信息提供给PCC用户策略输入框
* @param neId
* @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction}
*/
export async function getPCCRule(neId: any) {
const paramNameArr = [
'pccRules',
'sessionRules',
'qosTemplate',
'headerEnrichTemplate',
'serviceAreaRestriction',
];
const reqArr = [];
for (const paramName of paramNameArr) {
reqArr.push(
request({
url: `/ne/config/data`,
params: { neType: 'PCF', neId, paramName },
method: 'get',
})
);
}
return await Promise.allSettled(reqArr).then(resArr => {
// 规则数据
const obj: any = {};
resArr.forEach((item, i: number) => {
if (item.status === 'fulfilled') {
const res = item.value;
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
const key = paramNameArr[i];
obj[key] = res.data.map((item: any) => {
if ('qosTemplate' === key) {
return { value: item.qosId, label: item.qosId };
}
if ('headerEnrichTemplate' === key) {
return { value: item.templateName, label: item.templateName };
}
if ('serviceAreaRestriction' === key) {
return { value: item.name, label: item.name };
}
return { value: item.ruleId, label: item.ruleId };
});
}
}
});
return obj;
});
}
+242
View File
@@ -0,0 +1,242 @@
import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
RESULT_MSG_ERROR,
} from '@/constants/result-constants';
import { language, request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
/**
* 查询网元列表
* @param query 查询参数
* @returns object
*/
export async function listNeInfo(query: Record<string, any>) {
let totalSQL = 'select count(*) as total from ne_info where 1=1 ';
let rowsSQL = 'select * from ne_info where 1=1 ';
// 查询
let querySQL = '';
if (query.neType) {
querySQL += ` and ne_type = '${query.neType}' `;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_info`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['ne_info'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
//通过sort进行冒泡排序
data.rows.sort((a: any, b: any) => {
const typeA = NE_TYPE_LIST.indexOf(a.neType);
const typeB = NE_TYPE_LIST.indexOf(b.neType);
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
return typeA - typeB;
});
}
}
});
return data;
}
return result;
}
/**
* 查询网元详细
* @param menuId 网元ID
* @returns object
*/
export async function getNeInfo(id: string | number) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_info`,
method: 'get',
params: {
SQL: `select * from ne_info where id = ${id}`,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
let neInfo = result.data.data[0]['ne_info'];
if (neInfo) {
return Object.assign(result, {
data: parseObjLineToHump(neInfo[0]),
});
}
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
}
return result;
}
/**
* 新增网元
* @param data 网元对象
* @returns object
*/
export function addNeInfo(data: Record<string, any>) {
data.port = `${data.port}`;
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/neInfo?sync2ne=${
data.sync
}`,
method: 'post',
data: data,
});
}
/**
* 修改网元
* @param data 网元对象
* @returns object
*/
export function updateNeInfo(data: Record<string, any>) {
data.port = `${data.port}`;
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/neInfo?sync2ne=${data.sync}`,
method: 'put',
data: data,
});
}
/**
* 删除网元
* @param noticeId 网元ID
* @returns object
*/
export async function delNeInfo(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/neInfo?ne_id=${data.neId}`,
method: 'delete',
timeout: 60 * 1000,
});
}
/**
* 导出网元配置文件
* @param data data {neType neId}
* @returns bolb
*/
export function exportSet(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/cm?ne_id=${data.neId}`,
method: 'get',
responseType: 'blob',
headers: {
'Content-Type': 'application/octet-stream',
},
timeout: 180_000,
});
}
/**
* 导入网元配置文件
* @param data 网元对象
* @returns object
*/
export function importFile(data: Record<string, any>) {
let dataType: 'json' | 'form-data' = 'json';
let url = `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/cm?ne_id=${data.neId}`;
let obj: any = { fileName: data.fileName };
if (data.importType === 'local') {
let formData = new FormData();
formData.append('nfType', data.neType);
formData.append('nfId', data.neId);
formData.append('file', data.file);
obj = formData;
dataType = 'form-data';
}
// 处理FormData类型的data
return request({
url,
method: 'post',
data: obj,
dataType,
timeout: 180_000,
});
}
/**
* 查询远程服务器上网元配置文件
* @param data 网元对象
* @returns object
*/
export async function listServerFile(data: Record<string, any>) {
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/ne_backup?SQL= select * from ne_backup where ne_type ='${data.neType}'`,
method: 'get',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
let data = result.data.data[0];
return Object.assign(result, {
data: parseObjLineToHump(data['ne_backup']),
});
}
return result;
}
/**
* 启动网元
* @data {neType,neId}
* @returns bolb
*/
export function startNf(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/start?neId=${data.neId}`,
method: 'post',
timeout: 180_000,
});
}
/**
* 重启网元
* @data {neType,neId}
* @returns bolb
*/
export function restartNf(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/restart?neId=${data.neId}`,
method: 'post',
timeout: 180_000,
});
}
/**
* 停止网元
* @data {neType,neId}
* @returns bolb
*/
export function stopNf(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/elementType/${data.neType}/objectType/service/stop?neId=${data.neId}`,
method: 'post',
timeout: 180_000,
});
}
+220
View File
@@ -0,0 +1,220 @@
import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
RESULT_MSG_ERROR,
} from '@/constants/result-constants';
import { language, request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询软件列表
* @param query 查询参数
* @returns object
*/
export async function listNeSoftware(query: Record<string, any>) {
let totalSQL = 'select count(id) as total from ne_software ';
let rowsSQL = ' select * from ne_software ';
// 查询
let querySQL = 'where 1=1';
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by update_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_software`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['ne_software'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
* 删除软件信息
* @param noticeId 网元ID
* @returns object
*/
export async function delNeSoftware(data: Record<string, any>) {
return request({
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
method: 'delete',
});
}
/**
* 获取软件信息文件
* @param menuId 网元ID
* @returns object
*/
export async function downloadNeSoftware(data: Record<string, any>) {
return await request({
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}`,
method: 'get',
responseType: 'blob',
timeout: 180_000,
});
}
/**
* 上传文件
* @param data 表单数据对象
* @returns object
*/
export function uploadNeSoftware(data: FormData) {
return request({
url: `/api/rest/systemManagement/v1/${data.get('nf')}/software/${data.get(
'version'
)}`,
method: 'post',
data,
dataType: 'form-data',
timeout: 180_000,
});
}
/**
* 下发文件
* @param data 数据对象
* @returns object
*/
export async function sendNeSoftware(data: Record<string, any>) {
const result = await request({
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
method: 'post',
timeout: 180_000,
repeatSubmit: false,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
delete result.data;
return result;
}
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
}
/**
* 激活文件
* @param data 数据对象
* @returns object
*/
export async function runNeSoftware(data: Record<string, any>) {
const result = await request({
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
method: 'put',
timeout: 180_000,
repeatSubmit: false,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
delete result.data;
return result;
}
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
}
/**
* 回退文件
* @param data 数据对象
* @returns object
*/
export async function backNeSoftware(data: Record<string, any>) {
const result = await request({
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
method: 'PATCH',
timeout: 180_000,
repeatSubmit: false,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
delete result.data;
return result;
}
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
}
/**
* 查询版本列表
* @param query 查询参数
* @returns object
*/
export async function listNeVersion(query: Record<string, any>) {
let totalSQL = 'select count(id) as total from ne_version ';
let rowsSQL = 'select * from ne_version ';
// 查询
let querySQL = 'where 1=1';
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.status) {
querySQL += ` and status = '${query.status}' `;
}
if (query.beginTime && query.endTime) {
querySQL += ` and update_time BETWEEN '${query.beginTime}' AND '${query.endTime}' `;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by update_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/ne_version`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['ne_version'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
+201 -59
View File
@@ -1,30 +1,36 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
import { parseDateToStr } from '@/utils/date-utils';
import useUserStore from '@/store/modules/user';
/**
* 获取活动告警数
* @returns object
*/
export async function getActiveAlarmTotal() {
let totalSQL = `select count(*) as total from alarm where alarm_status='1'`;
// 发起请求
const result = await request({
url: `/neData/alarm/list`,
method: 'GET',
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
alarmStatus: 'Active',
sortField: 'event_time',
sortOrder: 'desc',
pageNum: 1,
pageSize: 1,
SQL: totalSQL,
},
});
return {
code: result.code,
msg: result.msg,
data: result.data.total ?? 0,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const itemData = result.data.data;
if (Array.isArray(itemData)) {
const v = itemData[0]['alarm'];
if (Array.isArray(v)) {
result.data = v[0]['total'];
}
}
}
return result;
}
/**
@@ -32,28 +38,125 @@ export async function getActiveAlarmTotal() {
* @param query 查询参数
* @returns object
*/
export async function listAct(query: Record<string, any>) {
return await request({
url: `/neData/alarm/list`,
method: 'GET',
params: query,
export async function listAct(query: Record<string, any>, filterSQl: string) {
let totalSQL = `select count(*) as total from alarm where alarm_status='1' ${filterSQl} `;
let rowsSQL = `select * from alarm where alarm_status='1' ${filterSQl}`;
// 查询
let querySQL = '';
if (query.alarmCode) {
querySQL += ` and alarm_code = '${query.alarmCode}' `;
}
if (query.alarmType) {
querySQL += ` and alarm_type = '${query.alarmType}' `;
}
if (query.pvFlag) {
querySQL += ` and pv_flag = '${query.pvFlag}' `;
}
if (query.origSeverity) {
querySQL += ` and orig_severity in('${query.origSeverity}' )`;
}
if (query.neId) {
querySQL += ` and ne_id like '%${query.neId}%' `;
}
if (query.neName) {
querySQL += ` and ne_name like '%${query.neName}%' `;
}
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.beginTime && query.endTime) {
querySQL += ` and event_time BETWEEN '${query.beginTime}' and ' ${query.endTime}'`;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by event_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['alarm'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
* 确认告警信息
* @param ids 记录ID
* @param state 状态 true确认 false取消确认
* @param data 鉴权对象
* @returns object
*/
export function ackAlarm(ids: number[], state: boolean) {
return request({
url: `/neData/alarm/ack'`,
method: 'PUT',
data: {
ids: ids,
ackState: state,
export function updateConfirm(data: Record<string, any>) {
var time = new Date();
const userName = useUserStore().userName;
let finalData = {
alarm: {
ack_time: parseDateToStr(time),
ack_user: userName,
ack_state: '1',
},
};
return request({
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id='${data.id}'`,
method: 'put',
data: finalData,
});
}
/**
* 取消确认告警
* @param data 鉴权对象
* @returns object
*/
export function cancelConfirm(data: (string | number)[]) {
var time = new Date();
const userName = useUserStore().userName;
let finalData = {
alarm: {
ack_time: parseDateToStr(time),
ack_user: '',
ack_state: '0',
},
};
return request({
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
','
)})`,
method: 'put',
data: finalData,
});
}
@@ -84,7 +187,7 @@ export function showPass(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='displayFilter'`,
method: 'PUT',
method: 'put',
data: toBackJson,
});
}
@@ -96,7 +199,7 @@ export function showPass(data: Record<string, any>) {
export function getPass() {
return request({
url: `/api/rest/databaseManagement/v1/select/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: "SELECT value_json,value FROM config WHERE config_tag ='displayFilter'",
},
@@ -105,29 +208,27 @@ export function getPass() {
/**
* 清除告警信息
* @param ids 记录ID
* @param data 鉴权对象
* @returns object
*/
export function clearAlarm(ids: number[]) {
return request({
url: `/neData/alarm/clear`,
method: 'PUT',
data: { ids },
});
}
export function clearAlarm(data: Record<string, any>) {
var time = new Date();
const userName = useUserStore().userName;
let finalData = {
data: {
clear_time: parseDateToStr(time),
clear_type: '2',
alarm_status: '0',
clear_user: userName,
},
};
/**
* 告警信息导出
* @param params 查询列表条件
* @returns object
*/
export function exportAlarm(params: Record<string, any>) {
return request({
url: '/neData/alarm/export',
method: 'GET',
params: params,
responseType: 'blob',
timeout: 180_000,
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
','
)})`,
method: 'put',
data: finalData,
});
}
@@ -139,7 +240,7 @@ export function exportAlarm(params: Record<string, any>) {
export function listSync() {
return request({
url: `/api/rest/faultManagement/v1/elementType/all/objectType/alarms`,
method: 'GET',
method: 'get',
timeout: 180_000,
});
}
@@ -174,7 +275,7 @@ export async function exportAll(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'GET',
method: 'get',
params: {
rowsSQL: rowsSQL + querySQL,
},
@@ -194,13 +295,33 @@ export async function exportAll(query: Record<string, any>) {
* @returns bolb
*/
export async function origGet() {
return await request({
url: `/neData/alarm/count/severity`,
method: 'GET',
let totalSQL = `select count(*) as value,orig_severity as name from alarm WHERE alarm_status='1' and orig_severity!='Event' group by orig_severity`;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
alarmStatus: 'Active',
SQL: totalSQL,
},
timeout: 30_000,
});
////
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const itemData = result.data.data;
if (Array.isArray(itemData)) {
const v = itemData[0]['alarm'];
if (Array.isArray(v)) {
result.data = v;
}
if (v === null) {
result.data = [];
}
}
}
return result;
}
/**
@@ -208,13 +329,34 @@ export async function origGet() {
* @param filterFlag 查询参数
* @returns object
*/
export async function top3Sel() {
return await request({
url: `/neData/alarm/count/ne`,
method: 'GET',
export async function top3Sel(filterFlag?: string) {
let filter = ` WHERE alarm_status='1'and orig_severity='${filterFlag}'`;
if (!filterFlag) filter = "WHERE alarm_status='1'";
let top3SQL = `select count(*) as value,ne_type as name from alarm ${filter} and orig_severity!='Event' group by ne_type ORDER BY value desc limit 0,3 `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
alarmStatus: 'Active',
top: 3,
SQL: top3SQL,
},
timeout: 30_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const itemData = result.data.data;
if (Array.isArray(itemData)) {
const v = itemData[0]['alarm'];
if (Array.isArray(v)) {
result.data = v;
}
if (v === null) {
result.data = [];
}
}
}
return result;
}
+69 -5
View File
@@ -1,6 +1,8 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
import { parseDateToStr } from '@/utils/date-utils';
import useUserStore from '@/store/modules/user';
/**
* 查询列表
@@ -8,11 +10,73 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
* @returns object
*/
export async function listAct(query: Record<string, any>) {
return await request({
url: `/neData/alarm/log/event`,
method: 'GET',
params: query,
let totalSQL = `select count(*) as total from alarm_event where 1=1 `;
let rowsSQL = `select * from alarm_event where 1=1 `;
// 查询
let querySQL = '';
if (query.alarmCode) {
querySQL += ` and alarm_code = '${query.alarmCode}' `;
}
if (query.alarmType) {
querySQL += ` and alarm_type = '${query.alarmType}' `;
}
if (query.pvFlag) {
querySQL += ` and pv_flag = '${query.pvFlag}' `;
}
if (query.neId) {
querySQL += ` and ne_id like '%${query.neId}%' `;
}
if (query.neName) {
querySQL += ` and ne_name like '%${query.neName}%' `;
}
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.beginTime && query.endTime) {
querySQL += ` and event_time BETWEEN '${query.beginTime}' and ' ${query.endTime}'`;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by event_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_event`,
method: 'get',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['alarm_event'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
@@ -45,7 +109,7 @@ export async function exportAll(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_event`,
method: 'GET',
method: 'get',
params: {
rowsSQL: rowsSQL + querySQL,
},
+13 -20
View File
@@ -18,7 +18,7 @@ export async function getAlarmSet() {
// 历史告警保存时间
const logDurationResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'historyDuration'`,
},
@@ -27,7 +27,7 @@ export async function getAlarmSet() {
// 同步设置
const logCapacityResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'syncTaskPeriod'`,
},
@@ -63,11 +63,7 @@ export async function getAlarmSet() {
}
}
if (Object.keys(resultData).length === 0) {
return {
code: RESULT_CODE_ERROR,
msg: RESULT_MSG_ERROR[language],
data: {},
};
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: {} };
}
return {
code: RESULT_CODE_SUCCESS,
@@ -90,14 +86,14 @@ export async function updateAlarmSet(data: Record<string, any>) {
// 历史告警保存时间
const historyDurationResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='historyDuration'`,
method: 'PUT',
method: 'put',
data: { data: { value: data.historyDuration.toString() } },
});
arr.push(historyDurationResult);
// 同步设置
const syncTaskPeriodResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='syncTaskPeriod'`,
method: 'PUT',
method: 'put',
data: { data: { value_json: JSON.stringify(syncTaskPeriodJson) } },
});
arr.push(syncTaskPeriodResult);
@@ -121,11 +117,7 @@ export async function updateAlarmSet(data: Record<string, any>) {
}
// 无变更时
if (resultNum === 0) {
return {
code: RESULT_CODE_ERROR,
msg: RESULT_MSG_ERROR[language],
data: 0,
};
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language], data: 0 };
}
return {
code: RESULT_CODE_SUCCESS,
@@ -145,7 +137,7 @@ export async function getForwardSet() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'forwardAlarm'`,
},
@@ -174,13 +166,14 @@ export async function getForwardSet() {
*/
export async function updateForwardSet(data: Record<string, any>) {
// return false;
let obj: any = [
{ interface: 'Email', to_user: data.emailObj },
{ interface: 'SMS', to_user: data.smsObj },
];
console.log(data)
let obj:any=[
{interface:"Email",to_user:data.emailObj},
{interface:"SMS",to_user:data.smsObj}
]
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='forwardAlarm'`,
method: 'PUT',
method: 'put',
data: { data: { value_json: JSON.stringify(obj) } },
});
// 解析数据
+68 -3
View File
@@ -4,6 +4,71 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
import { parseDateToStr } from '@/utils/date-utils';
import useUserStore from '@/store/modules/user';
/**
* 查询列表
* @param query 查询参数
* @returns object
*/
export async function listAct(query: Record<string, any>) {
let totalSQL = `select count(*) as total from alarm where alarm_status='0'`;
let rowsSQL = `select * from alarm where alarm_status='0'`;
// 查询
let querySQL = '';
querySQL += query.alarm_code
? ` and alarm_code = '${query.alarm_code}' `
: '';
querySQL += query.alarm_type
? ` and alarm_type = '${query.alarm_type}' `
: '';
querySQL += query.pv_flag ? ` and pv_flag = '${query.pv_flag}' ` : '';
querySQL += query.orig_severity
? ` and orig_severity in('${query.orig_severity}' )`
: '';
querySQL += query.ne_id ? ` and ne_id like '%${query.ne_id}%' ` : '';
querySQL += query.ne_name ? ` and ne_name like '%${query.ne_name}%' ` : '';
querySQL += query.ne_type ? ` and ne_type like '%${query.ne_type}%' ` : '';
querySQL +=
query.beginTime && query.endTime
? ` and event_time BETWEEN '${query.beginTime}' and ' ${query.endTime}'`
: '';
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` order by clear_time desc limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['alarm'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
* 确认告警信息
* @param data 鉴权对象
@@ -22,7 +87,7 @@ export function updateConfirm(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id='${data.id}'`,
method: 'PUT',
method: 'put',
data: finalData,
});
}
@@ -46,7 +111,7 @@ export function cancelConfirm(data: (string | number)[]) {
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
','
)})`,
method: 'PUT',
method: 'put',
data: finalData,
});
}
@@ -81,7 +146,7 @@ export async function exportAll(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'GET',
method: 'get',
params: {
rowsSQL: rowsSQL + querySQL,
},
+74 -6
View File
@@ -1,15 +1,83 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseDateToStr } from '@/utils/date-utils';
import { NE_TYPE_LIST } from '@/constants/ne-constants';
/**
* 服务器时间
* 查询公告列表
* @param query 查询参数
* @returns object
*/
export async function listMain() {
const result = await request({
url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState',
method: 'get',
timeout: 60_000,
});
// console.log(result);
let realData = result.data.data;
const mergedData = realData.map((obj: any) => {
// console.log(obj);
const [key, value] = Object.entries(obj)[0];
const ipAddress = (value as any).ipAddress;
const systemState = (value as any).systemState;
const serialNum = (value as any).serialNum;
const version = (value as any).version;
const errCode = systemState && systemState['errorCode'];
var time = new Date();
// console.log(key, value);
let mergedObj;
if (errCode === undefined && systemState) {
mergedObj = {
...systemState,
refresh: parseDateToStr(time),
ipAddress: ipAddress,
name: key.split('/').join('_'),
status: 'Normal',
};
} else {
mergedObj = {
version,
refresh: parseDateToStr(time),
ipAddress,
serialNum,
name: key.split('/').join('_'),
expiryDate: '-',
status: 'Abnormal',
};
}
return mergedObj;
});
//通过sort进行冒泡排序
mergedData.sort((a: any, b: any) => {
const typeA = NE_TYPE_LIST.indexOf(a.name.split('_')[0]);
const typeB = NE_TYPE_LIST.indexOf(b.name.split('_')[0]);
if (typeA === -1) return 1; // 如果不在特定顺序中,排到后面
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
return typeA - typeB;
});
return mergedData;
}
/**
* 获取服务器时间
* @returns object
*/
export async function getServerTime() {
return request({
url: `/time`,
method: 'GET',
whithToken: false,
// 发起请求
const result = await request({
url: `/api/rest/systemManagement/v1/elementType/OMC/objectType/time`,
method: 'get',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data) {
return Object.assign(result, {
data: result.data.data,
});
}
return result;
}
/**
@@ -19,7 +87,7 @@ export async function getServerTime() {
export function getSysConf() {
return request({
url: `/sys-conf`,
method: 'GET',
method: 'get',
whithToken: false,
});
}
+62 -4
View File
@@ -1,4 +1,6 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询日志列表
@@ -6,9 +8,65 @@ import { request } from '@/plugins/http-fetch';
* @returns object
*/
export async function listAlarm(query: Record<string, any>) {
return await request({
url: `/neData/alarm/log/list`,
method: 'GET',
params: query,
let totalSQL = 'select count(*) as total from alarm_log where 1=1 ';
let rowsSQL = 'select * from alarm_log where 1=1 ';
// 查询
let querySQL = '';
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.status) {
querySQL += ` and alarm_status = '${query.status}' `;
}
if (query.beginTime) {
querySQL += ` and log_time >= '${query.beginTime}' `;
}
if (query.endTime) {
querySQL += ` and log_time <= '${query.endTime}' `;
}
// 排序
let sortSql = ' order by log_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
sortSql += ' desc ';
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_log`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['alarm_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
+53
View File
@@ -0,0 +1,53 @@
import { request } from '@/plugins/http-fetch';
/**
* 获取下拉框数据
* @returns object
*/
export function getBakFile() {
return request({
url: '/lm/table/list',
method: 'get',
});
}
/**
* 获取对应类型的文件列表
* @param query 查询参数
* @returns object
*/
export function getBakFileList(query: Record<string, any>) {
return request({
url: '/lm/file/list',
method: 'get',
params: query,
});
}
/**
* 下载远端文件
* @param query 查询参数
* @returns object
*/
export function downFile(query: Record<string, any>) {
return request({
url: `/lm/file/${query.fileName}`,
method: 'get',
params: query,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* 删除远端获取文件
* @param query 查询参数
* @returns object
*/
export function delFile(query: Record<string, any>) {
return request({
url: `/lm/file/${query.fileName}`,
method: 'delete',
params: query,
});
}
+59 -4
View File
@@ -1,4 +1,6 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询日志列表
@@ -6,9 +8,62 @@ import { request } from '@/plugins/http-fetch';
* @returns object
*/
export async function listForwarding(query: Record<string, any>) {
return await request({
url: `/neData/alarm/forward/log/list`,
method: 'GET',
params: query,
let totalSQL = 'select count(*) as total from alarm_forward_log where 1=1 ';
let rowsSQL = 'select * from alarm_forward_log where 1=1 ';
// 查询
let querySQL = '';
if (query.neType) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.beginTime) {
querySQL += ` and log_time >= '${query.beginTime}' `;
}
if (query.endTime) {
querySQL += ` and log_time <= '${query.endTime}' `;
}
// 排序
let sortSql = ' order by log_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
sortSql += ' desc ';
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_forward_log`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['alarm_forward_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
+11 -11
View File
@@ -18,7 +18,7 @@ export async function getLogSet() {
// 日志保存时间
const logDurationResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'logDuration'`,
},
@@ -27,7 +27,7 @@ export async function getLogSet() {
// 日志最大容量
const logCapacityResult = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'logCapacity'`,
},
@@ -76,7 +76,7 @@ export async function updateLogSet(data: Record<string, any>) {
const value = `${data[key]}`;
const result = request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='${key}'`,
method: 'PUT',
method: 'put',
data: { data: { value } },
});
arr.push(result);
@@ -120,7 +120,7 @@ export async function getFtpLogSet() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'ftpLogSet'`,
},
@@ -151,7 +151,7 @@ export async function getFtpLogSet() {
export async function updateFtpLogSet(data: Record<string, any>) {
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='ftpLogSet'`,
method: 'PUT',
method: 'put',
data: { data: { value_json: JSON.stringify(data) } },
});
// 解析数据
@@ -176,7 +176,7 @@ export async function getRemoteOut() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'remoteLogSet'`,
},
@@ -206,7 +206,7 @@ export async function getRemoteOut() {
export async function updateRemoteOut(data: Record<string, any>) {
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='remoteLogSet'`,
method: 'PUT',
method: 'put',
data: { data: { value_json: JSON.stringify(data) } },
});
// 解析数据
@@ -254,7 +254,7 @@ export async function exportLog(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/${query.logType}`,
method: 'GET',
method: 'get',
params: {
SQL: querySQL,
},
@@ -277,7 +277,7 @@ export async function exportLog(query: Record<string, any>) {
export async function backupLog(logType: string) {
const result = await request({
url: `/api/rest/dataManagement/v1/omc_db/${logType}/backup`,
method: 'POST',
method: 'post',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
@@ -300,7 +300,7 @@ export async function backupLog(logType: string) {
export async function backupDownload(path: string) {
return request({
url: `/api/rest/fileManagement/v1/path/file?path=${path}`,
method: 'GET',
method: 'get',
responseType: 'blob',
timeout: 180_000,
});
@@ -314,7 +314,7 @@ export async function backupDownload(path: string) {
export function backupFileList() {
return request({
url: `/api/rest/fileManagement/v1/files/listFiles`,
method: 'POST',
method: 'post',
data: {
path: '/usr/local/omc/database',
expand: true,
+69
View File
@@ -0,0 +1,69 @@
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 listMML(query: Record<string, any>) {
let totalSQL = 'select count(*) as total from mml_log where 1=1 ';
let rowsSQL = 'select * from mml_log where 1=1 ';
// 查询
let querySQL = '';
if (query.accountName) {
querySQL += ` and user like '%${query.accountName}%' `;
}
if (query.beginTime) {
querySQL += ` and log_time >= '${query.beginTime}' `;
}
if (query.endTime) {
querySQL += ` and log_time <= '${query.endTime}' `;
}
// 排序
let sortSql = ' order by log_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
sortSql += ' desc ';
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/mml_log`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['mml_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
+6 -5
View File
@@ -41,7 +41,7 @@ export async function listOperationLog(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/operation_log`,
method: 'GET',
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -50,8 +50,9 @@ export async function listOperationLog(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data = {
data: { total: 0, rows: [] as any },
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
@@ -59,9 +60,9 @@ export async function listOperationLog(query: Record<string, any>) {
const itemData = item['operation_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.data.total = itemData[0]['total'];
data.total = itemData[0]['total'];
} else {
data.data.rows = itemData.map(v => parseObjLineToHump(v));
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
+72
View File
@@ -0,0 +1,72 @@
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 listSecurityLog(query: Record<string, any>) {
let totalSQL = 'select count(*) as total from security_log where 1=1 ';
let rowsSQL = 'select * from security_log where 1=1 ';
// 查询
let querySQL = '';
if (query.accountName) {
querySQL += ` and account_name like '%${query.accountName}%' `;
}
if (query.opType) {
querySQL += ` and op_type = '${query.opType}' `;
}
if (query.beginTime) {
querySQL += ` and op_time >= '${query.beginTime}' `;
}
if (query.endTime) {
querySQL += ` and op_time <= '${query.endTime}' `;
}
// 排序
let sortSql = ' order by op_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
sortSql += ' desc ';
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/security_log`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
},
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['security_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
+61
View File
@@ -0,0 +1,61 @@
import { request } from '@/plugins/http-fetch';
// 登录方法
export function login(data: Record<string, string>) {
return request({
url: '/login',
method: 'post',
data: data,
whithToken: false,
crypto: true,
});
}
/**
* 注册方法
* @param data 注册对象
* @returns object
*/
export function register(data: Record<string, any>) {
return request({
url: '/register',
method: 'post',
data: data,
whithToken: false,
crypto: true,
});
}
/**
* 获取用户详细信息
* @returns object
*/
export function getInfo() {
return request({
url: '/getInfo',
method: 'get',
});
}
/**
* 退出方法
* @returns object
*/
export function logout() {
return request({
url: '/logout',
method: 'post',
});
}
/**
* 获取验证码
* @returns object
*/
export function getCaptchaImage() {
return request({
url: '/captchaImage',
method: 'get',
whithToken: false,
});
}
+2 -2
View File
@@ -15,7 +15,7 @@ export async function getOperationSet() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM config WHERE config_tag = 'operationSet'`,
},
@@ -45,7 +45,7 @@ export async function getOperationSet() {
export async function updateOperationSet(data: Record<string, any>) {
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/config?WHERE=config_tag='operationSet'`,
method: 'PUT',
method: 'put',
data: { data: { value_json: JSON.stringify(data) } },
});
// 解析数据
+25 -17
View File
@@ -1,4 +1,6 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询网元可用cmd命令
@@ -6,17 +8,22 @@ import { request } from '@/plugins/http-fetch';
* @returns object
*/
export async function getMMLByNE(neType: string) {
return request({
url: '/tool/mml/system/list',
method: 'GET',
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_system`,
method: 'get',
params: {
neType: neType,
status: 'Active',
pageNum: 1,
pageSize: 1000,
SQL: `select * from mml_system where ne_type = '${neType}' and status = 'Active'`,
},
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
let data = result.data.data[0];
return Object.assign(result, {
data: parseObjLineToHump(data['mml_system']),
});
}
return result;
}
/**
@@ -33,15 +40,16 @@ export async function sendMMlByNE(
objectType: string,
cmdArr: string[]
) {
return request({
url: '/tool/mml/command',
method: 'POST',
data: {
neType: neType,
neId: neId,
type: objectType,
command: cmdArr,
},
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/${objectType}?ne_id=${neId}`,
method: 'post',
data: { mml: cmdArr },
timeout: 180_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
result.data = result.data.data;
}
return result;
}
+2 -2
View File
@@ -10,7 +10,7 @@ export async function getMMLByOMC() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_command`,
method: 'GET',
method: 'get',
params: {
SQL: `select * from mml_command where ne_type = 'OMC' and status = 'Active'`,
},
@@ -35,7 +35,7 @@ export async function sendMMlByOMC(neId: string, cmdArr: string[]) {
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/OMC/objectType/mml?ne_id=${neId}`,
method: 'POST',
method: 'post',
data: { mml: cmdArr },
timeout: 180_000,
});
+25 -17
View File
@@ -1,21 +1,28 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询UDM可用cmd命令
* @returns object
*/
export async function getMMLByUDM() {
return request({
url: '/tool/mml/subscriber/list',
method: 'GET',
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_subscriber`,
method: 'get',
params: {
neType: 'UDM',
status: 'Active',
pageNum: 1,
pageSize: 1000,
SQL: `select * from mml_subscriber where ne_type = 'UDM' and status = 'Active'`,
},
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
let data = result.data.data[0];
return Object.assign(result, {
data: parseObjLineToHump(data['mml_subscriber']),
});
}
return result;
}
/**
@@ -25,15 +32,16 @@ export async function getMMLByUDM() {
* @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,
},
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
method: 'post',
data: { mml: cmdArr },
timeout: 180_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
result.data = result.data.data;
}
return result;
}
+24 -28
View File
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
export function getCache() {
return request({
url: '/monitor/cache',
method: 'GET',
method: 'get',
});
}
@@ -17,8 +17,8 @@ export function getCache() {
*/
export function listCacheName() {
return request({
url: '/monitor/cache/names',
method: 'GET',
url: '/monitor/cache/getNames',
method: 'get',
});
}
@@ -29,9 +29,8 @@ export function listCacheName() {
*/
export function listCacheKey(cacheName: string) {
return request({
url: `/monitor/cache/keys`,
method: 'GET',
params: { cacheName },
url: `/monitor/cache/getKeys/${cacheName}`,
method: 'get',
});
}
@@ -43,22 +42,8 @@ export function listCacheKey(cacheName: string) {
*/
export function getCacheValue(cacheName: string, cacheKey: string) {
return request({
url: `/monitor/cache/value`,
method: 'GET',
params: { cacheName, cacheKey },
});
}
/**
* 缓存名称列表安全删除
*
* 指定可清理的缓存key
* @returns object
*/
export function clearCacheSafe() {
return request({
url: '/monitor/cache/names',
method: 'DELETE',
url: `/monitor/cache/getValue/${cacheName}/${cacheKey}`,
method: 'get',
});
}
@@ -69,9 +54,8 @@ export function clearCacheSafe() {
*/
export function clearCacheName(cacheName: string) {
return request({
url: `/monitor/cache/keys`,
method: 'DELETE',
params: { cacheName },
url: `/monitor/cache/clearCacheName/${cacheName}`,
method: 'delete',
});
}
@@ -83,8 +67,20 @@ export function clearCacheName(cacheName: string) {
*/
export function clearCacheKey(cacheName: string, cacheKey: string) {
return request({
url: `/monitor/cache/value`,
method: 'DELETE',
params: { cacheName, cacheKey },
url: `/monitor/cache/clearCacheKey/${cacheName}/${cacheKey}`,
method: 'delete',
});
}
/**
* 安全清理缓存名称
*
* 指定可清理的缓存key
* @returns object
*/
export function clearCacheSafe() {
return request({
url: '/monitor/cache/clearCacheSafe',
method: 'delete',
});
}
+14 -14
View File
@@ -8,8 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function exportJob(query: Record<string, any>) {
return request({
url: '/monitor/job/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -22,7 +22,7 @@ export function exportJob(query: Record<string, any>) {
export function listJob(query: Record<string, any>) {
return request({
url: '/monitor/job/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listJob(query: Record<string, any>) {
export function getJob(jobId: string | number) {
return request({
url: `/monitor/job/${jobId}`,
method: 'GET',
method: 'get',
});
}
@@ -47,7 +47,7 @@ export function getJob(jobId: string | number) {
export function addJob(data: Record<string, any>) {
return request({
url: '/monitor/job',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -60,7 +60,7 @@ export function addJob(data: Record<string, any>) {
export function updateJob(data: Record<string, any>) {
return request({
url: '/monitor/job',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -73,7 +73,7 @@ export function updateJob(data: Record<string, any>) {
export function delJob(jobId: string | number) {
return request({
url: `/monitor/job/${jobId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -85,14 +85,14 @@ export function delJob(jobId: string | number) {
*/
export function changeJobStatus(
jobId: string | number,
statusFlag: string | number
status: string | number
) {
return request({
url: '/monitor/job/status',
method: 'PUT',
url: '/monitor/job/changeStatus',
method: 'put',
data: {
jobId,
statusFlag,
status,
},
});
}
@@ -105,7 +105,7 @@ export function changeJobStatus(
export function runJob(jobId: string) {
return request({
url: `/monitor/job/run/${jobId}`,
method: 'PUT',
method: 'put',
});
}
@@ -115,7 +115,7 @@ export function runJob(jobId: string) {
*/
export function resetQueueJob() {
return request({
url: '/monitor/job/reset',
method: 'PUT',
url: '/monitor/job/resetQueueJob',
method: 'put',
});
}
+12 -10
View File
@@ -5,11 +5,13 @@ import { request } from '@/plugins/http-fetch';
* @param query 查询参数
* @returns bolb
*/
export function exportJobLog(query: Record<string, any>) {
export function exportJobLog(
query: Record<string, any>
) {
return request({
url: '/monitor/job/log/export',
method: 'GET',
params: query,
url: '/monitor/jobLog/export',
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -21,8 +23,8 @@ export function exportJobLog(query: Record<string, any>) {
*/
export function listJobLog(query: Record<string, any>) {
return request({
url: '/monitor/job/log/list',
method: 'GET',
url: '/monitor/jobLog/list',
method: 'get',
params: query,
});
}
@@ -34,8 +36,8 @@ export function listJobLog(query: Record<string, any>) {
*/
export function delJobLog(jobLogId: string) {
return request({
url: `/monitor/job/log/${jobLogId}`,
method: 'DELETE',
url: `/monitor/jobLog/${jobLogId}`,
method: 'delete',
});
}
@@ -45,7 +47,7 @@ export function delJobLog(jobLogId: string) {
*/
export function cleanJobLog() {
return request({
url: '/monitor/job/log/clean',
method: 'DELETE',
url: '/monitor/jobLog/clean',
method: 'delete',
});
}
+1 -1
View File
@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
export function getLoad(query: Record<string, any>) {
return request({
url: '/monitor/load',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
+4 -4
View File
@@ -7,8 +7,8 @@ import { request } from '@/plugins/http-fetch';
*/
export function listOnline(query: Record<string, any>) {
return request({
url: '/monitor/user-online/list',
method: 'GET',
url: '/monitor/online/list',
method: 'get',
params: query,
});
}
@@ -20,7 +20,7 @@ export function listOnline(query: Record<string, any>) {
*/
export function forceLogout(tokenId: string) {
return request({
url: `/monitor/user-online/logout/${tokenId}`,
method: 'DELETE',
url: `/monitor/online/${tokenId}`,
method: 'delete',
});
}
+3 -2
View File
@@ -3,7 +3,8 @@ import { request } from '@/plugins/http-fetch';
/**服务器服务信息 */
export function getSystemInfo() {
return request({
url: '/monitor/system',
method: 'GET',
url: '/monitor/system-info',
method: 'get',
timeout: 60_000,
});
}
+4 -4
View File
@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
export function getGraphGroups() {
return request({
url: '/chart/graph/groups',
method: 'GET',
method: 'get',
});
}
@@ -12,7 +12,7 @@ export function getGraphGroups() {
export function getGraphData(group: string) {
return request({
url: '/chart/graph',
method: 'GET',
method: 'get',
params: {
group,
},
@@ -23,7 +23,7 @@ export function getGraphData(group: string) {
export function saveGraphData(group: string, data: Record<string, any>) {
return request({
url: '/chart/graph',
method: 'POST',
method: 'post',
data: {
group,
data,
@@ -35,6 +35,6 @@ export function saveGraphData(group: string, data: Record<string, any>) {
export function delGraphData(group: string) {
return request({
url: `/chart/graph/${group}`,
method: 'DELETE',
method: 'delete',
});
}
+6 -58
View File
@@ -1,4 +1,3 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
/**
@@ -6,11 +5,10 @@ import { request } from '@/plugins/http-fetch';
* @param query 查询参数
* @returns object
*/
export function getAllNeConfig(neType: string, neId: string) {
export function getAllNeConfig(neType: string) {
return request({
url: `/ne/config/list/${neType}`,
method: 'GET',
params: { neId },
method: 'get',
timeout: 60_000,
});
}
@@ -24,7 +22,7 @@ export function getNeConfigData(params: Record<string, any>) {
return request({
url: `/ne/config/data`,
params,
method: 'GET',
method: 'get',
});
}
@@ -36,7 +34,7 @@ export function getNeConfigData(params: Record<string, any>) {
export function editNeConfigData(data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -49,7 +47,7 @@ export function editNeConfigData(data: Record<string, any>) {
export function addNeConfigData(data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'POST',
method: 'post',
data: data,
});
}
@@ -62,57 +60,7 @@ export function addNeConfigData(data: Record<string, any>) {
export function delNeConfigData(params: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'DELETE',
method: 'delete',
params,
});
}
/**
* 从参数配置PCF中获取对应信息提供给PCF用户策略输入框
* @param neId
* @returns object {pccRules,sessionRules,qosTemplate,headerEnrichTemplate,serviceAreaRestriction}
*/
export async function getPCFRule(neId: any) {
const paramNameArr = [
'pccRules',
'sessionRules',
'qosTemplate',
'headerEnrichTemplate',
'serviceAreaRestriction',
];
const reqArr = [];
for (const paramName of paramNameArr) {
reqArr.push(
request({
url: `/ne/config/data`,
params: { neType: 'PCF', neId, paramName },
method: 'GET',
})
);
}
return await Promise.allSettled(reqArr).then(resArr => {
// 规则数据
const obj: any = {};
resArr.forEach((item, i: number) => {
if (item.status === 'fulfilled') {
const res = item.value;
if (res.code === RESULT_CODE_SUCCESS) {
const key = paramNameArr[i];
obj[key] = res.data.map((item: any) => {
if ('qosTemplate' === key) {
return { value: item.qosId, label: item.qosId };
}
if ('headerEnrichTemplate' === key) {
return { value: item.templateName, label: item.templateName };
}
if ('serviceAreaRestriction' === key) {
return { value: item.name, label: item.name };
}
return { value: item.ruleId, label: item.ruleId };
});
}
}
});
return obj;
});
}
+7 -9
View File
@@ -1,6 +1,4 @@
import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
import { request } from '@/plugins/http-fetch';
import { sessionGet } from '@/utils/cache-session-utils';
/**
* 网元配置文件备份记录列表
@@ -10,7 +8,7 @@ import { sessionGet } from '@/utils/cache-session-utils';
export function listNeConfigBackup(query: Record<string, any>) {
return request({
url: '/ne/config/backup/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -23,7 +21,7 @@ export function listNeConfigBackup(query: Record<string, any>) {
export function updateNeConfigBackup(data: Record<string, any>) {
return request({
url: '/ne/config/backup',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -36,7 +34,7 @@ export function updateNeConfigBackup(data: Record<string, any>) {
export async function downNeConfigBackup(id: string) {
return await request({
url: '/ne/config/backup/download',
method: 'GET',
method: 'get',
params: { id },
responseType: 'blob',
timeout: 180_000,
@@ -51,7 +49,7 @@ export async function downNeConfigBackup(id: string) {
export async function delNeConfigBackup(id: string) {
return request({
url: '/ne/config/backup',
method: 'DELETE',
method: 'delete',
params: { id },
});
}
@@ -64,7 +62,7 @@ export async function delNeConfigBackup(id: string) {
export function exportNeConfigBackup(data: Record<string, any>) {
return request({
url: '/ne/config/backup/export',
method: 'POST',
method: 'post',
data: data,
responseType: 'blob',
timeout: 180_000,
@@ -79,7 +77,7 @@ export function exportNeConfigBackup(data: Record<string, any>) {
export function importNeConfigBackup(data: Record<string, any>) {
return request({
url: '/ne/config/backup/import',
method: 'POST',
method: 'post',
data: data,
});
}
}
+8 -8
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeHost(query: Record<string, any>) {
return request({
url: '/ne/host/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listNeHost(query: Record<string, any>) {
export function getNeHost(hostId: string | number) {
return request({
url: `/ne/host/${hostId}`,
method: 'GET',
method: 'get',
});
}
@@ -33,7 +33,7 @@ export function getNeHost(hostId: string | number) {
export function addNeHost(data: Record<string, any>) {
return request({
url: '/ne/host',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -46,7 +46,7 @@ export function addNeHost(data: Record<string, any>) {
export function updateNeHost(data: Record<string, any>) {
return request({
url: '/ne/host',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -59,7 +59,7 @@ export function updateNeHost(data: Record<string, any>) {
export function delNeHost(hostId: string | number) {
return request({
url: `/ne/host/${hostId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -71,7 +71,7 @@ export function delNeHost(hostId: string | number) {
export function testNeHost(data: Record<string, any>) {
return request({
url: '/ne/host/test',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -84,7 +84,7 @@ export function testNeHost(data: Record<string, any>) {
export function neHostCheckInfo(data: Record<string, any>) {
return request({
url: '/ne/host/checkBySSH',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -97,7 +97,7 @@ export function neHostCheckInfo(data: Record<string, any>) {
export function neHostAuthorizedRSA(data: Record<string, any>) {
return request({
url: '/ne/host/authorizedBySSH',
method: 'POST',
method: 'post',
data: data,
});
}
+5 -5
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeHostCmd(query: Record<string, any>) {
return request({
url: '/ne/hostCmd/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listNeHostCmd(query: Record<string, any>) {
export function getNeHostCmd(cmdId: string | number) {
return request({
url: `/ne/hostCmd/${cmdId}`,
method: 'GET',
method: 'get',
});
}
@@ -33,7 +33,7 @@ export function getNeHostCmd(cmdId: string | number) {
export function addNeHostCmd(data: Record<string, any>) {
return request({
url: '/ne/hostCmd',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -46,7 +46,7 @@ export function addNeHostCmd(data: Record<string, any>) {
export function updateNeHostCmd(data: Record<string, any>) {
return request({
url: '/ne/hostCmd',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -59,6 +59,6 @@ export function updateNeHostCmd(data: Record<string, any>) {
export function delNeHostCmd(cmdId: string | number) {
return request({
url: `/ne/hostCmd/${cmdId}`,
method: 'DELETE',
method: 'delete',
});
}
+15 -17
View File
@@ -1,5 +1,3 @@
import { CACHE_SESSION_CRYPTO_API } from '@/constants/cache-keys-constants';
import { sessionGet } from '@/utils/cache-session-utils';
import { request } from '@/plugins/http-fetch';
/**
@@ -10,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeInfo(query: Record<string, any>) {
return request({
url: '/ne/info/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -24,7 +22,7 @@ export function listNeInfo(query: Record<string, any>) {
export function getNeInfo(infoId: string | number) {
return request({
url: `/ne/info/${infoId}`,
method: 'GET',
method: 'get',
});
}
@@ -36,9 +34,9 @@ export function getNeInfo(infoId: string | number) {
export function addNeInfo(data: Record<string, any>) {
return request({
url: `/ne/info`,
method: 'POST',
method: 'post',
data: data,
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
crypto: true,
timeout: 30_000,
});
}
@@ -51,9 +49,9 @@ export function addNeInfo(data: Record<string, any>) {
export function updateNeInfo(data: Record<string, any>) {
return request({
url: `/ne/info`,
method: 'PUT',
method: 'put',
data: data,
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
crypto: true,
timeout: 30_000,
});
}
@@ -66,7 +64,7 @@ export function updateNeInfo(data: Record<string, any>) {
export function delNeInfo(infoIds: string | number) {
return request({
url: `/ne/info/${infoIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
@@ -79,7 +77,7 @@ export function delNeInfo(infoIds: string | number) {
export function listAllNeInfo(query: Record<string, any>) {
return request({
url: '/ne/info/listAll',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -94,7 +92,7 @@ export function listAllNeInfo(query: Record<string, any>) {
export function stateNeInfo(neType: string, neId: string) {
return request({
url: '/ne/info/state',
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
@@ -108,7 +106,7 @@ export function stateNeInfo(neType: string, neId: string) {
export function getNeInfoByTypeAndID(neType: string, neId: string) {
return request({
url: '/ne/info/byTypeAndID',
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
@@ -122,7 +120,7 @@ export function getNeInfoByTypeAndID(neType: string, neId: string) {
export function getOAMFile(neType: string, neId: string) {
return request({
url: '/ne/info/oamFile',
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
@@ -138,7 +136,7 @@ export function getOAMFile(neType: string, neId: string) {
export function saveOAMFile(data: Record<string, any>) {
return request({
url: `/ne/info/oamFile`,
method: 'PUT',
method: 'put',
data: data,
timeout: 60_000,
});
@@ -151,7 +149,7 @@ export function saveOAMFile(data: Record<string, any>) {
export function getPara5GFilee() {
return request({
url: '/ne/info/para5GFile',
method: 'GET',
method: 'get',
});
}
@@ -164,7 +162,7 @@ export function getPara5GFilee() {
export function savePara5GFile(data: Record<string, any>) {
return request({
url: `/ne/info/para5GFile`,
method: 'PUT',
method: 'put',
data: data,
timeout: 60_000,
});
@@ -178,7 +176,7 @@ export function savePara5GFile(data: Record<string, any>) {
export function serviceNeAction(data: Record<string, any>) {
return request({
url: `/ne/action/service`,
method: 'PUT',
method: 'put',
data: data,
timeout: 60_000,
});
+6 -6
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeLicense(query: Record<string, any>) {
return request({
url: '/ne/license/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -22,7 +22,7 @@ export function listNeLicense(query: Record<string, any>) {
export function getNeLicense(licenseId: string | number) {
return request({
url: `/ne/license/${licenseId}`,
method: 'GET',
method: 'get',
});
}
@@ -35,7 +35,7 @@ export function getNeLicense(licenseId: string | number) {
export function getNeLicenseByTypeAndID(neType: string, neId: string) {
return request({
url: `/ne/license/byTypeAndID`,
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
@@ -49,7 +49,7 @@ export function getNeLicenseByTypeAndID(neType: string, neId: string) {
export function codeNeLicense(neType: string, neId: string) {
return request({
url: `/ne/license/code`,
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
@@ -62,7 +62,7 @@ export function codeNeLicense(neType: string, neId: string) {
export function changeNeLicense(data: Record<string, any>) {
return request({
url: `/ne/license/change`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
@@ -77,7 +77,7 @@ export function changeNeLicense(data: Record<string, any>) {
export function stateNeLicense(neType: string, neId: string) {
return request({
url: `/ne/license/state`,
method: 'GET',
method: 'get',
params: { neType, neId },
});
}
+6 -6
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeSoftware(query: Record<string, any>) {
return request({
url: '/ne/software/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -22,7 +22,7 @@ export function listNeSoftware(query: Record<string, any>) {
export function getNeSoftware(softwareId: string | number) {
return request({
url: `/ne/software/${softwareId}`,
method: 'GET',
method: 'get',
});
}
@@ -34,7 +34,7 @@ export function getNeSoftware(softwareId: string | number) {
export function addNeSoftware(data: Record<string, any>) {
return request({
url: `/ne/software`,
method: 'POST',
method: 'post',
data: data,
repeatSubmit: false,
});
@@ -48,7 +48,7 @@ export function addNeSoftware(data: Record<string, any>) {
export function updateNeSoftware(data: Record<string, any>) {
return request({
url: `/ne/software`,
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -61,7 +61,7 @@ export function updateNeSoftware(data: Record<string, any>) {
export function delNeSoftware(softwareIds: string | number) {
return request({
url: `/ne/software/${softwareIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
@@ -74,7 +74,7 @@ export function delNeSoftware(softwareIds: string | number) {
export function newNeVersion(data: Record<string, any>) {
return request({
url: `/ne/software/newNeVersion`,
method: 'POST',
method: 'post',
data: data,
});
}
+3 -3
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeVersion(query: Record<string, any>) {
return request({
url: '/ne/version/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -22,7 +22,7 @@ export function listNeVersion(query: Record<string, any>) {
export function getNeVersion(versionId: string | number) {
return request({
url: `/ne/version/${versionId}`,
method: 'GET',
method: 'get',
});
}
@@ -34,7 +34,7 @@ export function getNeVersion(versionId: string | number) {
export function operateNeVersion(data: Record<string, any>) {
return request({
url: `/ne/version/operate`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
+6 -94
View File
@@ -8,9 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function listAMFDataUE(query: Record<string, any>) {
return request({
url: '/neData/amf/ue/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
}
@@ -22,109 +21,22 @@ export function listAMFDataUE(query: Record<string, any>) {
export function delAMFDataUE(ueIds: string | number) {
return request({
url: `/neData/amf/ue/${ueIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
/**
* AMF-UE会话列表导出
* @param query 查询列表条件
* @param data 查询列表条件
* @returns object
*/
export function exportAMFDataUE(query: Record<string, any>) {
export function exportAMFDataUE(data: Record<string, any>) {
return request({
url: '/neData/amf/ue/export',
method: 'GET',
params: query,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* AMF-接入基站信息列表
* @param query 查询参数 neId=001&id=1
* @returns object
*/
export function listAMFNblist(query: Record<string, any>) {
return request({
url: '/neData/amf/nb/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* AMF-接入基站状态信息列表
* @param query 查询参数 neId=001&state=1
* @returns object
*/
export function listAMFNbStatelist(query: Record<string, any>) {
return request({
url: '/neData/amf/nb/list-cfg',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* AMF-接入基站状态信息新增
* @param neId 网元ID
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object
*/
export function addAMFNbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'POST',
data: {
neType: 'AMF',
neId: neId,
paramName: 'gnbList',
paramData: data,
loc: `${data.index}`,
},
});
}
/**
* AMF-接入基站状态信息修改
* @param neId 网元ID
* @param data 数据 { "index": 1, "name": "Gnb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object
*/
export function editAMFNbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'PUT',
data: {
neType: 'AMF',
neId: neId,
paramName: 'gnbList',
paramData: data,
loc: `${data.index}`,
},
});
}
/**
* AMF-接入基站状态信息删除
* @param neId 网元ID
* @param index 数据index
* @returns object
*/
export function delAMFNbState(neId: string, index: string | number) {
return request({
url: `/ne/config/data`,
method: 'DELETE',
params: {
neType: 'AMF',
neId: neId,
paramName: 'gnbList',
loc: `${index}`,
},
});
}
-68
View File
@@ -1,68 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 备份文件-获取FTP配置
* @returns object
*/
export function getBackupFTP() {
return request({
url: '/neData/backup/ftp',
method: 'GET',
});
}
/**
* 备份文件-文件FTP发送
* @param data 对象
* @returns object
*/
export function pushBackupFTP(data: Record<string, any>) {
return request({
url: '/neData/backup/ftp',
method: 'POST',
data,
});
}
/**
* 备份文件-更新FTP配置
* @param data 对象
* @returns object
*/
export function updateBackupFTP(data: Record<string, any>) {
return request({
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 -34
View File
@@ -8,9 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function listIMSDataCDR(query: Record<string, any>) {
return request({
url: '/neData/ims/cdr/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
}
@@ -22,48 +21,22 @@ export function listIMSDataCDR(query: Record<string, any>) {
export function delIMSDataCDR(cdrIds: string | number) {
return request({
url: `/neData/ims/cdr/${cdrIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
/**
* IMS-CDR会话列表导出
* @param query 查询列表条件
* @param data 查询列表条件
* @returns object
*/
export function exportIMSDataCDR(query: Record<string, any>) {
export function exportIMSDataCDR(data: Record<string, any>) {
return request({
url: '/neData/ims/cdr/export',
method: 'GET',
params: query,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* SMF-在线订阅用户数量
* @param query 查询参数
* @returns object
*/
export function listIMSSessionNum(neId: string) {
return request({
url: '/neData/ims/session/num',
method: 'GET',
params: { neId },
});
}
/**
* IMS-在线会话用户列表信息
* @param query 查询参数 {neId, imsi, msisdn}
* @returns objectv
*/
export function listIMSSessionList(query: Record<string, any>) {
return request({
url: '/neData/ims/session/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
+6 -94
View File
@@ -8,9 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function listMMEDataUE(query: Record<string, any>) {
return request({
url: '/neData/mme/ue/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
}
@@ -22,109 +21,22 @@ export function listMMEDataUE(query: Record<string, any>) {
export function delMMEDataUE(ueIds: string | number) {
return request({
url: `/neData/mme/ue/${ueIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
/**
* MME-UE会话列表导出
* @param query 查询列表条件
* @param data 查询列表条件
* @returns object
*/
export function exportMMEDataUE(query: Record<string, any>) {
export function exportMMEDataUE(data: Record<string, any>) {
return request({
url: '/neData/mme/ue/export',
method: 'GET',
params: query,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* MME-接入基站信息列表
* @param query 查询参数 neId=001&id=1
* @returns object
*/
export function listMMENblist(query: Record<string, any>) {
return request({
url: '/neData/mme/nb/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* MME-接入基站状态信息列表
* @param query 查询参数 neId=001&state=1
* @returns object
*/
export function listMMENbStatelist(query: Record<string, any>) {
return request({
url: '/neData/mme/nb/list-cfg',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* MME-接入基站状态信息新增
* @param neId 网元ID
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object
*/
export function addMMENbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'POST',
data: {
neType: 'MME',
neId: neId,
paramName: 'enbList',
paramData: data,
loc: `${data.index}`,
},
});
}
/**
* MME-接入基站状态信息修改
* @param neId 网元ID
* @param data 数据 { "index": 1, "name": "Enb", "address": "192.168.8.1", "position": "Area-B" }
* @returns object
*/
export function editMMENbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'PUT',
data: {
neType: 'MME',
neId: neId,
paramName: 'enbList',
paramData: data,
loc: `${data.index}`,
},
});
}
/**
* MME-接入基站状态信息删除
* @param neId 网元ID
* @param index 数据index
* @returns object
*/
export function delMMENbState(neId: string, index: string | number) {
return request({
url: `/ne/config/data`,
method: 'DELETE',
params: {
neType: 'MME',
neId: neId,
paramName: 'enbList',
loc: `${index}`,
},
});
}
-30
View File
@@ -1,30 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 历史记录列表
* @param query 查询参数
* @returns object
*/
export function listNBState(query: Record<string, any>) {
return request({
url: '/neData/nb-state/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* 历史记录列表导出
* @param query 查询列表条件
* @returns object
*/
export function exportNBState(query: Record<string, any>) {
return request({
url: '/neData/nb-state/export',
method: 'GET',
params: query,
responseType: 'blob',
timeout: 180_000,
});
}
-82
View File
@@ -1,82 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* PCF-策略配置列表
* @param query 查询参数
* @returns object
*/
export function listPCFRule(query: Record<string, any>) {
return request({
url: '/neData/pcf/rule/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* PCF-策略配置添加
* @param data 参数
* @returns object
*/
export function addPCFRule(data: Record<string, any>) {
return request({
url: `/neData/pcf/rule`,
method: 'POST',
data,
});
}
/**
* PCF-策略配置更新
* @param data 参数
* @returns object
*/
export function editPCFRule(data: Record<string, any>) {
return request({
url: `/neData/pcf/rule`,
method: 'PUT',
data,
});
}
/**
* PCF-策略配置删除
*@param data 参数
* @returns object
*/
export function delPCFRule(data: Record<string, any>) {
return request({
url: `/neData/pcf/rule`,
method: 'DELETE',
params: data,
});
}
/**
* PCF-策略配置导出
* @param data 参数{ neId, fileType }
* @returns object
*/
export function exportPCFRule(data: Record<string, any>) {
return request({
url: '/neData/pcf/rule/export',
method: 'GET',
params: data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* PCF-策略配置导入
* @param data 参数
* @returns object
*/
export function importPCFRule(data: Record<string, any>) {
return request({
url: '/neData/pcf/rule/import',
method: 'PUT',
data,
});
}
-43
View File
@@ -1,43 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询SGWC-CDR会话事件
* @param query 查询参数
* @returns object
*/
export function listSGWCDataCDR(query: Record<string, any>) {
return request({
url: '/neData/sgwc/cdr/list',
method: 'GET',
params: query,
timeout: 60_000,
});
}
/**
* SGWC-CDR会话删除
* @param id 信息ID
* @returns object
*/
export function delSGWCDataCDR(cdrIds: string | number) {
return request({
url: `/neData/sgwc/cdr/${cdrIds}`,
method: 'DELETE',
timeout: 60_000,
});
}
/**
* SGWC-CDR会话列表导出
* @param query 查询列表条件
* @returns object
*/
export function exportSGWCDataCDR(query: Record<string, any>) {
return request({
url: '/neData/sgwc/cdr/export',
method: 'GET',
params: query,
responseType: 'blob',
timeout: 180_000,
});
}
+11 -25
View File
@@ -8,9 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function listSMFDataCDR(query: Record<string, any>) {
return request({
url: '/neData/smf/cdr/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
}
@@ -22,48 +21,35 @@ export function listSMFDataCDR(query: Record<string, any>) {
export function delSMFDataCDR(cdrIds: string | number) {
return request({
url: `/neData/smf/cdr/${cdrIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
/**
* SMF-CDR会话列表导出
* @param query 查询列表条件
* @param data 查询列表条件
* @returns object
*/
export function exportSMFDataCDR(query: Record<string, any>) {
export function exportSMFDataCDR(data: Record<string, any>) {
return request({
url: '/neData/smf/cdr/export',
method: 'GET',
params: query,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* SMF-在线订阅用户数量
* @param query 查询参数
* @returns object
*/
export function listSMFSubNum(neId: string) {
return request({
url: '/neData/smf/sub/num',
method: 'GET',
params: { neId },
timeout: 60_000,
});
}
/**
* SMF-在线订阅用户列表信息
* @param query 查询参数 {neId, pageNum, imsi, msisdn, upstate}
* @param query 查询参数
* @returns object
*/
export function listSMFSubList(query: Record<string, any>) {
export function listSMFSubscribers(query: Record<string, any>) {
return request({
url: '/neData/smf/sub/list',
method: 'GET',
url: '/neData/smf/subscribers',
method: 'get',
params: query,
});
}
+7 -8
View File
@@ -8,9 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function listSMSCDataCDR(query: Record<string, any>) {
return request({
url: '/neData/smsc/cdr/list',
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
}
@@ -22,22 +21,22 @@ export function listSMSCDataCDR(query: Record<string, any>) {
export function delSMSCDataCDR(cdrIds: string | number) {
return request({
url: `/neData/smsc/cdr/${cdrIds}`,
method: 'DELETE',
method: 'delete',
timeout: 60_000,
});
}
/**
* SMSC-CDR会话列表导出
* @param query 查询列表条件
* @param data 查询列表条件
* @returns object
*/
export function exportSMSCDataCDR(query: Record<string, any>) {
export function exportSMSCDataCDR(data: Record<string, any>) {
return request({
url: '/neData/smsc/cdr/export',
method: 'GET',
params: query,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
timeout: 60_000,
});
}
+11 -25
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function resetUDMAuth(neId: string) {
return request({
url: `/neData/udm/auth/resetData/${neId}`,
method: 'PUT',
method: 'put',
timeout: 180_000,
});
}
@@ -21,7 +21,7 @@ export function resetUDMAuth(neId: string) {
export function listUDMAuth(query: Record<string, any>) {
return request({
url: '/neData/udm/auth/list',
method: 'GET',
method: 'get',
params: query,
timeout: 30_000,
});
@@ -36,7 +36,7 @@ export function listUDMAuth(query: Record<string, any>) {
export function getUDMAuth(neId: string, imsi: string) {
return request({
url: `/neData/udm/auth/${neId}/${imsi}`,
method: 'GET',
method: 'get',
});
}
@@ -48,7 +48,7 @@ export function getUDMAuth(neId: string, imsi: string) {
export function addUDMAuth(data: Record<string, any>) {
return request({
url: `/neData/udm/auth/${data.neId}`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
@@ -63,7 +63,7 @@ export function addUDMAuth(data: Record<string, any>) {
export function batchAddUDMAuth(data: Record<string, any>, num: number) {
return request({
url: `/neData/udm/auth/${data.neId}/${num}`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
@@ -77,7 +77,7 @@ export function batchAddUDMAuth(data: Record<string, any>, num: number) {
export function updateUDMAuth(data: Record<string, any>) {
return request({
url: `/neData/udm/auth/${data.neId}`,
method: 'PUT',
method: 'put',
data: data,
timeout: 180_000,
});
@@ -92,7 +92,7 @@ export function updateUDMAuth(data: Record<string, any>) {
export function delUDMAuth(neId: string, imsi: string) {
return request({
url: `/neData/udm/auth/${neId}/${imsi}`,
method: 'DELETE',
method: 'delete',
timeout: 180_000,
});
}
@@ -107,7 +107,7 @@ export function delUDMAuth(neId: string, imsi: string) {
export function batchDelUDMAuth(neId: string, imsi: string, num: number) {
return request({
url: `/neData/udm/auth/${neId}/${imsi}/${num}`,
method: 'DELETE',
method: 'delete',
timeout: 180_000,
});
}
@@ -120,7 +120,7 @@ export function batchDelUDMAuth(neId: string, imsi: string, num: number) {
export function importUDMAuth(data: Record<string, any>) {
return request({
url: `/neData/udm/auth/import`,
method: 'POST',
method: 'post',
data,
timeout: 180_000,
});
@@ -134,22 +134,8 @@ export function importUDMAuth(data: Record<string, any>) {
export function exportUDMAuth(data: Record<string, any>) {
return request({
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',
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
+11 -11
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function resetUDMSub(neId: string) {
return request({
url: `/neData/udm/sub/resetData/${neId}`,
method: 'PUT',
method: 'put',
timeout: 180_000,
});
}
@@ -21,7 +21,7 @@ export function resetUDMSub(neId: string) {
export function listUDMSub(query: Record<string, any>) {
return request({
url: '/neData/udm/sub/list',
method: 'GET',
method: 'get',
params: query,
timeout: 30_000,
});
@@ -36,7 +36,7 @@ export function listUDMSub(query: Record<string, any>) {
export function getUDMSub(neId: string, imsi: string) {
return request({
url: `/neData/udm/sub/${neId}/${imsi}`,
method: 'GET',
method: 'get',
});
}
@@ -48,7 +48,7 @@ export function getUDMSub(neId: string, imsi: string) {
export function addUDMSub(data: Record<string, any>) {
return request({
url: `/neData/udm/sub/${data.neId}`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
@@ -63,7 +63,7 @@ export function addUDMSub(data: Record<string, any>) {
export function batchAddUDMSub(data: Record<string, any>, num: number) {
return request({
url: `/neData/udm/sub/${data.neId}/${num}`,
method: 'POST',
method: 'post',
data: data,
timeout: 180_000,
});
@@ -77,7 +77,7 @@ export function batchAddUDMSub(data: Record<string, any>, num: number) {
export function updateUDMSub(data: Record<string, any>) {
return request({
url: `/neData/udm/sub/${data.neId}`,
method: 'PUT',
method: 'put',
data: data,
timeout: 180_000,
});
@@ -91,7 +91,7 @@ export function updateUDMSub(data: Record<string, any>) {
export function delUDMSub(neId: string, imsi: string) {
return request({
url: `/neData/udm/sub/${neId}/${imsi}`,
method: 'DELETE',
method: 'delete',
timeout: 180_000,
});
}
@@ -106,7 +106,7 @@ export function delUDMSub(neId: string, imsi: string) {
export function batchDelUDMSub(neId: string, imsi: string, num: number) {
return request({
url: `/neData/udm/sub/${neId}/${imsi}/${num}`,
method: 'DELETE',
method: 'delete',
timeout: 180_000,
});
}
@@ -119,8 +119,8 @@ export function batchDelUDMSub(neId: string, imsi: string, num: number) {
export function exportUDMSub(data: Record<string, any>) {
return request({
url: '/neData/udm/sub/export',
method: 'GET',
params: data,
method: 'post',
data,
responseType: 'blob',
timeout: 180_000,
});
@@ -134,7 +134,7 @@ export function exportUDMSub(data: Record<string, any>) {
export function importUDMSub(data: Record<string, any>) {
return request({
url: `/neData/udm/sub/import`,
method: 'POST',
method: 'post',
data,
timeout: 180_000,
});
-134
View File
@@ -1,134 +0,0 @@
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,
});
}
-137
View File
@@ -1,137 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* UDMVolteIMS用户重载数据
* @param neId 网元ID
* @returns object
*/
export function resetUDMVolteIMS(neId: string) {
return request({
url: `/neData/udm/volte-ims/resetData/${neId}`,
method: 'PUT',
timeout: 180_000,
});
}
/**
* UDMVolteIMS用户列表
* @param query 查询参数
* @returns object
*/
export function listUDMVolteIMS(query: Record<string, any>) {
return request({
url: '/neData/udm/volte-ims/list',
method: 'GET',
params: query,
timeout: 30_000,
});
}
/**
* UDMVolteIMS用户信息
* @param neId 网元ID
* @param imsi IMSI
* @returns object
*/
export function getUDMVolteIMS(neId: string, imsi: string) {
return request({
url: `/neData/udm/volte-ims/${neId}/${imsi}`,
method: 'GET',
});
}
/**
* UDMVolteIMS用户新增
* @param data 签约对象
* @returns object
*/
export function addUDMVolteIMS(data: Record<string, any>) {
return request({
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',
data: data,
timeout: 180_000,
});
}
/**
* UDMVolteIMS用户删除
* @param neId 网元ID
* @param imsi_msisdn IMSI/MSISDN
* @param tag 标签 0-voip 1-volte
* @returns object
*/
export function delUDMVolteIMS(neId: string, imsi_msisdn: string, tag: string) {
return request({
url: `/neData/udm/volte-ims/${neId}/${imsi_msisdn}`,
method: 'DELETE',
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,
});
}
/**
* UDMVolteIMS用户导出
* @param data 数据参数
* @returns bolb
*/
export function exportUDMVolteIMS(data: Record<string, any>) {
return request({
url: '/neData/udm/volte-ims/export',
method: 'GET',
params: data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* UDMVolteIMS用户导入
* @param data 表单数据对象
* @returns object
*/
export function importUDMVolteIMS(data: Record<string, any>) {
return request({
url: `/neData/udm/volte-ims/import`,
method: 'POST',
data,
timeout: 180_000,
});
}
+34
View File
@@ -0,0 +1,34 @@
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 listBase5G(query: Record<string, any>) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/${query.neType.toLowerCase()}/objectType/nbInfo`,
method: 'get',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
// 模拟数据
// data.rows = [{"address":"192.168.1.137:38412","id":"217","name":"attach-enb-100000-20","ueNum":0}]
// data.rows = [{address: "192.168.8.223", id: 257, name: "SmallCell", ueNum: 0}]
return data;
}
+66
View File
@@ -0,0 +1,66 @@
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 listUEInfoByIMS(query: Record<string, any>) {
query.nbId = query.id;
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/ims/objectType/ueInfo',
method: 'get',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
// 测试数据
// data.rows = [
// {
// activeTime: '2023-11-29 17:04:54',
// barring: 0,
// impu: 'sip:12307551232@ims.mnc000.mcc460.3gppnetwork.org',
// imsi: '460001230000002',
// msisdn: '12307551232',
// regState: 1,
// },
// ];
return data;
}
/**
* 首页查询IMS在线用户数
* @param query 查询参数
* @returns neId
*/
export async function listUENumByIMS(neId: String) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/ims/objectType/ueNum?neId=${neId}`,
method: 'get',
});
if (result.code === RESULT_CODE_SUCCESS) {
let num = result.data['ueNum'] || 0;
if (num === 0) {
num = result.data.data['ueNum'] || 0;
}
return Object.assign(result, { data: num });
}
// 模拟数据
// { "ueNum": 0 }
// result.data = 0
return result;
}
+29 -6
View File
@@ -3,14 +3,37 @@ import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* N3IWF-在线订阅用户列表信息
* @param query 查询参数 {imsi}
* 查询列表
* @param query 查询参数
* @returns object
*/
export function listN3IWFSubList(query: Record<string, any>) {
return request({
url: '/neData/n3iwf/sub/list',
method: 'GET',
export async function listN3iwf(query: Record<string, any>) {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/n3iwf/objectType/ueInfo',
method: 'get',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
// 模拟数据
// data.rows = [
// {
// "activeTime": "2023-11-29 06:35:43",
// "imsi": "460302072701181",
// "nai": "0460302072701181@nai.epc.mnc030.mcc460.3gppnetwork.org",
// "regState": 1
// }
// ]
return data;
}
+18 -17
View File
@@ -3,24 +3,25 @@ import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* NSSF-在线订阅用户列表信息
* @param query 查询参数 {imsi}
* 查询列表
* @returns object
*/
export function listNSSFSubList() {
return request({
url: '/neData/nssf/sub/list',
method: 'GET',
});
}
/**
* NSSF-可用AMF列表信息
* @returns object
*/
export function listNSSFAmfList() {
return request({
url: '/neData/nssf/amf/list',
method: 'GET',
export async function listNSSF() {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/subscriptions',
method: 'get',
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
return data;
}
+44
View File
@@ -0,0 +1,44 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 查询列表
* @returns object
*/
export async function listNSSFAMF() {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/availableAMFs',
method: 'get',
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
// let testData = {
// total:0,
// rows: [
// {
// nfId: '001',
// amfSetId: '001',
// },
// {
// nfId: '002',
// amfSetId: '[001,002]',
// },
// ],
// code: 1,
// msg:'',
// };
//return testData;
return data;
}
+234
View File
@@ -0,0 +1,234 @@
import {
RESULT_CODE_ERROR,
RESULT_CODE_SUCCESS,
} from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* 规则导出
* @param data 表单数据对象
* @returns bolb
*/
export function exportRule(data: Record<string, any>) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/export`,
method: 'get',
params: data,
responseType: 'blob',
timeout: 180_000,
});
}
/**
* 导入规则数据
* @param data 表单数据对象
* @returns object
*/
export function importRuleData(data: Record<string, any>) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/import?neId=${data.neId}&filePath=${data.filePath}&fileType=${data.fileType}`,
method: 'put',
data,
timeout: 60_000,
});
}
/**
* 查询规则列表
* @param query 查询参数
* @returns object
*/
export async function listRules(query: Record<string, any>) {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo',
method: 'get',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
if (result.data?.status) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
rows: result.data,
};
}
if (Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
}
}
// 模拟数据
// data.rows = [
// {
// "hdrEnrich": "dnn",
// "imsi": "160990100000003",
// "msisdn": "86755900011",
// "pccRules": "internet|ims_sig",
// "qosAudio": "qos_audio",
// "qosVideo": "qos_video",
// "rfsp": 0,
// "sar": "def_sar",
// "sessRules": "internet|ims_sig",
// "uePolicy": "uep_001"
// }
// ]
return data;
}
/**
* 查询规则详细
* @param neId 网元ID
* @returns object
*/
export async function getRule(neId: string, imsi: string) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`,
method: 'get',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
result.data = result.data.data[0];
}
return result;
}
/**
* 修改规则
* @param data 规则对象
* @returns object
*/
export async function updateRule(data: Record<string, any>) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`,
method: 'put',
data: data,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
data: result.data,
};
}
return result;
}
/**
* 批量修改规则
* @param data 规则对象
* @returns object
*/
export async function batchUpdateRule(data: Record<string, any>) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
method: 'put',
data: data,
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
if (result.data?.status) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
data: result.data,
};
}
if (result.data?.data) {
result.data = result.data.data;
return result;
}
}
return result;
}
/**
* 新增规则
* @param data 规则对象
* @returns object
*/
export async function addRule(data: Record<string, any>) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${data.neId}`,
method: 'post',
data: data,
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data?.status) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
data: result.data,
};
}
return result;
}
/**
* 批量新增规则
* @param data 规则对象
* @returns object
*/
export async function batchAddRule(data: Record<string, any>) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}`,
method: 'post',
data: data,
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
if (result.data?.status) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
data: result.data,
};
}
if (result.data?.data) {
result.data = result.data.data;
return result;
}
}
return result;
}
/**
* 删除规则
* @param data 规则对象
* @returns object
*/
export function delRule(neId: string, imsi: string) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`,
method: 'delete',
timeout: 60_000,
});
}
/**
* 批量删除规则
* @param data 规则对象
* @returns object
*/
export async function batchDelRule(data: Record<string, any>) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/batch/${data.num}?neId=${data.neId}&imsi=${data.imsi}`,
method: 'delete',
timeout: 60_000,
});
}
+111
View File
@@ -0,0 +1,111 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
/**
* 查询列表
* @param query 查询参数
* @returns object
*/
export async function listUEInfoBySMF(query: Record<string, any>) {
query.nbId = query.id;
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/smf/objectType/ueInfo',
method: 'get',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data) {
if (Array.isArray(result.data.data)) {
const rows = result.data.data;
data.total = rows.length;
data.rows = rows;
} else {
Object.assign(data, result.data);
}
}
// 模拟数据
// data.code = RESULT_CODE_SUCCESS;
// data.total = 2;
// data.rows = [
// {
// imsi: 'imsi-460000100000090',
// msisdn: 'msisdn-12307550090',
// pduSessionInfo: [
// {
// activeTime: '2024-06-19 14:35:26',
// dnn: 'ims',
// ipv4: '10.10.48.8',
// ipv6: '',
// pduSessionID: 6,
// ranN3IP: '192.168.1.137',
// sstSD: '1-000001',
// tai: '46000-001124',
// upState: 'Active',
// upfN3IP: '192.168.1.161',
// },
// {
// activeTime: '2024-06-19 14:35:26',
// dnn: 'cmnet',
// ipv4: '10.10.48.9',
// ipv6: '2001:4860:4860::/64',
// pduSessionID: 7,
// ranN3IP: '192.168.1.137',
// sstSD: '1-000001',
// tai: '46000-001124',
// upState: 'Active',
// upfN3IP: '192.168.1.161',
// },
// ],
// ratType: 'NR',
// },
// {
// imsi: 'imsi-460602072701180',
// msisdn: 'msisdn-123460600080',
// pduSessionInfo: [
// {
// activeTime: '2024-06-19 14:31:09',
// dnn: 'cmnet',
// ipv4: '10.10.48.4',
// ipv6: '',
// pduSessionID: 5,
// ranN3IP: '192.168.8.223',
// sstSD: '1-000001',
// tai: '46060-0001',
// upState: 'Active',
// upfN3IP: '192.168.1.161',
// },
// ],
// ratType: 'EUTRAN',
// },
// ];
return data;
}
/**
* 首页查询SMF在线用户数
* @param query 查询参数
* @returns neId
*/
export async function listUENumBySMF(neId: String) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/smf/objectType/ueNum?neId=${neId}`,
method: 'get',
});
if (result.code === RESULT_CODE_SUCCESS) {
return Object.assign(result, {
data: result.data.data['ueNum'],
});
}
// 模拟数据
// { "data": { "ueNum": 0 } }
// result.data = 0
return result;
}
+5 -3
View File
@@ -1,4 +1,7 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
import { parseDateToStr } from '@/utils/date-utils';
/**
* 新 查询自定义指标数据
@@ -8,10 +11,9 @@ import { request } from '@/plugins/http-fetch';
export async function listCustomData(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/neData/kpic/data`,
method: 'GET',
url: `/pm/kpiC/report`,
method: 'get',
params: query,
timeout: 60_000,
});
return result;
}
+85 -9
View File
@@ -1,16 +1,92 @@
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
import { parseDateToStr } from '@/utils/date-utils';
/**
* 查询自定义指标
* @param query 查询参数
* @returns object
*/
// export async function listCustom(query: Record<string, any>) {
// let totalSQL = 'select count(*) as total from pm_custom_title where 1=1 ';
// let rowsSQL = 'select * from pm_custom_title where 1=1 ';
// // 查询
// let querySQL = '';
// if (query.neType) {
// querySQL += ` and ne_type like '%${query.neType}%' `;
// }
// // 排序
// let sortSql = ' order by update_time ';
// if (query.sortOrder === 'asc') {
// sortSql += ' asc ';
// } else {
// sortSql += ' desc ';
// }
// // 分页
// const pageNum = (query.pageNum - 1) * query.pageSize;
// const limtSql = ` limit ${pageNum},${query.pageSize} `;
// // 发起请求
// const result = await request({
// url: `/api/rest/databaseManagement/v1/select/omc_db/pm_custom_title`,
// method: 'get',
// params: {
// totalSQL: totalSQL + querySQL,
// rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
// },
// });
// // 解析数据
// if (result.code === RESULT_CODE_SUCCESS) {
// const data: DataList = {
// total: 0,
// rows: [],
// code: result.code,
// msg: result.msg,
// };
// result.data.data.forEach((item: any) => {
// const itemData = item['pm_custom_title'];
// if (Array.isArray(itemData)) {
// if (itemData.length === 1 && itemData[0]['total'] >= 0) {
// data.total = itemData[0]['total'];
// } else {
// data.rows = itemData.map(v => parseObjLineToHump(v));
// }
// }
// });
// return data;
// }
// return result;
// }
/**
* 新 查询自定义指标
* @param query 查询参数
* @returns object
*/
export async function listCustom(query?: Record<string, any>) {
return await request({
url: `/neData/kpic/title/list`,
method: 'GET',
// 发起请求
const result = await request({
url: `/pm/kpiC/title/totalList`,
method: 'get',
params: query,
});
return result;
}
/**
* 查询自定义指标详细
* @param id 网元ID
* @returns object
*/
export async function getCustom(id: string | number) {
return request({
url: `/pm/kpiC/title/${id}`,
method: 'get',
});
}
/**
@@ -20,8 +96,8 @@ export async function listCustom(query?: Record<string, any>) {
*/
export function addCustom(data: Record<string, any>) {
return request({
url: `/neData/kpic/title`,
method: 'POST',
url: `/pm/kpiC/title`,
method: 'post',
data: data,
});
}
@@ -33,8 +109,8 @@ export function addCustom(data: Record<string, any>) {
*/
export function updateCustom(data: Record<string, any>) {
return request({
url: `/neData/kpic/title`,
method: 'PUT',
url: `/pm/kpiC/title/${data.id}`,
method: 'put',
data: data,
});
}
@@ -45,7 +121,7 @@ export function updateCustom(data: Record<string, any>) {
*/
export async function delCustom(data: Record<string, any>) {
return request({
url: `/neData/kpic/title?id=${data.id}`,
method: 'DELETE',
url: `/pm/kpiC/title/${data.id}`,
method: 'delete',
});
}
+151 -24
View File
@@ -2,6 +2,81 @@ import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { request } from '@/plugins/http-fetch';
import { parseObjLineToHump } from '@/utils/parse-utils';
/**
* Todo 废弃
* 查询黄金指标数据
* @param query 查询参数
* @returns object
*/
export async function listgoldData(query: Record<string, any>) {
let totalSQL = 'select count(*) as total from gold_kpi where 1=1 ';
let rowsSQL =
'SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 ';
// 查询
let querySQL = '';
if (query.neType) {
querySQL += ` and gold_kpi.ne_type like '%${query.neType}%' `;
}
if (query.beginTime) {
querySQL += ` and start_time >= '${query.beginTime}' `;
}
if (query.endTime) {
querySQL += ` and end_time <= '${query.endTime}' `;
}
// 排序
let sortSql = ' order by ';
if (query.sortField) {
sortSql += ` ${query.sortField} `;
} else {
sortSql += ` start_time `;
}
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
sortSql += ' desc ';
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
},
timeout: 60_000,
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
result.data.data.forEach((item: any) => {
const itemData = item['gold_kpi'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
return data;
}
return result;
}
/**
* 查询黄金指标数据
* @param query 查询参数
@@ -10,7 +85,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export async function listKPIData(query: Record<string, any>) {
const result = await request({
url: `/neData/kpi/data`,
method: 'GET',
method: 'get',
params: query,
timeout: 60_000,
});
@@ -27,34 +102,86 @@ export async function getKPITitle(neType: string) {
// 发起请求
const result = await request({
url: `/neData/kpi/title`,
method: 'GET',
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,
/**
* Todo 废弃
* 查询UPF上下行速率数据
* @param query 查询参数
* @returns object
*/
export async function listUPFData(timeArr: any) {
const initTime: Date = new Date();
const twentyFourHoursAgo: Date = new Date(
initTime.getTime() - 10 * 60 * 1000
);
return await Promise.allSettled([
// 获取参数规则
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
params: {
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
},
timeout: 60_000,
}),
// 获取对应信息
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
params: {
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
},
timeout: 60_000,
}),
]).then(resArr => {
let upData: any = [];
let downData: any = [];
// 规则数据
if (resArr[0].status === 'fulfilled') {
const itemV: any = resArr[0].value;
// 解析数据
if (
itemV.code === RESULT_CODE_SUCCESS &&
Array.isArray(itemV.data?.data)
) {
let itemData = itemV.data.data;
let data = itemData[0]['gold_kpi'];
if (Array.isArray(data)) {
try {
upData = data.map(v => parseObjLineToHump(v));
} catch (error) {
console.error(error);
}
}
}
}
if (resArr[1].status === 'fulfilled') {
const itemV = resArr[1].value;
// 解析数据
if (
itemV.code === RESULT_CODE_SUCCESS &&
Array.isArray(itemV.data?.data)
) {
let itemData = itemV.data.data;
const data = itemData[0]['gold_kpi'];
if (Array.isArray(data)) {
try {
downData = data.map(v => parseObjLineToHump(v));
} catch (error) {
console.error(error);
}
}
}
}
return { upData, downData };
});
}
-51
View File
@@ -1,51 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询统计指标
* @param query 查询参数
* @returns object
*/
export async function listKPITitle(query?: Record<string, any>) {
return await request({
url: `/neData/kpi/title/list`,
method: 'GET',
params: query,
});
}
/**
* 新增统计指标
* @param data 网元对象
* @returns object
*/
export function addKPITitle(data: Record<string, any>) {
return request({
url: `/neData/kpi/title`,
method: 'POST',
data: data,
});
}
/**
* 修改统计指标
* @param data 网元对象
* @returns object
*/
export function updateKPITitle(data: Record<string, any>) {
return request({
url: `/neData/kpi/title`,
method: 'PUT',
data: data,
});
}
/**
* 删除统计指标
* @returns object
*/
export async function delKPITitle(id: string) {
return request({
url: `/neData/kpi/title?id=${id}`,
method: 'DELETE',
});
}
+8 -7
View File
@@ -30,10 +30,10 @@ export async function listperfData(query: Record<string, any>) {
let sortSql = ' order by ';
if (query.sortField) {
sortSql += ` ${query.sortField} `;
} else {
}else{
sortSql += ` start_time `;
}
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
@@ -47,7 +47,7 @@ export async function listperfData(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_data`,
method: 'GET',
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -56,8 +56,9 @@ export async function listperfData(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data = {
data: { total: 0, rows: [] as any },
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
@@ -65,9 +66,9 @@ export async function listperfData(query: Record<string, any>) {
const itemData = item['measure_data'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.data.total = itemData[0]['total'];
data.total = itemData[0]['total'];
} else {
data.data.rows = itemData.map(v => parseObjLineToHump(v));
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
+13 -12
View File
@@ -32,7 +32,7 @@ export async function listPerfThreshold(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_threshold`,
method: 'GET',
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -41,8 +41,9 @@ export async function listPerfThreshold(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data = {
data: { total: 0, rows: [] as any },
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
@@ -50,9 +51,9 @@ export async function listPerfThreshold(query: Record<string, any>) {
const itemData = item['measure_threshold'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.data.total = itemData[0]['total'];
data.total = itemData[0]['total'];
} else {
data.data.rows = itemData.map(v => parseObjLineToHump(v));
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -70,7 +71,7 @@ export async function getPerfThre(id: string | number) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_threshold`,
method: 'GET',
method: 'get',
params: {
SQL: `select * from measure_threshold where id = ${id}`,
},
@@ -101,7 +102,7 @@ export function addPerfThre(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold`,
method: 'POST',
method: 'post',
data: { measure_threshold: [obj] },
});
}
@@ -121,7 +122,7 @@ export function updatePerfThre(data: Record<string, any>) {
};
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
method: 'PUT',
method: 'put',
data: { measure_threshold: obj },
});
}
@@ -134,7 +135,7 @@ export function updatePerfThre(data: Record<string, any>) {
export async function delPerfThre(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -146,7 +147,7 @@ export async function getNePerformanceList() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/measure_title`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM measure_title`,
},
@@ -169,7 +170,7 @@ export async function getNePerformanceList() {
export function threRun(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
method: 'PUT',
method: 'put',
data: { data: { status: 'Active' } },
});
}
@@ -182,7 +183,7 @@ export function threRun(data: Record<string, any>) {
export function threStop(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_threshold?WHERE=id=${data.id}`,
method: 'PUT',
method: 'put',
data: { data: { status: 'Inactive' } },
});
}
+13 -12
View File
@@ -32,7 +32,7 @@ export async function listPerfTask(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_task`,
method: 'GET',
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql+ limtSql,
@@ -41,8 +41,9 @@ export async function listPerfTask(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data = {
data: { total: 0, rows: [] as any },
const data: DataList = {
total: 0,
rows: [],
code: result.code,
msg: result.msg,
};
@@ -50,9 +51,9 @@ export async function listPerfTask(query: Record<string, any>) {
const itemData = item['measure_task'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.data.total = itemData[0]['total'];
data.total = itemData[0]['total'];
} else {
data.data.rows = itemData.map(v => parseObjLineToHump(v));
data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -70,7 +71,7 @@ export async function getPerfTask(id: string | number) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/measure_task`,
method: 'GET',
method: 'get',
params: {
SQL: `select * from measure_task where id = ${id}`,
},
@@ -119,7 +120,7 @@ export function addPerfTask(data: Record<string, any>) {
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_task`,
method: 'POST',
method: 'post',
data: { measure_task: [obj] },
});
}
@@ -157,7 +158,7 @@ export function updatePerfTask(data: Record<string, any>) {
};
return request({
url: `/api/rest/databaseManagement/v1/omc_db/measure_task?WHERE=id=${data.id}`,
method: 'PUT',
method: 'put',
data: { measure_task: obj },
});
}
@@ -172,7 +173,7 @@ export async function delPerfTask(data: Record<string, any>) {
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${
data.id
}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -184,7 +185,7 @@ export async function getNePerformanceList() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/measure_title`,
method: 'GET',
method: 'get',
params: {
SQL: `SELECT * FROM measure_title`,
},
@@ -208,7 +209,7 @@ export async function getNePerformanceList() {
export function taskRun(data: Record<string, any>) {
return request({
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${data.id}`,
method: 'POST',
method: 'post',
});
}
@@ -220,6 +221,6 @@ export function taskRun(data: Record<string, any>) {
export function taskStop(data: Record<string, any>) {
return request({
url: `/api/rest/performanceManagement/v1/elementType/${data.neType.toLowerCase()}/objectType/measureTask?id=${data.id}`,
method: 'PUT',
method: 'PATCH',
});
}
+26 -9
View File
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'GET',
method: 'get',
});
}
@@ -19,21 +19,38 @@ export function getUserProfile() {
export function updateUserProfile(data: Record<string, any>) {
return request({
url: '/system/user/profile',
method: 'PUT',
method: 'put',
data: data,
});
}
/**
* 用户个人密码重置
* @param oldPassword 旧密码
* @param newPassword 新密码
* 用户密码重置
* @param userId 用户ID
* @param status 变更状态值
* @returns object
*/
export function updateUserPassword(oldPassword: string, newPassword: string) {
export function updateUserPwd(oldPassword: string, newPassword: string) {
return request({
url: '/system/user/profile/password',
method: 'PUT',
data: { oldPassword, newPassword },
url: '/system/user/profile/updatePwd',
method: 'put',
data: {
oldPassword,
newPassword,
},
});
}
/**
* 用户头像上传
* @param data 表单数据对象
* @returns object
*/
export function uploadAvatar(data: FormData) {
return request({
url: '/system/user/profile/avatar',
method: 'post',
data,
dataType: 'form-data',
});
}
+12
View File
@@ -0,0 +1,12 @@
import { request } from '@/plugins/http-fetch';
/**
* 获取路由
* @returns object
*/
export const getRouters = () => {
return request({
url: '/getRouters',
method: 'get',
});
};
+13 -13
View File
@@ -8,8 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function exportConfig(query: Record<string, any>) {
return request({
url: '/system/config/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -22,7 +22,7 @@ export function exportConfig(query: Record<string, any>) {
export function listConfig(query: Record<string, any>) {
return request({
url: '/system/config/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listConfig(query: Record<string, any>) {
export function getConfig(configId: string | number) {
return request({
url: `/system/config/${configId}`,
method: 'GET',
method: 'get',
});
}
@@ -46,8 +46,8 @@ export function getConfig(configId: string | number) {
*/
export function getConfigKey(configKey: string) {
return request({
url: `/system/config/config-key/${configKey}`,
method: 'GET',
url: `/system/config/configKey/${configKey}`,
method: 'get',
});
}
@@ -59,7 +59,7 @@ export function getConfigKey(configKey: string) {
export function addConfig(data: Record<string, any>) {
return request({
url: '/system/config',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -72,7 +72,7 @@ export function addConfig(data: Record<string, any>) {
export function updateConfig(data: Record<string, any>) {
return request({
url: '/system/config',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -85,7 +85,7 @@ export function updateConfig(data: Record<string, any>) {
export function delConfig(configId: string | number) {
return request({
url: `/system/config/${configId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -95,8 +95,8 @@ export function delConfig(configId: string | number) {
*/
export function refreshCache() {
return request({
url: '/system/config/refresh',
method: 'PUT',
url: '/system/config/refreshCache',
method: 'put',
});
}
@@ -107,8 +107,8 @@ export function refreshCache() {
*/
export function changeValue(data: Record<string, string>) {
return request({
url: '/system/config/change-value',
method: 'PUT',
url: '/system/config/changeValue',
method: 'put',
data: data,
});
}
+12 -12
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listDept(query: Record<string, any>) {
return request({
url: '/system/dept/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listDept(query: Record<string, any>) {
export function listDeptExcludeChild(deptId: string | number) {
return request({
url: `/system/dept/list/exclude/${deptId}`,
method: 'GET',
method: 'get',
});
}
@@ -33,7 +33,7 @@ export function listDeptExcludeChild(deptId: string | number) {
export function getDept(deptId: string | number) {
return request({
url: `/system/dept/${deptId}`,
method: 'GET',
method: 'get',
});
}
@@ -45,7 +45,7 @@ export function getDept(deptId: string | number) {
export function addDept(data: Record<string, any>) {
return request({
url: '/system/dept',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -58,7 +58,7 @@ export function addDept(data: Record<string, any>) {
export function updateDept(data: Record<string, any>) {
return request({
url: '/system/dept',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -71,7 +71,7 @@ export function updateDept(data: Record<string, any>) {
export function delDept(deptId: string | number) {
return request({
url: `/system/dept/${deptId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -79,10 +79,10 @@ export function delDept(deptId: string | number) {
* 查询部门下拉树结构
* @returns object
*/
export function deptTree() {
export function deptTreeSelect() {
return request({
url: '/system/dept/tree',
method: 'GET',
url: '/system/dept/treeSelect',
method: 'get',
});
}
@@ -91,9 +91,9 @@ export function deptTree() {
* @param roleId 角色ID
* @returns object
*/
export function deptTreeRole(roleId: string | number) {
export function roleDeptTreeSelect(roleId: string | number) {
return request({
url: `/system/dept/tree/role/${roleId}`,
method: 'GET',
url: `/system/dept/roleDeptTreeSelect/${roleId}`,
method: 'get',
});
}
+14 -14
View File
@@ -8,8 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function exportData(query: Record<string, any>) {
return request({
url: '/system/dict/data/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -22,20 +22,20 @@ export function exportData(query: Record<string, any>) {
export function listData(query: Record<string, any>) {
return request({
url: '/system/dict/data/list',
method: 'GET',
method: 'get',
params: query,
});
}
/**
* 查询字典数据详细
* @param id 字典代码值
* @param dictCode 字典代码值
* @returns object
*/
export function getData(id: string | number) {
export function getData(dictCode: string | number) {
return request({
url: `/system/dict/data/${id}`,
method: 'GET',
url: `/system/dict/data/${dictCode}`,
method: 'get',
});
}
@@ -47,7 +47,7 @@ export function getData(id: string | number) {
export function addData(data: Record<string, any>) {
return request({
url: '/system/dict/data',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -60,20 +60,20 @@ export function addData(data: Record<string, any>) {
export function updateData(data: Record<string, any>) {
return request({
url: '/system/dict/data',
method: 'PUT',
method: 'put',
data: data,
});
}
/**
* 删除字典数据
* @param id 字典代码值
* @param dictCode 字典代码值
* @returns object
*/
export function delData(id: string | number) {
export function delData(dictCode: string | number) {
return request({
url: `/system/dict/data/${id}`,
method: 'DELETE',
url: `/system/dict/data/${dictCode}`,
method: 'delete',
});
}
@@ -85,6 +85,6 @@ export function delData(id: string | number) {
export function getDictDataType(dictType: string) {
return request({
url: `/system/dict/data/type/${dictType}`,
method: 'GET',
method: 'get',
});
}
+15 -15
View File
@@ -8,8 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function exportType(query: Record<string, any>) {
return request({
url: '/system/dict/type/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -22,7 +22,7 @@ export function exportType(query: Record<string, any>) {
export function listType(query: Record<string, any>) {
return request({
url: '/system/dict/type/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listType(query: Record<string, any>) {
export function getType(dictId: string | number) {
return request({
url: `/system/dict/type/${dictId}`,
method: 'GET',
method: 'get',
});
}
@@ -47,7 +47,7 @@ export function getType(dictId: string | number) {
export function addType(data: Record<string, any>) {
return request({
url: '/system/dict/type',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -60,20 +60,20 @@ export function addType(data: Record<string, any>) {
export function updateType(data: Record<string, any>) {
return request({
url: '/system/dict/type',
method: 'PUT',
method: 'put',
data: data,
});
}
/**
* 删除字典类型
* @param id 字典代码值
* @param dictCode 字典代码值
* @returns object
*/
export function delType(id: string | number) {
export function delType(dictId: string | number) {
return request({
url: `/system/dict/type/${id}`,
method: 'DELETE',
url: `/system/dict/type/${dictId}`,
method: 'delete',
});
}
@@ -84,8 +84,8 @@ export function delType(id: string | number) {
*/
export function refreshCache() {
return request({
url: '/system/dict/type/refresh',
method: 'PUT',
url: '/system/dict/type/refreshCache',
method: 'put',
});
}
@@ -94,9 +94,9 @@ export function refreshCache() {
* @param data 字典数据对象
* @returns object
*/
export function getDictOption() {
export function getDictOptionselect() {
return request({
url: '/system/dict/type/options',
method: 'GET',
url: '/system/dict/type/getDictOptionselect',
method: 'get',
});
}
+6 -6
View File
@@ -10,8 +10,8 @@ export function exportSysLogLogin(
) {
return request({
url: '/system/log/login/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -26,7 +26,7 @@ export function listSysLogLogin(
) {
return request({
url: '/system/log/login/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -39,7 +39,7 @@ export function listSysLogLogin(
export function delSysLogLogin(loginIds: string) {
return request({
url: `/system/log/login/${loginIds}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -50,7 +50,7 @@ export function delSysLogLogin(loginIds: string) {
export function cleanSysLogLogin() {
return request({
url: '/system/log/login/clean',
method: 'DELETE',
method: 'delete',
});
}
@@ -62,6 +62,6 @@ export function cleanSysLogLogin() {
export function unlock(userName: string) {
return request({
url: `/system/log/login/unlock/${userName}`,
method: 'PUT',
method: 'put',
});
}
+5 -5
View File
@@ -10,8 +10,8 @@ export function exportSysLogOperate(
) {
return request({
url: '/system/log/operate/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -26,7 +26,7 @@ export function listSysLogOperate(
) {
return request({
url: '/system/log/operate/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -39,7 +39,7 @@ export function listSysLogOperate(
export function delSysLogOperate(operId: string) {
return request({
url: `/system/log/operate/${operId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -50,6 +50,6 @@ export function delSysLogOperate(operId: string) {
export function cleanSysLogOperate() {
return request({
url: '/system/log/operate/clean',
method: 'DELETE',
method: 'delete',
});
}
-64
View File
@@ -1,64 +0,0 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询登录源列表
* @param query 查询参数
* @returns object
*/
export function listLoginSource(query: Record<string, any>) {
return request({
url: '/system/login-source/list',
method: 'GET',
params: query,
});
}
/**
* 查询登录源详细
* @param id 登录源ID
* @returns object
*/
export function getLoginSource(id: string | number) {
return request({
url: `/system/login-source/${id}`,
method: 'GET',
});
}
/**
* 新增登录源
* @param data 登录源对象
* @returns object
*/
export function addLoginSource(data: Record<string, any>) {
return request({
url: '/system/login-source',
method: 'POST',
data: data,
});
}
/**
* 修改登录源
* @param data 登录源对象
* @returns object
*/
export function updateLoginSource(data: Record<string, any>) {
return request({
url: '/system/login-source',
method: 'PUT',
data: data,
});
}
/**
* 认证源删除
* @param id 登录源ID
* @returns object
*/
export function delLoginSource(id: string | number) {
return request({
url: `/system/login-source/${id}`,
method: 'DELETE',
});
}
+10 -10
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listMenu(query?: Record<string, any>) {
return request({
url: '/system/menu/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listMenu(query?: Record<string, any>) {
export function getMenu(menuId: string | number) {
return request({
url: `/system/menu/${menuId}`,
method: 'GET',
method: 'get',
});
}
@@ -31,8 +31,8 @@ export function getMenu(menuId: string | number) {
*/
export function menuTreeSelect() {
return request({
url: '/system/menu/tree',
method: 'GET',
url: '/system/menu/treeSelect',
method: 'get',
});
}
@@ -41,10 +41,10 @@ export function menuTreeSelect() {
* @param roleId 角色ID
* @returns object
*/
export function menuTreeSelectRole(roleId: string | number) {
export function roleMenuTreeSelect(roleId: string | number) {
return request({
url: `/system/menu/tree/role/${roleId}`,
method: 'GET',
url: `/system/menu/roleMenuTreeSelect/${roleId}`,
method: 'get',
});
}
@@ -56,7 +56,7 @@ export function menuTreeSelectRole(roleId: string | number) {
export function addMenu(data: Record<string, any>) {
return request({
url: '/system/menu',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -69,7 +69,7 @@ export function addMenu(data: Record<string, any>) {
export function updateMenu(data: Record<string, any>) {
return request({
url: '/system/menu',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -82,6 +82,6 @@ export function updateMenu(data: Record<string, any>) {
export function delMenu(menuId: string | number) {
return request({
url: `/system/menu/${menuId}`,
method: 'DELETE',
method: 'delete',
});
}
+7 -7
View File
@@ -8,8 +8,8 @@ import { request } from '@/plugins/http-fetch';
export function exportPost(query: Record<string, any>) {
return request({
url: '/system/post/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -22,7 +22,7 @@ export function exportPost(query: Record<string, any>) {
export function listPost(query: Record<string, any>) {
return request({
url: '/system/post/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listPost(query: Record<string, any>) {
export function getPost(postId: string | number) {
return request({
url: `/system/post/${postId}`,
method: 'GET',
method: 'get',
});
}
@@ -47,7 +47,7 @@ export function getPost(postId: string | number) {
export function addPost(data: Record<string, any>) {
return request({
url: '/system/post',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -60,7 +60,7 @@ export function addPost(data: Record<string, any>) {
export function updatePost(data: Record<string, any>) {
return request({
url: '/system/post',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -73,6 +73,6 @@ export function updatePost(data: Record<string, any>) {
export function delPost(postId: string | number) {
return request({
url: `/system/post/${postId}`,
method: 'DELETE',
method: 'delete',
});
}
+4 -4
View File
@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
export function bootloaderStart() {
return request({
url: `/bootloader`,
method: 'POST',
method: 'post',
whithToken: false,
repeatSubmit: false,
});
@@ -20,7 +20,7 @@ export function bootloaderStart() {
export function bootloaderDone() {
return request({
url: `/bootloader`,
method: 'PUT',
method: 'put',
});
}
@@ -31,7 +31,7 @@ export function bootloaderDone() {
export function bootloaderReset() {
return request({
url: `/bootloader`,
method: 'DELETE',
method: 'delete',
timeout: 180_000
});
}
@@ -43,7 +43,7 @@ export function bootloaderReset() {
export function bootloaderAccount(username: string, password: string) {
return request({
url: `/bootloader/account`,
method: 'PUT',
method: 'put',
data: {
username,
password,
+21 -18
View File
@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function exportRole(query: Record<string, any>) {
return request({
url: '/system/role/export',
method: 'POST',
method: 'post',
data: query,
responseType: 'blob',
});
@@ -22,7 +22,7 @@ export function exportRole(query: Record<string, any>) {
export function listRole(query: Record<string, any>) {
return request({
url: '/system/role/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -35,7 +35,7 @@ export function listRole(query: Record<string, any>) {
export function getRole(roleId: string | number) {
return request({
url: `/system/role/${roleId}`,
method: 'GET',
method: 'get',
});
}
@@ -47,7 +47,7 @@ export function getRole(roleId: string | number) {
export function addRole(data: Record<string, any>) {
return request({
url: '/system/role',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -60,7 +60,7 @@ export function addRole(data: Record<string, any>) {
export function updateRole(data: Record<string, any>) {
return request({
url: '/system/role',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -73,21 +73,24 @@ export function updateRole(data: Record<string, any>) {
export function delRole(roleId: string | number) {
return request({
url: `/system/role/${roleId}`,
method: 'DELETE',
method: 'delete',
});
}
/**
* 角色状态修改
* @param roleId 角色ID
* @param statusFlag 角色状态
* @param status 角色状态
* @returns object
*/
export function changeRoleStatus(roleId: string, statusFlag: string | number) {
export function changeRoleStatus(roleId: string, status: string | number) {
return request({
url: '/system/role/status',
method: 'PUT',
data: { roleId, statusFlag },
url: '/system/role/changeStatus',
method: 'put',
data: {
roleId,
status,
},
});
}
@@ -98,8 +101,8 @@ export function changeRoleStatus(roleId: string, statusFlag: string | number) {
*/
export function dataScope(data: Record<string, any>) {
return request({
url: '/system/role/data-scope',
method: 'PUT',
url: '/system/role/dataScope',
method: 'put',
data: data,
});
}
@@ -109,10 +112,10 @@ export function dataScope(data: Record<string, any>) {
* @param query 查询参数
* @returns object
*/
export function authUserList(query: Record<string, any>) {
export function authUserAllocatedList(query: Record<string, any>) {
return request({
url: '/system/role/user/list',
method: 'GET',
url: '/system/role/authUser/allocatedList',
method: 'get',
params: query,
});
}
@@ -124,8 +127,8 @@ export function authUserList(query: Record<string, any>) {
*/
export function authUserChecked(data: Record<string, any>) {
return request({
url: '/system/role/user/auth',
method: 'PUT',
url: '/system/role/authUser/checked',
method: 'put',
data: data,
});
}
+24 -33
View File
@@ -5,11 +5,12 @@ import { request } from '@/plugins/http-fetch';
* @param data 表单数据对象
* @returns object
*/
export function importData(filePath: string, update: boolean) {
export function importData(data: FormData) {
return request({
url: '/system/user/import',
method: 'POST',
data: { filePath, update },
url: '/system/user/importData',
method: 'post',
data,
dataType: 'form-data',
timeout: 180_000,
});
}
@@ -20,8 +21,8 @@ export function importData(filePath: string, update: boolean) {
*/
export function importTemplate() {
return request({
url: '/system/user/import/template',
method: 'GET',
url: '/system/user/importTemplate',
method: 'get',
responseType: 'blob',
});
}
@@ -34,8 +35,8 @@ export function importTemplate() {
export function exportUser(query: Record<string, any>) {
return request({
url: '/system/user/export',
method: 'GET',
params: query,
method: 'post',
data: query,
responseType: 'blob',
});
}
@@ -48,7 +49,7 @@ export function exportUser(query: Record<string, any>) {
export function listUser(query: Record<string, any>) {
return request({
url: '/system/user/list',
method: 'GET',
method: 'get',
params: query,
});
}
@@ -61,7 +62,7 @@ export function listUser(query: Record<string, any>) {
export function getUser(userId: string | number = '0') {
return request({
url: `/system/user/${userId}`,
method: 'GET',
method: 'get',
});
}
@@ -73,7 +74,7 @@ export function getUser(userId: string | number = '0') {
export function addUser(data: Record<string, any>) {
return request({
url: '/system/user',
method: 'POST',
method: 'post',
data: data,
});
}
@@ -86,7 +87,7 @@ export function addUser(data: Record<string, any>) {
export function updateUser(data: Record<string, any>) {
return request({
url: '/system/user',
method: 'PUT',
method: 'put',
data: data,
});
}
@@ -99,7 +100,7 @@ export function updateUser(data: Record<string, any>) {
export function delUser(userId: string | number) {
return request({
url: `/system/user/${userId}`,
method: 'DELETE',
method: 'delete',
});
}
@@ -111,8 +112,8 @@ export function delUser(userId: string | number) {
*/
export function resetUserPwd(userId: string | number, password: string) {
return request({
url: '/system/user/password',
method: 'PUT',
url: '/system/user/resetPwd',
method: 'put',
data: {
userId,
password,
@@ -123,29 +124,19 @@ export function resetUserPwd(userId: string | number, password: string) {
/**
* 用户状态修改
* @param userId 用户ID
* @param statusFlag 变更状态值
* @param status 变更状态值
* @returns object
*/
export function changeUserStatus(
userId: string | number,
statusFlag: string | number
status: string | number
) {
return request({
url: '/system/user/status',
method: 'PUT',
data: { userId, statusFlag },
});
}
/**
* 用户强制重置密码
* @param password 密码
* @returns object
*/
export function updateUserPasswordForce(password: string) {
return request({
url: '/system/user/profile/password-force',
method: 'PUT',
data: { password },
url: '/system/user/changeStatus',
method: 'put',
data: {
userId,
status,
},
});
}
+12 -57
View File
@@ -15,7 +15,7 @@ import { encode } from 'js-base64';
export async function downloadFile(filePath: string, range?: string) {
return request({
url: `/file/download/${encode(filePath)}`,
method: 'GET',
method: 'get',
headers: range ? { range } : {},
responseType: 'blob',
timeout: 60_000,
@@ -77,7 +77,7 @@ export async function downloadFileChunk(
export function uploadFile(data: FormData) {
return request({
url: '/file/upload',
method: 'POST',
method: 'post',
data,
dataType: 'form-data',
timeout: 180_000,
@@ -168,8 +168,8 @@ export async function uploadFileChunk(
*/
export function chunkCheck(identifier: string, fileName: string) {
return request({
url: '/file/chunk-check',
method: 'POST',
url: '/file/chunkCheck',
method: 'post',
data: { identifier, fileName },
timeout: 60_000,
});
@@ -188,8 +188,8 @@ export function chunkMerge(
subPath: string = 'default'
) {
return request({
url: '/file/chunk-merge',
method: 'POST',
url: '/file/chunkMerge',
method: 'post',
data: { identifier, fileName, subPath },
timeout: 60_000,
});
@@ -202,66 +202,22 @@ export function chunkMerge(
*/
export function chunkUpload(data: FormData) {
return request({
url: '/file/chunk-upload',
method: 'POST',
url: '/file/chunkUpload',
method: 'post',
data,
dataType: 'form-data',
timeout: 60_000,
});
}
/**
* 本地文件列表
* @param path 文件路径
* @param search search prefix
* @returns object
*/
export async function listFile(query: Record<string, any>) {
return request({
url: `/file/list`,
method: 'GET',
params: query,
});
}
/**
* 本地文件获取下载
* @param path 文件路径
* @param fileName 文件名
* @returns object
*/
export async function getFile(path: string, fileName: string) {
return request({
url: `/file`,
method: 'GET',
params: { path, fileName },
responseType: 'blob',
timeout: 60_000,
});
}
/**
* 本地文件删除
* @param path 文件路径
* @param fileName 文件名
* @returns object
*/
export async function delFile(path: string, fileName: string) {
return request({
url: `/file`,
method: 'DELETE',
params: { path, fileName },
});
}
/**
* 转存上传文件到静态资源
* @returns object
*/
export function transferStaticFile(data: Record<string, any>) {
return request({
url: `/file/transfer-static-file`,
method: 'POST',
url: `/file/transferStaticFile`,
method: 'post',
data,
timeout: 60_000,
});
@@ -285,12 +241,11 @@ export async function uploadFileToNE(
if (uploadChunkRes.code === RESULT_CODE_SUCCESS) {
const transferToNeFileRes = await request({
url: `/ne/action/pushFile`,
method: 'POST',
method: 'post',
data: {
uploadPath: uploadChunkRes.data.filePath,
uploadPath: uploadChunkRes.data.fileName,
neType,
neId,
delTemp: true,
},
timeout: 60_000,
});
+2 -2
View File
@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
export function iperfV(data: Record<string, string>) {
return request({
url: '/tool/iperf/v',
method: 'GET',
method: 'get',
params: data,
});
}
@@ -13,7 +13,7 @@ export function iperfV(data: Record<string, string>) {
export function iperfI(data: Record<string, string>) {
return request({
url: '/tool/iperf/i',
method: 'POST',
method: 'post',
data: data,
timeout: 60_000,
});
Loaded 100 of 331 files, more files were not shown because too many files have changed in this diff. Show more