chore: 租户套餐demo
This commit is contained in:
47
apps/web-antd/src/api/system/tenant-package/index.ts
Normal file
47
apps/web-antd/src/api/system/tenant-package/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { TenantPackage } from './model';
|
||||
|
||||
import type { ID, IDS, PageQuery } from '#/api/common';
|
||||
|
||||
import { commonExport } from '#/api/helper';
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
enum Api {
|
||||
packageChangeStatus = '/system/tenant/package/changeStatus',
|
||||
packageExport = '/system/tenant/package/export',
|
||||
packageList = '/system/tenant/package/list',
|
||||
packageSelectList = '/system/tenant/package/selectList',
|
||||
root = '/system/tenant/package',
|
||||
}
|
||||
|
||||
export function packageList(params?: PageQuery) {
|
||||
return requestClient.get<TenantPackage[]>(Api.packageList, { params });
|
||||
}
|
||||
|
||||
// 下拉框
|
||||
export function packageSelectList() {
|
||||
return requestClient.get<TenantPackage[]>(Api.packageSelectList);
|
||||
}
|
||||
|
||||
export function packageExport(data: any) {
|
||||
return commonExport(Api.packageExport, data);
|
||||
}
|
||||
|
||||
export function packageInfo(id: ID) {
|
||||
return requestClient.get<TenantPackage>(`${Api.root}/${id}`);
|
||||
}
|
||||
|
||||
export function packageAdd(data: any) {
|
||||
return requestClient.postWithMsg<void>(Api.root, data);
|
||||
}
|
||||
|
||||
export function packageUpdate(data: any) {
|
||||
return requestClient.putWithMsg<void>(Api.root, data);
|
||||
}
|
||||
|
||||
export function packageChangeStatus(data: any) {
|
||||
return requestClient.putWithMsg(Api.packageChangeStatus, data);
|
||||
}
|
||||
|
||||
export function packageRemove(ids: IDS) {
|
||||
return requestClient.deleteWithMsg(`${Api.root}/${ids}`);
|
||||
}
|
17
apps/web-antd/src/api/system/tenant-package/model.d.ts
vendored
Normal file
17
apps/web-antd/src/api/system/tenant-package/model.d.ts
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @description 租户套餐
|
||||
* @param packageId id
|
||||
* @param packageName 名称
|
||||
* @param menuIds 菜单id 格式为[1,2,3] 返回为string 提交为数组
|
||||
* @param remark 备注
|
||||
* @param menuCheckStrictly 是否关联父节点
|
||||
* @param status 状态
|
||||
*/
|
||||
export interface TenantPackage {
|
||||
packageId: string;
|
||||
packageName: string;
|
||||
menuIds: number[] | string;
|
||||
remark: string;
|
||||
menuCheckStrictly: boolean;
|
||||
status: string;
|
||||
}
|
Reference in New Issue
Block a user