feat: 新增网元操作相关接口

This commit is contained in:
TsMask
2024-03-30 20:13:53 +08:00
parent 4eff5d48cd
commit fa14f50e2d
2 changed files with 110 additions and 2 deletions

108
src/api/ne/neLicense.ts Normal file
View File

@@ -0,0 +1,108 @@
import { request } from '@/plugins/http-fetch';
/**
* 查询网元授权列表
* @param query 查询参数
* @returns object
*/
export function listNeLicense(query: Record<string, any>) {
return request({
url: '/ne/license/list',
method: 'get',
params: query,
timeout: 60_000,
});
}
/**
* 查询网元授权详细
* @param licenseId 信息ID
* @returns object
*/
export function getNeLicense(licenseId: string | number) {
return request({
url: `/ne/license/${licenseId}`,
method: 'get',
});
}
/**
* 网元授权新增
* @param data 网元对象
* @returns object
*/
export function addNeLicense(data: Record<string, any>) {
return request({
url: `/ne/license`,
method: 'post',
data: data,
});
}
/**
* 网元授权修改
* @param data 网元对象
* @returns object
*/
export function updateNeLicense(data: Record<string, any>) {
return request({
url: `/ne/license`,
method: 'put',
data: data,
});
}
/**
* 网元授权删除
* @param id 信息ID
* @returns object
*/
export function delNeLicense(licenseIds: string | number) {
return request({
url: `/ne/license/${licenseIds}`,
method: 'delete',
timeout: 60_000,
});
}
/**
* 网元授权激活授权申请码
* @param neType 网元类型
* @param neId 网元id
* @returns object
*/
export function codeNeLicense(neType: string, neId: string) {
return request({
url: `/ne/license/code`,
method: 'get',
params: { neType, neId },
});
}
/**
* 网元授权激活授权文件替换
* @param data 网元对象
* @returns object
*/
export function changeNeLicense(data: Record<string, any>) {
return request({
url: `/ne/license/change`,
method: 'post',
data: data,
timeout: 180_000,
});
}
/**
* 网元授权激活状态
* @param neType 网元类型
* @param neId 网元id
* @returns object
*/
export function stateNeLicense(neType: string, neId: string) {
return request({
url: `/ne/license/state`,
method: 'get',
params: { neType, neId },
});
}

View File

@@ -70,9 +70,9 @@ export function delNeSoftware(softwareIds: string | number) {
* @param data 网元对象
* @returns object
*/
export function installCheckNeSoftware(data: Record<string, any>) {
export function checkInstallNeSoftware(data: Record<string, any>) {
return request({
url: `/ne/software/installCheck`,
url: `/ne/software/checkInstall`,
method: 'post',
data: data,
timeout: 180_000,