|
@@ -20,6 +20,7 @@
|
|
|
import { queryListTenant } from '@/api/tenant';
|
|
import { queryListTenant } from '@/api/tenant';
|
|
|
import { useTargetTenantIdSetting } from '@/utils/useTargetTenantIdSetting';
|
|
import { useTargetTenantIdSetting } from '@/utils/useTargetTenantIdSetting';
|
|
|
import { replaceParams } from '@/utils/helper/treeHelper';
|
|
import { replaceParams } from '@/utils/helper/treeHelper';
|
|
|
|
|
+ import router from '@/router';
|
|
|
|
|
|
|
|
interface TenantOption {
|
|
interface TenantOption {
|
|
|
label: string;
|
|
label: string;
|
|
@@ -58,11 +59,12 @@
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
})
|
|
})
|
|
|
- .then(() => {
|
|
|
|
|
|
|
+ .then(async () => {
|
|
|
setValue(targetTenantId);
|
|
setValue(targetTenantId);
|
|
|
currentTenant.value = Number(targetTenantId);
|
|
currentTenant.value = Number(targetTenantId);
|
|
|
// 统一返回首页
|
|
// 统一返回首页
|
|
|
- window.location.href = '/';
|
|
|
|
|
|
|
+ await router.push({ name: 'DashboardConsole' });
|
|
|
|
|
+ window.location.reload();
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
ElMessage({
|
|
ElMessage({
|