feat: license管理模块添加
This commit is contained in:
58
apps/web-antd/src/api/license/license/index.ts
Normal file
58
apps/web-antd/src/api/license/license/index.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace LicenseApi {
|
||||
/** License信息 */
|
||||
export interface License {
|
||||
id: number; // 主键
|
||||
customerId?: number; // 客户ID
|
||||
projectId?: number; // 项目ID
|
||||
sn?: string; // sn
|
||||
expirationTime: Dayjs | string; // 到期时间
|
||||
neSwitch: string; // 网元开关
|
||||
userNum: number; // 用户数
|
||||
baseStationNum: number; // 基站数
|
||||
activationCode: string; // 激活码
|
||||
licenseContent: string; // License内容
|
||||
applicant: number; // 申请人
|
||||
approver: number; // 审批人
|
||||
status: number; // 状态
|
||||
remark: string; // 备注
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询License分页 */
|
||||
export function getLicensePage(params: PageParam) {
|
||||
return requestClient.get<PageResult<LicenseApi.License>>(
|
||||
'/license/license/page',
|
||||
{ params },
|
||||
);
|
||||
}
|
||||
|
||||
/** 查询License详情 */
|
||||
export function getLicense(id: number) {
|
||||
return requestClient.get<LicenseApi.License>(`/license/license/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 新增License */
|
||||
export function createLicense(data: LicenseApi.License) {
|
||||
return requestClient.post('/license/license/create', data);
|
||||
}
|
||||
|
||||
/** 修改License */
|
||||
export function updateLicense(data: LicenseApi.License) {
|
||||
return requestClient.put('/license/license/update', data);
|
||||
}
|
||||
|
||||
/** 删除License */
|
||||
export function deleteLicense(id: number) {
|
||||
return requestClient.delete(`/license/license/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出License */
|
||||
export function exportLicense(params: any) {
|
||||
return requestClient.download('/license/license/export-excel', params);
|
||||
}
|
||||
Reference in New Issue
Block a user