feat: 超级管理员租户切换

This commit is contained in:
dap
2024-08-07 11:55:13 +08:00
parent 6ed3058689
commit 1e29c37036
6 changed files with 176 additions and 0 deletions

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

View 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;
}