fix: 接口变更/请求方法为大写

This commit is contained in:
TsMask
2025-02-20 10:42:34 +08:00
parent 8bfa73a67a
commit 7322759545
83 changed files with 568 additions and 1388 deletions

View File

@@ -1,95 +0,0 @@
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 } },
});
}

View File

@@ -15,7 +15,7 @@ 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',
method: 'POST',
data: { mml: ['reload'] },
timeout: 180_000,
});
@@ -53,7 +53,7 @@ export async function getPCCRule(neId: any) {
request({
url: `/ne/config/data`,
params: { neType: 'PCF', neId, paramName },
method: 'get',
method: 'GET',
})
);
}
@@ -63,7 +63,7 @@ export async function getPCCRule(neId: any) {
resArr.forEach((item, i: number) => {
if (item.status === 'fulfilled') {
const res = item.value;
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
if (res.code === RESULT_CODE_SUCCESS) {
const key = paramNameArr[i];
obj[key] = res.data.map((item: any) => {
if ('qosTemplate' === key) {

View File

@@ -1,242 +0,0 @@
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,
});
}

View File

@@ -1,220 +0,0 @@
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;
}

View File

@@ -14,7 +14,7 @@ export async function getActiveAlarmTotal() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
method: 'GET',
params: {
SQL: totalSQL,
},
@@ -82,7 +82,7 @@ export async function listAct(query: Record<string, any>, filterSQl: string) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
method: 'GET',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
@@ -91,9 +91,8 @@ export async function listAct(query: Record<string, any>, filterSQl: string) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -101,9 +100,9 @@ export async function listAct(query: Record<string, any>, filterSQl: string) {
const itemData = item['alarm'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -130,7 +129,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,
});
}
@@ -155,7 +154,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,
});
}
@@ -187,7 +186,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,
});
}
@@ -199,7 +198,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'",
},
@@ -227,7 +226,7 @@ export function clearAlarm(data: Record<string, any>) {
url: `/api/rest/databaseManagement/v1/update/omc_db/alarm?WHERE=id in(${data.join(
','
)})`,
method: 'put',
method: 'PUT',
data: finalData,
});
}
@@ -240,7 +239,7 @@ export function clearAlarm(data: Record<string, any>) {
export function listSync() {
return request({
url: `/api/rest/faultManagement/v1/elementType/all/objectType/alarms`,
method: 'get',
method: 'GET',
timeout: 180_000,
});
}
@@ -275,7 +274,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,
},
@@ -300,7 +299,7 @@ export async function origGet() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
method: 'GET',
params: {
SQL: totalSQL,
},
@@ -338,7 +337,7 @@ export async function top3Sel(filterFlag?: string) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
method: 'GET',
params: {
SQL: top3SQL,
},

View File

@@ -1,8 +1,6 @@
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';
/**
* 查询列表
@@ -49,7 +47,7 @@ export async function listAct(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_event`,
method: 'get',
method: 'GET',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
@@ -58,9 +56,8 @@ export async function listAct(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -68,9 +65,9 @@ export async function listAct(query: Record<string, any>) {
const itemData = item['alarm_event'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -109,7 +106,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,
},

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'`,
},
@@ -90,14 +90,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);
@@ -145,7 +145,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'`,
},
@@ -180,7 +180,7 @@ export async function updateForwardSet(data: Record<string, any>) {
];
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) } },
});
// 解析数据

View File

@@ -39,7 +39,7 @@ export async function listAct(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm`,
method: 'get',
method: 'GET',
params: {
SQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
@@ -48,9 +48,8 @@ export async function listAct(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -58,9 +57,9 @@ export async function listAct(query: Record<string, any>) {
const itemData = item['alarm'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -87,7 +86,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,
});
}
@@ -111,7 +110,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,
});
}
@@ -146,7 +145,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,
},

View File

@@ -11,7 +11,7 @@ import { NE_TYPE_LIST } from '@/constants/ne-constants';
export async function listMain() {
const result = await request({
url: '/api/rest/systemManagement/v1/elementType/all/objectType/systemState',
method: 'get',
method: 'GET',
timeout: 60_000,
});
// console.log(result);
@@ -69,7 +69,7 @@ export async function getServerTime() {
// 发起请求
const result = await request({
url: `/api/rest/systemManagement/v1/elementType/OMC/objectType/time`,
method: 'get',
method: 'GET',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && result.data) {
@@ -87,7 +87,7 @@ export async function getServerTime() {
export function getSysConf() {
return request({
url: `/sys-conf`,
method: 'get',
method: 'GET',
whithToken: false,
});
}

View File

@@ -20,14 +20,14 @@ export async function listAlarm(query: Record<string, any>) {
querySQL += ` and alarm_status = '${query.status}' `;
}
if (query.beginTime) {
querySQL += ` and log_time >= '${query.beginTime}' `;
querySQL += ` and event_time >= '${new Date(query.beginTime).valueOf()}' `;
}
if (query.endTime) {
querySQL += ` and log_time <= '${query.endTime}' `;
querySQL += ` and event_time <= '${new Date(query.endTime).valueOf()}' `;
}
// 排序
let sortSql = ' order by log_time ';
let sortSql = ' order by event_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
@@ -41,7 +41,7 @@ export async function listAlarm(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_log`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -50,9 +50,8 @@ export async function listAlarm(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -60,9 +59,9 @@ export async function listAlarm(query: Record<string, any>) {
const itemData = item['alarm_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

View File

@@ -9,7 +9,7 @@ import { request } from '@/plugins/http-fetch';
export function getBakFile() {
return request({
url: '/lm/table/list',
method: 'get',
method: 'GET',
});
}
@@ -21,7 +21,7 @@ export function getBakFile() {
export function getBakFileList(query: Record<string, any>) {
return request({
url: '/lm/file/list',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -34,7 +34,7 @@ export function getBakFileList(query: Record<string, any>) {
export function downFile(query: Record<string, any>) {
return request({
url: `/lm/file/${query.fileName}`,
method: 'get',
method: 'GET',
params: query,
responseType: 'blob',
timeout: 180_000,
@@ -49,7 +49,7 @@ export function downFile(query: Record<string, any>) {
export function delFile(query: Record<string, any>) {
return request({
url: `/lm/file/${query.fileName}`,
method: 'delete',
method: 'DELETE',
params: query,
});
}
@@ -62,7 +62,7 @@ export function delFile(query: Record<string, any>) {
export function updateFTPInfo(data: Record<string, any>) {
return request({
url: `/lm/table/ftp`,
method: 'post',
method: 'POST',
data: data,
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
});
@@ -76,7 +76,7 @@ export function updateFTPInfo(data: Record<string, any>) {
export function getFTPInfo() {
return request({
url: `/lm/table/ftp`,
method: 'get',
method: 'GET',
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
});
}
@@ -89,7 +89,7 @@ export function getFTPInfo() {
export function putFTPInfo(filePath: string, fileName: string) {
return request({
url: `/lm/table/ftp`,
method: 'put',
method: 'PUT',
data: { filePath, fileName },
});
}

View File

@@ -17,14 +17,14 @@ export async function listForwarding(query: Record<string, any>) {
querySQL += ` and ne_type like '%${query.neType}%' `;
}
if (query.beginTime) {
querySQL += ` and log_time >= '${query.beginTime}' `;
querySQL += ` and event_time >= '${new Date(query.beginTime).valueOf()}' `;
}
if (query.endTime) {
querySQL += ` and log_time <= '${query.endTime}' `;
querySQL += ` and event_time <= '${new Date(query.endTime).valueOf()}' `;
}
// 排序
let sortSql = ' order by log_time ';
let sortSql = ' order by event_time ';
if (query.sortOrder === 'asc') {
sortSql += ' asc ';
} else {
@@ -38,7 +38,7 @@ export async function listForwarding(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/alarm_forward_log`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -47,9 +47,8 @@ export async function listForwarding(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -57,9 +56,9 @@ export async function listForwarding(query: Record<string, any>) {
const itemData = item['alarm_forward_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

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,

View File

@@ -38,7 +38,7 @@ export async function listMML(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/mml_log`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -47,9 +47,8 @@ export async function listMML(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -57,9 +56,9 @@ export async function listMML(query: Record<string, any>) {
const itemData = item['mml_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

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,9 +50,8 @@ export async function listOperationLog(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -60,9 +59,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.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

View File

@@ -41,7 +41,7 @@ export async function listSecurityLog(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/security_log`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -50,9 +50,8 @@ export async function listSecurityLog(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -60,9 +59,9 @@ export async function listSecurityLog(query: Record<string, any>) {
const itemData = item['security_log'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

View File

@@ -6,7 +6,7 @@ import { request } from '@/plugins/http-fetch';
export function login(data: Record<string, string>) {
return request({
url: '/login',
method: 'post',
method: 'POST',
data: data,
whithToken: false,
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
@@ -21,7 +21,7 @@ export function login(data: Record<string, string>) {
export function register(data: Record<string, any>) {
return request({
url: '/register',
method: 'post',
method: 'POST',
data: data,
whithToken: false,
crypto: sessionGet(CACHE_SESSION_CRYPTO_API) !== 'false',
@@ -34,8 +34,8 @@ export function register(data: Record<string, any>) {
*/
export function getInfo() {
return request({
url: '/getInfo',
method: 'get',
url: '/me',
method: 'GET',
});
}
@@ -46,7 +46,8 @@ export function getInfo() {
export function logout() {
return request({
url: '/logout',
method: 'post',
method: 'POST',
repeatSubmit: false,
});
}
@@ -56,8 +57,8 @@ export function logout() {
*/
export function getCaptchaImage() {
return request({
url: '/captchaImage',
method: 'get',
url: '/captcha-image',
method: 'GET',
whithToken: false,
});
}

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) } },
});
// 解析数据

View File

@@ -11,7 +11,7 @@ export async function getMMLByNE(neType: string) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_system`,
method: 'get',
method: 'GET',
params: {
SQL: `select * from mml_system where ne_type = '${neType}' and status = 'Active'`,
},
@@ -43,7 +43,7 @@ export async function sendMMlByNE(
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/${neType}/objectType/${objectType}?ne_id=${neId}`,
method: 'post',
method: 'POST',
data: { mml: cmdArr },
timeout: 180_000,
});

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,
});

View File

@@ -10,7 +10,7 @@ export async function getMMLByUDM() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/mml_subscriber`,
method: 'get',
method: 'GET',
params: {
SQL: `select * from mml_subscriber where ne_type = 'UDM' and status = 'Active'`,
},
@@ -35,7 +35,7 @@ export async function sendMMlByUDM(neId: string, cmdArr: string[]) {
// 发起请求
const result = await request({
url: `/api/rest/operationManagement/v1/elementType/UDM/objectType/mml?ne_id=${neId}`,
method: 'post',
method: 'POST',
data: { mml: cmdArr },
timeout: 180_000,
});

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/getNames',
method: 'get',
url: '/monitor/cache/names',
method: 'GET',
});
}
@@ -29,8 +29,9 @@ export function listCacheName() {
*/
export function listCacheKey(cacheName: string) {
return request({
url: `/monitor/cache/getKeys/${cacheName}`,
method: 'get',
url: `/monitor/cache//keys`,
method: 'GET',
params: { cacheName },
});
}
@@ -42,8 +43,22 @@ export function listCacheKey(cacheName: string) {
*/
export function getCacheValue(cacheName: string, cacheKey: string) {
return request({
url: `/monitor/cache/getValue/${cacheName}/${cacheKey}`,
method: 'get',
url: `/monitor/cache/value`,
method: 'GET',
params: { cacheName, cacheKey },
});
}
/**
* 缓存名称列表安全删除
*
* 指定可清理的缓存key
* @returns object
*/
export function clearCacheSafe() {
return request({
url: '/monitor/cache/names',
method: 'DELETE',
});
}
@@ -54,8 +69,9 @@ export function getCacheValue(cacheName: string, cacheKey: string) {
*/
export function clearCacheName(cacheName: string) {
return request({
url: `/monitor/cache/clearCacheName/${cacheName}`,
method: 'delete',
url: `/monitor/cache/keys`,
method: 'DELETE',
params: { cacheName },
});
}
@@ -67,20 +83,8 @@ export function clearCacheName(cacheName: string) {
*/
export function clearCacheKey(cacheName: string, cacheKey: string) {
return request({
url: `/monitor/cache/clearCacheKey/${cacheName}/${cacheKey}`,
method: 'delete',
});
}
/**
* 安全清理缓存名称
*
* 指定可清理的缓存key
* @returns object
*/
export function clearCacheSafe() {
return request({
url: '/monitor/cache/clearCacheSafe',
method: 'delete',
url: `/monitor/cache/value`,
method: 'DELETE',
params: { cacheName, cacheKey },
});
}

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: 'post',
data: query,
method: 'GET',
params: 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,
status: string | number
statusFlag: string | number
) {
return request({
url: '/monitor/job/changeStatus',
method: 'put',
url: '/monitor/job/status',
method: 'PUT',
data: {
jobId,
status,
statusFlag,
},
});
}
@@ -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/resetQueueJob',
method: 'put',
url: '/monitor/job/reset',
method: 'PUT',
});
}

View File

@@ -5,13 +5,11 @@ 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/jobLog/export',
method: 'post',
data: query,
url: '/monitor/job/log/export',
method: 'GET',
params: query,
responseType: 'blob',
});
}
@@ -23,8 +21,8 @@ export function exportJobLog(
*/
export function listJobLog(query: Record<string, any>) {
return request({
url: '/monitor/jobLog/list',
method: 'get',
url: '/monitor/job/log/list',
method: 'GET',
params: query,
});
}
@@ -36,8 +34,8 @@ export function listJobLog(query: Record<string, any>) {
*/
export function delJobLog(jobLogId: string) {
return request({
url: `/monitor/jobLog/${jobLogId}`,
method: 'delete',
url: `/monitor/job/log/${jobLogId}`,
method: 'DELETE',
});
}
@@ -47,7 +45,7 @@ export function delJobLog(jobLogId: string) {
*/
export function cleanJobLog() {
return request({
url: '/monitor/jobLog/clean',
method: 'delete',
url: '/monitor/job/log/clean',
method: 'DELETE',
});
}

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,
});

View File

@@ -7,8 +7,8 @@ import { request } from '@/plugins/http-fetch';
*/
export function listOnline(query: Record<string, any>) {
return request({
url: '/monitor/online/list',
method: 'get',
url: '/monitor/user-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/online/${tokenId}`,
method: 'delete',
url: `/monitor/user-online/logout/${tokenId}`,
method: 'DELETE',
});
}

View File

@@ -3,8 +3,7 @@ import { request } from '@/plugins/http-fetch';
/**服务器服务信息 */
export function getSystemInfo() {
return request({
url: '/monitor/system-info',
method: 'get',
timeout: 60_000,
url: '/monitor/system',
method: 'GET',
});
}

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',
});
}

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function getAllNeConfig(neType: string) {
return request({
url: `/ne/config/list/${neType}`,
method: 'get',
method: 'GET',
timeout: 60_000,
});
}
@@ -22,7 +22,7 @@ export function getNeConfigData(params: Record<string, any>) {
return request({
url: `/ne/config/data`,
params,
method: 'get',
method: 'GET',
});
}
@@ -34,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,
});
}
@@ -47,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,
});
}
@@ -60,7 +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,
});
}

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeConfigBackup(query: Record<string, any>) {
return request({
url: '/ne/config/backup/list',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -21,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,
});
}
@@ -34,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,
@@ -49,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 },
});
}
@@ -62,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,
@@ -77,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,
});
}

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,
});
}

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',
});
}

View File

@@ -10,7 +10,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 +24,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,7 +36,7 @@ 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',
timeout: 30_000,
@@ -51,7 +51,7 @@ 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',
timeout: 30_000,
@@ -66,7 +66,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 +79,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 +94,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 +108,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 +122,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 +138,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 +151,7 @@ export function saveOAMFile(data: Record<string, any>) {
export function getPara5GFilee() {
return request({
url: '/ne/info/para5GFile',
method: 'get',
method: 'GET',
});
}
@@ -164,7 +164,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 +178,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,
});

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 },
});
}

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,
});
}

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,
});

View File

@@ -8,7 +8,7 @@ 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,7 +22,7 @@ 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,
});
}
@@ -35,7 +35,7 @@ export function delAMFDataUE(ueIds: string | number) {
export function exportAMFDataUE(data: Record<string, any>) {
return request({
url: '/neData/amf/ue/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,
@@ -50,7 +50,7 @@ export function exportAMFDataUE(data: Record<string, any>) {
export function listAMFNblist(query: Record<string, any>) {
return request({
url: '/neData/amf/nb/list',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -64,7 +64,7 @@ export function listAMFNblist(query: Record<string, any>) {
export function listAMFNbStatelist(query: Record<string, any>) {
return request({
url: '/neData/amf/nb/list-cfg',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -79,7 +79,7 @@ export function listAMFNbStatelist(query: Record<string, any>) {
export function addAMFNbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'post',
method: 'POST',
data: {
neType: 'AMF',
neId: neId,
@@ -99,7 +99,7 @@ export function addAMFNbState(neId: string, data: Record<string, any>) {
export function editAMFNbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'put',
method: 'PUT',
data: {
neType: 'AMF',
neId: neId,
@@ -119,7 +119,7 @@ export function editAMFNbState(neId: string, data: Record<string, any>) {
export function delAMFNbState(neId: string, index: string | number) {
return request({
url: `/ne/config/data`,
method: 'delete',
method: 'DELETE',
params: {
neType: 'AMF',
neId: neId,

View File

@@ -8,7 +8,7 @@ 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,7 +22,7 @@ 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,
});
}
@@ -35,9 +35,35 @@ export function delIMSDataCDR(cdrIds: string | number) {
export function exportIMSDataCDR(data: Record<string, any>) {
return request({
url: '/neData/ims/cdr/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_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,
});
}

View File

@@ -8,7 +8,7 @@ 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,7 +22,7 @@ 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,
});
}
@@ -35,7 +35,7 @@ export function delMMEDataUE(ueIds: string | number) {
export function exportMMEDataUE(data: Record<string, any>) {
return request({
url: '/neData/mme/ue/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,
@@ -50,7 +50,7 @@ export function exportMMEDataUE(data: Record<string, any>) {
export function listMMENblist(query: Record<string, any>) {
return request({
url: '/neData/mme/nb/list',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -64,7 +64,7 @@ export function listMMENblist(query: Record<string, any>) {
export function listMMENbStatelist(query: Record<string, any>) {
return request({
url: '/neData/mme/nb/list-cfg',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -79,7 +79,7 @@ export function listMMENbStatelist(query: Record<string, any>) {
export function addMMENbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'post',
method: 'POST',
data: {
neType: 'MME',
neId: neId,
@@ -99,7 +99,7 @@ export function addMMENbState(neId: string, data: Record<string, any>) {
export function editMMENbState(neId: string, data: Record<string, any>) {
return request({
url: `/ne/config/data`,
method: 'put',
method: 'PUT',
data: {
neType: 'MME',
neId: neId,
@@ -119,7 +119,7 @@ export function editMMENbState(neId: string, data: Record<string, any>) {
export function delMMENbState(neId: string, index: string | number) {
return request({
url: `/ne/config/data`,
method: 'delete',
method: 'DELETE',
params: {
neType: 'MME',
neId: neId,

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNBState(query: Record<string, any>) {
return request({
url: '/neData/nb-state/list',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -22,7 +22,7 @@ export function listNBState(query: Record<string, any>) {
export function exportNBState(data: Record<string, any>) {
return request({
url: '/neData/nb-state/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listSGWCDataCDR(query: Record<string, any>) {
return request({
url: '/neData/sgwc/cdr/list',
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -22,7 +22,7 @@ export function listSGWCDataCDR(query: Record<string, any>) {
export function delSGWCDataCDR(cdrIds: string | number) {
return request({
url: `/neData/sgwc/cdr/${cdrIds}`,
method: 'delete',
method: 'DELETE',
timeout: 60_000,
});
}
@@ -35,7 +35,7 @@ export function delSGWCDataCDR(cdrIds: string | number) {
export function exportSGWCDataCDR(data: Record<string, any>) {
return request({
url: '/neData/sgwc/cdr/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,

View File

@@ -8,7 +8,7 @@ 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,7 +22,7 @@ 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,
});
}
@@ -35,7 +35,7 @@ export function delSMFDataCDR(cdrIds: string | number) {
export function exportSMFDataCDR(data: Record<string, any>) {
return request({
url: '/neData/smf/cdr/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,
@@ -50,20 +50,20 @@ export function exportSMFDataCDR(data: Record<string, any>) {
export function listSMFSubNum(neId: string) {
return request({
url: '/neData/smf/sub/num',
method: 'get',
method: 'GET',
params: { neId },
});
}
/**
* SMF-在线订阅用户列表信息
* @param query 查询参数
* @param query 查询参数 {neId, pageNum, imsi, msisdn, upstate}
* @returns object
*/
export function listSMFSubList(query: Record<string, any>) {
return request({
url: '/neData/smf/sub/list',
method: 'get',
method: 'GET',
params: query,
});
}

View File

@@ -8,7 +8,7 @@ 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,7 +22,7 @@ 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,
});
}
@@ -35,7 +35,7 @@ export function delSMSCDataCDR(cdrIds: string | number) {
export function exportSMSCDataCDR(data: Record<string, any>) {
return request({
url: '/neData/smsc/cdr/export',
method: 'post',
method: 'POST',
data,
responseType: 'blob',
timeout: 60_000,

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,8 +134,8 @@ export function importUDMAuth(data: Record<string, any>) {
export function exportUDMAuth(data: Record<string, any>) {
return request({
url: '/neData/udm/auth/export',
method: 'post',
data,
method: 'GET',
params: data,
responseType: 'blob',
timeout: 180_000,
});

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: 'post',
data,
method: 'GET',
params: 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,
});

View File

@@ -1,34 +0,0 @@
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;
}

View File

@@ -11,20 +11,19 @@ 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',
method: 'GET',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
data.data.total = rows.length;
data.data.rows = rows;
}
// 测试数据
@@ -49,7 +48,7 @@ export async function listUEInfoByIMS(query: Record<string, any>) {
export async function listUENumByIMS(neId: String) {
const result = await request({
url: `/api/rest/ueManagement/v1/elementType/ims/objectType/ueNum?neId=${neId}`,
method: 'get',
method: 'GET',
});
if (result.code === RESULT_CODE_SUCCESS) {
let num = result.data['ueNum'] || 0;

View File

@@ -10,20 +10,19 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export async function listN3iwf(query: Record<string, any>) {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/n3iwf/objectType/ueInfo',
method: 'get',
method: 'GET',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
data.data.total = rows.length;
data.data.rows = rows;
}
// 模拟数据
// data.rows = [

View File

@@ -9,19 +9,18 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export async function listNSSF() {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/subscriptions',
method: 'get',
method: 'GET',
});
let data: DataList = {
total: 0,
rows: [],
let data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
data.data.total = rows.length;
data.data.rows = rows;
}
return data;
}

View File

@@ -9,19 +9,18 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export async function listNSSFAMF() {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/nssf/objectType/availableAMFs',
method: 'get',
method: 'GET',
});
let data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
data.data.total = rows.length;
data.data.rows = rows;
}
// let testData = {

View File

@@ -13,7 +13,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export function exportRule(data: Record<string, any>) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo/file/export`,
method: 'get',
method: 'GET',
params: data,
responseType: 'blob',
timeout: 180_000,
@@ -28,7 +28,7 @@ export function exportRule(data: Record<string, any>) {
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',
method: 'PUT',
data,
timeout: 60_000,
});
@@ -42,12 +42,11 @@ export function importRuleData(data: Record<string, any>) {
export async function listRules(query: Record<string, any>) {
const result = await request({
url: '/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo',
method: 'get',
method: 'GET',
params: query,
});
let data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] } as any,
code: result.code,
msg: result.msg,
};
@@ -58,13 +57,13 @@ export async function listRules(query: Record<string, any>) {
return {
code: RESULT_CODE_ERROR,
msg: result.data?.cause,
rows: result.data,
data: result.data,
};
}
if (Array.isArray(result.data.data)) {
const rows = parseObjLineToHump(result.data.data);
data.total = rows.length;
data.rows = rows;
data.data.total = rows.length;
data.data.rows = rows;
}
}
@@ -95,7 +94,7 @@ export async function listRules(query: Record<string, any>) {
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',
method: 'GET',
});
// 解析数据
if (result.code === RESULT_CODE_SUCCESS && Array.isArray(result.data.data)) {
@@ -112,7 +111,7 @@ export async function getRule(neId: string, imsi: string) {
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',
method: 'PUT',
data: data,
});
// 解析数据
@@ -134,7 +133,7 @@ export async function updateRule(data: Record<string, any>) {
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',
method: 'PUT',
data: data,
timeout: 60_000,
});
@@ -163,7 +162,7 @@ export async function batchUpdateRule(data: Record<string, any>) {
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',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -186,7 +185,7 @@ export async function addRule(data: Record<string, any>) {
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',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -215,7 +214,7 @@ export async function batchAddRule(data: Record<string, any>) {
export function delRule(neId: string, imsi: string) {
return request({
url: `/api/rest/ueManagement/v1/elementType/pcf/objectType/ueInfo?neId=${neId}&imsi=${imsi}`,
method: 'delete',
method: 'DELETE',
timeout: 60_000,
});
}
@@ -228,7 +227,7 @@ export function delRule(neId: string, imsi: string) {
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',
method: 'DELETE',
timeout: 60_000,
});
}

View File

@@ -1,111 +0,0 @@
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;
}

View File

@@ -9,7 +9,7 @@ export async function listCustomData(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/pm/kpiC/report`,
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});

View File

@@ -1,66 +1,4 @@
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;
// }
/**
* 新 查询自定义指标
@@ -71,7 +9,7 @@ export async function listCustom(query?: Record<string, any>) {
// 发起请求
const result = await request({
url: `/pm/kpiC/title/totalList`,
method: 'get',
method: 'GET',
params: query,
});
return result;
@@ -85,7 +23,7 @@ export async function listCustom(query?: Record<string, any>) {
export async function getCustom(id: string | number) {
return request({
url: `/pm/kpiC/title/${id}`,
method: 'get',
method: 'GET',
});
}
@@ -97,7 +35,7 @@ export async function getCustom(id: string | number) {
export function addCustom(data: Record<string, any>) {
return request({
url: `/pm/kpiC/title`,
method: 'post',
method: 'POST',
data: data,
});
}
@@ -110,7 +48,7 @@ export function addCustom(data: Record<string, any>) {
export function updateCustom(data: Record<string, any>) {
return request({
url: `/pm/kpiC/title/${data.id}`,
method: 'put',
method: 'PUT',
data: data,
});
}
@@ -122,6 +60,6 @@ export function updateCustom(data: Record<string, any>) {
export async function delCustom(data: Record<string, any>) {
return request({
url: `/pm/kpiC/title/${data.id}`,
method: 'delete',
method: 'DELETE',
});
}

View File

@@ -46,7 +46,7 @@ export async function listgoldData(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -56,9 +56,8 @@ export async function listgoldData(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -66,9 +65,9 @@ export async function listgoldData(query: Record<string, any>) {
const itemData = item['gold_kpi'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -85,7 +84,7 @@ export async function listgoldData(query: Record<string, any>) {
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,
});
@@ -102,7 +101,7 @@ export async function getKPITitle(neType: string) {
// 发起请求
const result = await request({
url: `/neData/kpi/title`,
method: 'get',
method: 'GET',
params: { neType },
});
// 解析数据//
@@ -125,7 +124,7 @@ export async function listUPFData(timeArr: any) {
// 获取参数规则
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
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()`,
},
@@ -134,7 +133,7 @@ export async function listUPFData(timeArr: any) {
// 获取对应信息
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
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()`,
},

View File

@@ -30,7 +30,7 @@ export async function listperfData(query: Record<string, any>) {
let sortSql = ' order by ';
if (query.sortField) {
sortSql += ` ${query.sortField} `;
}else{
} else {
sortSql += ` start_time `;
}
@@ -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,9 +56,8 @@ export async function listperfData(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -66,9 +65,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.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});

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,9 +41,8 @@ export async function listPerfThreshold(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -51,9 +50,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.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -71,7 +70,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}`,
},
@@ -102,7 +101,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] },
});
}
@@ -122,7 +121,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 },
});
}
@@ -135,7 +134,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',
});
}
@@ -147,7 +146,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`,
},
@@ -170,7 +169,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' } },
});
}
@@ -183,7 +182,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' } },
});
}

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,9 +41,8 @@ export async function listPerfTask(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -51,9 +50,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.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -71,7 +70,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}`,
},
@@ -120,7 +119,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] },
});
}
@@ -158,7 +157,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 },
});
}
@@ -173,7 +172,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',
});
}
@@ -185,7 +184,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`,
},
@@ -209,7 +208,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',
});
}

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,38 +19,21 @@ export function getUserProfile() {
export function updateUserProfile(data: Record<string, any>) {
return request({
url: '/system/user/profile',
method: 'put',
method: 'PUT',
data: data,
});
}
/**
* 用户密码重置
* @param userId 用户ID
* @param status 变更状态值
* 用户个人密码重置
* @param oldPassword 旧密码
* @param newPassword 新密码
* @returns object
*/
export function updateUserPwd(oldPassword: string, newPassword: string) {
export function updateUserPassword(oldPassword: string, newPassword: string) {
return request({
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',
url: '/system/user/profile/password',
method: 'PUT',
data: { oldPassword, newPassword },
});
}

View File

@@ -6,7 +6,7 @@ import { request } from '@/plugins/http-fetch';
*/
export const getRouters = () => {
return request({
url: '/getRouters',
method: 'get',
url: '/router',
method: 'GET',
});
};

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: 'post',
data: query,
method: 'GET',
params: 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/configKey/${configKey}`,
method: 'get',
url: `/system/config/config-key/${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/refreshCache',
method: 'put',
url: '/system/config/refresh',
method: 'PUT',
});
}
@@ -108,7 +108,7 @@ export function refreshCache() {
export function changeValue(data: Record<string, string>) {
return request({
url: '/system/config/changeValue',
method: 'put',
method: 'PUT',
data: data,
});
}

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 deptTreeSelect() {
export function deptTree() {
return request({
url: '/system/dept/treeSelect',
method: 'get',
url: '/system/dept/tree',
method: 'GET',
});
}
@@ -91,9 +91,9 @@ export function deptTreeSelect() {
* @param roleId 角色ID
* @returns object
*/
export function roleDeptTreeSelect(roleId: string | number) {
export function deptTreeRole(roleId: string | number) {
return request({
url: `/system/dept/roleDeptTreeSelect/${roleId}`,
method: 'get',
url: `/system/dept/tree/role/${roleId}`,
method: 'GET',
});
}

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: 'post',
data: query,
method: 'GET',
params: 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 dictCode 字典代码值
* @param id 字典代码值
* @returns object
*/
export function getData(dictCode: string | number) {
export function getData(id: string | number) {
return request({
url: `/system/dict/data/${dictCode}`,
method: 'get',
url: `/system/dict/data/${id}`,
method: 'GET',
});
}
@@ -47,7 +47,7 @@ export function getData(dictCode: 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 dictCode 字典代码值
* @param id 字典代码值
* @returns object
*/
export function delData(dictCode: string | number) {
export function delData(id: string | number) {
return request({
url: `/system/dict/data/${dictCode}`,
method: 'delete',
url: `/system/dict/data/${id}`,
method: 'DELETE',
});
}
@@ -85,6 +85,6 @@ export function delData(dictCode: string | number) {
export function getDictDataType(dictType: string) {
return request({
url: `/system/dict/data/type/${dictType}`,
method: 'get',
method: 'GET',
});
}

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: 'post',
data: query,
method: 'GET',
params: 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 dictCode 字典代码值
* @param id 字典代码值
* @returns object
*/
export function delType(dictId: string | number) {
export function delType(id: string | number) {
return request({
url: `/system/dict/type/${dictId}`,
method: 'delete',
url: `/system/dict/type/${id}`,
method: 'DELETE',
});
}
@@ -84,8 +84,8 @@ export function delType(dictId: string | number) {
*/
export function refreshCache() {
return request({
url: '/system/dict/type/refreshCache',
method: 'put',
url: '/system/dict/type/refresh',
method: 'PUT',
});
}
@@ -94,9 +94,9 @@ export function refreshCache() {
* @param data 字典数据对象
* @returns object
*/
export function getDictOptionselect() {
export function getDictOption() {
return request({
url: '/system/dict/type/getDictOptionselect',
method: 'get',
url: '/system/dict/type/options',
method: 'GET',
});
}

View File

@@ -10,8 +10,8 @@ export function exportSysLogLogin(
) {
return request({
url: '/system/log/login/export',
method: 'post',
data: query,
method: 'GET',
params: 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',
});
}

View File

@@ -10,8 +10,8 @@ export function exportSysLogOperate(
) {
return request({
url: '/system/log/operate/export',
method: 'post',
data: query,
method: 'GET',
params: 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',
});
}

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/treeSelect',
method: 'get',
url: '/system/menu/tree',
method: 'GET',
});
}
@@ -41,10 +41,10 @@ export function menuTreeSelect() {
* @param roleId 角色ID
* @returns object
*/
export function roleMenuTreeSelect(roleId: string | number) {
export function menuTreeSelectRole(roleId: string | number) {
return request({
url: `/system/menu/roleMenuTreeSelect/${roleId}`,
method: 'get',
url: `/system/menu/tree/role/${roleId}`,
method: 'GET',
});
}
@@ -56,7 +56,7 @@ export function roleMenuTreeSelect(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',
});
}

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: 'post',
data: query,
method: 'GET',
params: 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',
});
}

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,

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,24 +73,21 @@ 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 status 角色状态
* @param statusFlag 角色状态
* @returns object
*/
export function changeRoleStatus(roleId: string, status: string | number) {
export function changeRoleStatus(roleId: string, statusFlag: string | number) {
return request({
url: '/system/role/changeStatus',
method: 'put',
data: {
roleId,
status,
},
url: '/system/role/status',
method: 'PUT',
data: { roleId, statusFlag },
});
}
@@ -101,8 +98,8 @@ export function changeRoleStatus(roleId: string, status: string | number) {
*/
export function dataScope(data: Record<string, any>) {
return request({
url: '/system/role/dataScope',
method: 'put',
url: '/system/role/data-scope',
method: 'PUT',
data: data,
});
}
@@ -112,10 +109,10 @@ export function dataScope(data: Record<string, any>) {
* @param query 查询参数
* @returns object
*/
export function authUserAllocatedList(query: Record<string, any>) {
export function authUserList(query: Record<string, any>) {
return request({
url: '/system/role/authUser/allocatedList',
method: 'get',
url: '/system/role/user/list',
method: 'GET',
params: query,
});
}
@@ -127,8 +124,8 @@ export function authUserAllocatedList(query: Record<string, any>) {
*/
export function authUserChecked(data: Record<string, any>) {
return request({
url: '/system/role/authUser/checked',
method: 'put',
url: '/system/role/user/auth',
method: 'PUT',
data: data,
});
}

View File

@@ -5,12 +5,11 @@ import { request } from '@/plugins/http-fetch';
* @param data 表单数据对象
* @returns object
*/
export function importData(data: FormData) {
export function importData(filePath: string, update: boolean) {
return request({
url: '/system/user/importData',
method: 'post',
data,
dataType: 'form-data',
url: '/system/user/import',
method: 'POST',
data: { filePath, update },
timeout: 180_000,
});
}
@@ -21,8 +20,8 @@ export function importData(data: FormData) {
*/
export function importTemplate() {
return request({
url: '/system/user/importTemplate',
method: 'get',
url: '/system/user/import/template',
method: 'GET',
responseType: 'blob',
});
}
@@ -35,8 +34,8 @@ export function importTemplate() {
export function exportUser(query: Record<string, any>) {
return request({
url: '/system/user/export',
method: 'post',
data: query,
method: 'GET',
params: query,
responseType: 'blob',
});
}
@@ -49,7 +48,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,
});
}
@@ -62,7 +61,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',
});
}
@@ -74,7 +73,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,
});
}
@@ -87,7 +86,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,
});
}
@@ -100,7 +99,7 @@ export function updateUser(data: Record<string, any>) {
export function delUser(userId: string | number) {
return request({
url: `/system/user/${userId}`,
method: 'delete',
method: 'DELETE',
});
}
@@ -112,8 +111,8 @@ export function delUser(userId: string | number) {
*/
export function resetUserPwd(userId: string | number, password: string) {
return request({
url: '/system/user/resetPwd',
method: 'put',
url: '/system/user/password',
method: 'PUT',
data: {
userId,
password,
@@ -124,19 +123,16 @@ export function resetUserPwd(userId: string | number, password: string) {
/**
* 用户状态修改
* @param userId 用户ID
* @param status 变更状态值
* @param statusFlag 变更状态值
* @returns object
*/
export function changeUserStatus(
userId: string | number,
status: string | number
statusFlag: string | number
) {
return request({
url: '/system/user/changeStatus',
method: 'put',
data: {
userId,
status,
},
url: '/system/user/status',
method: 'PUT',
data: { userId, statusFlag },
});
}

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,
@@ -169,7 +169,7 @@ export async function uploadFileChunk(
export function chunkCheck(identifier: string, fileName: string) {
return request({
url: '/file/chunkCheck',
method: 'post',
method: 'POST',
data: { identifier, fileName },
timeout: 60_000,
});
@@ -189,7 +189,7 @@ export function chunkMerge(
) {
return request({
url: '/file/chunkMerge',
method: 'post',
method: 'POST',
data: { identifier, fileName, subPath },
timeout: 60_000,
});
@@ -203,7 +203,7 @@ export function chunkMerge(
export function chunkUpload(data: FormData) {
return request({
url: '/file/chunkUpload',
method: 'post',
method: 'POST',
data,
dataType: 'form-data',
timeout: 60_000,
@@ -217,7 +217,7 @@ export function chunkUpload(data: FormData) {
export function transferStaticFile(data: Record<string, any>) {
return request({
url: `/file/transferStaticFile`,
method: 'post',
method: 'POST',
data,
timeout: 60_000,
});
@@ -241,7 +241,7 @@ 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.fileName,
neType,

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,
});

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listNeFiles(query: Record<string, any>) {
return request({
url: '/ne/action/files',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listNeFiles(query: Record<string, any>) {
export function getNeFile(query: Record<string, any>) {
return request({
url: '/ne/action/pullFile',
method: 'get',
method: 'GET',
params: query,
responseType: 'blob',
timeout: 180_000,
@@ -32,7 +32,7 @@ export function getNeFile(query: Record<string, any>) {
export function getNeDirZip(data: Record<string, any>) {
return request({
url: '/ne/action/pullDirZip',
method: 'get',
method: 'GET',
params: data,
responseType: 'blob',
timeout: 60_000,
@@ -43,7 +43,7 @@ export function getNeDirZip(data: Record<string, any>) {
export function getNeViewFile(data: Record<string, any>) {
return request({
url: '/ne/action/viewFile',
method: 'get',
method: 'GET',
params: data,
timeout: 60_000,
});

View File

@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
export function pingV(data: Record<string, string>) {
return request({
url: '/tool/ping/v',
method: 'get',
method: 'GET',
params: data,
});
}

View File

@@ -1,60 +1,16 @@
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 listTraceData(query: Record<string, any>) {
let totalSQL = 'select count(*) as total from trace_data where 1=1 ';
let rowsSQL = 'select * from trace_data where 1=1 ';
// 查询
let querySQL = '';
if (query.imsi) {
querySQL += ` and imsi like '%${query.imsi}%' `;
}
if (query.msisdn) {
querySQL += ` and msisdn like '%${query.msisdn}%' `;
}
// 分页
const pageNum = (query.pageNum - 1) * query.pageSize;
const limtSql = ` limit ${pageNum},${query.pageSize} `;
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/omc_db/trace_data`,
method: 'get',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + limtSql,
},
return request({
url: '/trace/task/list',
method: 'GET',
params: query,
});
// 解析数据
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['trace_data'];
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;
}
/**
@@ -65,7 +21,7 @@ export async function listTraceData(query: Record<string, any>) {
export function getTraceRawInfo(id: Record<string, string>) {
return request({
url: `/api/rest/traceManagement/v1/decMessage/${id}`,
method: 'get',
method: 'GET',
responseType: 'text',
});
}

View File

@@ -7,7 +7,7 @@ import { request } from '@/plugins/http-fetch';
export function packetDevices() {
return request({
url: '/trace/packet/devices',
method: 'get',
method: 'GET',
});
}
@@ -19,7 +19,7 @@ export function packetDevices() {
export function packetStart(data: Record<string, any>) {
return request({
url: '/trace/packet/start',
method: 'post',
method: 'POST',
data: data,
});
}
@@ -32,7 +32,7 @@ export function packetStart(data: Record<string, any>) {
export function packetStop(taskNo: string) {
return request({
url: '/trace/packet/stop',
method: 'post',
method: 'POST',
data: { taskNo },
});
}
@@ -45,7 +45,7 @@ export function packetStop(taskNo: string) {
export function packetFilter(taskNo: string, expr: string) {
return request({
url: '/trace/packet/filter',
method: 'put',
method: 'PUT',
data: { taskNo, expr },
});
}
@@ -58,7 +58,7 @@ export function packetFilter(taskNo: string, expr: string) {
export function packetKeep(taskNo: string, duration: number = 120) {
return request({
url: '/trace/packet/keep-alive',
method: 'put',
method: 'PUT',
data: { taskNo, duration },
});
}

View File

@@ -4,7 +4,7 @@ import { request } from '@/plugins/http-fetch';
export function dumpStart(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/start',
method: 'post',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -14,7 +14,7 @@ export function dumpStart(data: Record<string, string>) {
export function dumpStop(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/stop',
method: 'post',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -24,7 +24,7 @@ export function dumpStop(data: Record<string, string>) {
export function traceUPF(data: Record<string, string>) {
return request({
url: '/trace/tcpdump/upf',
method: 'post',
method: 'POST',
data: data,
timeout: 60_000,
});

View File

@@ -10,7 +10,7 @@ import { parseObjLineToHump } from '@/utils/parse-utils';
export async function listTraceTask(query: Record<string, any>) {
return request({
url: '/trace/task/list',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -23,7 +23,7 @@ export async function listTraceTask(query: Record<string, any>) {
export async function getTraceTask(id: string | number) {
return request({
url: `/trace/task/${id}`,
method: 'get',
method: 'GET',
});
}
@@ -35,7 +35,7 @@ export async function getTraceTask(id: string | number) {
export function addTraceTask(data: Record<string, any>) {
return request({
url: `/trace/task`,
method: 'post',
method: 'POST',
data: data,
});
}
@@ -48,7 +48,7 @@ export function addTraceTask(data: Record<string, any>) {
export function updateTraceTask(data: Record<string, any>) {
return request({
url: `/trace/task`,
method: 'put',
method: 'PUT',
data: data,
});
}
@@ -61,7 +61,7 @@ export function updateTraceTask(data: Record<string, any>) {
export async function delTraceTask(ids: string) {
return request({
url: `/trace/task/${ids}`,
method: 'delete',
method: 'DELETE',
});
}
@@ -73,7 +73,7 @@ export async function delTraceTask(ids: string) {
export function filePullTask(traceId: string) {
return request({
url: '/trace/task/filePull',
method: 'get',
method: 'GET',
params: { traceId },
responseType: 'blob',
timeout: 60_000,
@@ -88,7 +88,7 @@ export async function getNeTraceInterfaceAll() {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/elementType/omc_db/objectType/ne_info`,
method: 'get',
method: 'GET',
params: {
SQL: `SELECT ne_type,interface FROM trace_info GROUP BY ne_type,interface`,
},

View File

@@ -8,7 +8,7 @@ import { request } from '@/plugins/http-fetch';
export function listTaskHLR(query: Record<string, any>) {
return request({
url: '/trace/task/hlr/list',
method: 'get',
method: 'GET',
params: query,
});
}
@@ -21,7 +21,7 @@ export function listTaskHLR(query: Record<string, any>) {
export function delTaskHLR(ids: string | number) {
return request({
url: `/trace/task/hlr/${ids}`,
method: 'delete',
method: 'DELETE',
timeout: 60_000,
});
}
@@ -34,7 +34,7 @@ export function delTaskHLR(ids: string | number) {
export function startTaskHLR(data: Record<string, any>) {
return request({
url: '/trace/task/hlr/start',
method: 'post',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -48,7 +48,7 @@ export function startTaskHLR(data: Record<string, any>) {
export function stopTaskHLR(data: Record<string, any>) {
return request({
url: '/trace/task/hlr/stop',
method: 'post',
method: 'POST',
data: data,
timeout: 60_000,
});
@@ -62,7 +62,7 @@ export function stopTaskHLR(data: Record<string, any>) {
export function fileTaskHLR(data: Record<string, any>) {
return request({
url: '/trace/task/hlr/file',
method: 'post',
method: 'POST',
data: data,
});
}
@@ -75,7 +75,7 @@ export function fileTaskHLR(data: Record<string, any>) {
export function filePullTaskHLR(query: Record<string, any>) {
return request({
url: '/trace/task/hlr/filePull',
method: 'get',
method: 'GET',
params: query,
responseType: 'blob',
timeout: 60_000,

View File

@@ -1,5 +1,5 @@
/**令牌-数据响应字段 */
export const TOKEN_RESPONSE_FIELD = 'access_token';
export const TOKEN_RESPONSE_FIELD = 'accessToken';
/**令牌-请求头标识前缀 */
export const TOKEN_KEY_PREFIX = 'Bearer ';

View File

@@ -1,7 +1,10 @@
import Cookies from 'js-cookie';
import { TOKEN_COOKIE } from '@/constants/token-constants';
import { localRemove, localSet } from '@/utils/cache-local-utils';
import { CACHE_LOCAL_LOCK_PASSWD, CACHE_LOCAL_MASK } from '@/constants/cache-keys-constants';
import {
CACHE_LOCAL_LOCK_PASSWD,
CACHE_LOCAL_MASK,
} from '@/constants/cache-keys-constants';
/**获取cookis中Token字符串 */
export function getToken(): string {
@@ -10,7 +13,7 @@ export function getToken(): string {
/**设置cookis中Token字符串 */
export function setToken(token: string): void {
Cookies.set(TOKEN_COOKIE, token);
Cookies.set(TOKEN_COOKIE, token || '');
localSet(CACHE_LOCAL_MASK, 'none');
}

View File

@@ -61,7 +61,7 @@ type OptionsType = {
/**请求地址 */
url: string;
/**请求方法 */
method: 'get' | 'post' | 'put' | 'delete' | 'PATCH';
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
/**请求头 */
headers?: HeadersInit;
/**地址栏参数 */
@@ -101,7 +101,7 @@ const FATCH_OPTIONS: OptionsType = {
baseUrl: baseUrl,
timeout: 10_000,
url: '',
method: 'get',
method: 'GET',
headers: {
[APP_REQUEST_HEADER_CODE]: import.meta.env.VITE_APP_CODE,
[APP_REQUEST_HEADER_VERSION]: import.meta.env.VITE_APP_VERSION,
@@ -195,7 +195,7 @@ function beforeRequest(options: OptionsType): OptionsType | Promise<any> {
}
}
if (options.method === 'get') return options;
if (options.method === 'GET') return options;
// 非get参数提交
let body = options.data;