|
@@ -48,13 +48,13 @@
|
|
|
currentTenant.value = nextTenantId;
|
|
currentTenant.value = nextTenantId;
|
|
|
setValue(routeTenantId);
|
|
setValue(routeTenantId);
|
|
|
} else {
|
|
} else {
|
|
|
- currentTenant.value = getValue();
|
|
|
|
|
|
|
+ currentTenant.value = Number(getValue());
|
|
|
}
|
|
}
|
|
|
queryListTenant().then((res) => {
|
|
queryListTenant().then((res) => {
|
|
|
if (!res) return;
|
|
if (!res) return;
|
|
|
options.value = replaceParams(res || [], 'tenantName', 'id');
|
|
options.value = replaceParams(res || [], 'tenantName', 'id');
|
|
|
/** 如果当前租户没选中的话,默认选中第一个 */
|
|
/** 如果当前租户没选中的话,默认选中第一个 */
|
|
|
- if (!currentTenant.value) {
|
|
|
|
|
|
|
+ if (!currentTenant.value && res.length > 1) {
|
|
|
currentTenant.value = res[0].id;
|
|
currentTenant.value = res[0].id;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|