feat: 超级管理员租户切换
This commit is contained in:
28
apps/web-antd/src/api/system/tenant/index.ts
Normal file
28
apps/web-antd/src/api/system/tenant/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { requestClient } from '#/api/request';
|
||||
|
||||
enum Api {
|
||||
root = '/system/tenant',
|
||||
tenantDynamic = '/system/tenant/dynamic',
|
||||
tenantDynamicClear = '/system/tenant/dynamic/clear',
|
||||
tenantExport = '/system/tenant/export',
|
||||
tenantList = '/system/tenant/list',
|
||||
tenantStatus = '/system/tenant/changeStatus',
|
||||
tenantSyncPackage = '/system/tenant/syncTenantPackage',
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态切换租户
|
||||
* @param tenantId 租户ID
|
||||
* @returns void
|
||||
*/
|
||||
export function tenantDynamicToggle(tenantId: string) {
|
||||
return requestClient.get<void>(`${Api.tenantDynamic}/${tenantId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除 动态切换租户
|
||||
* @returns void
|
||||
*/
|
||||
export function tenantDynamicClear() {
|
||||
return requestClient.get<void>(Api.tenantDynamicClear);
|
||||
}
|
16
apps/web-antd/src/api/system/tenant/model.d.ts
vendored
Normal file
16
apps/web-antd/src/api/system/tenant/model.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export interface Tenant {
|
||||
accountCount: number;
|
||||
address?: string;
|
||||
companyName: string;
|
||||
contactPhone: string;
|
||||
contactUserName: string;
|
||||
domain?: string;
|
||||
expireTime?: string;
|
||||
id: number;
|
||||
intro: string;
|
||||
licenseNumber?: any;
|
||||
packageId?: string;
|
||||
remark?: string;
|
||||
status: string;
|
||||
tenantId: string;
|
||||
}
|
Reference in New Issue
Block a user