|
|
@@ -5,7 +5,6 @@
|
|
|
<el-tree-select
|
|
|
v-model="currentTenant"
|
|
|
:data="options"
|
|
|
- clearable
|
|
|
check-strictly
|
|
|
placeholder="请选择租户"
|
|
|
@update:modelValue="handleChange"
|
|
|
@@ -24,19 +23,14 @@
|
|
|
value: string;
|
|
|
}
|
|
|
|
|
|
+ const userStore = useUserStore();
|
|
|
const { setValue, getValue } = useTargetTenantIdSetting();
|
|
|
-
|
|
|
const localTId = getValue();
|
|
|
-
|
|
|
- const currentTenant = ref(localTId ? Number(localTId) : '');
|
|
|
-
|
|
|
- const options = ref<TenantOption[]>([]);
|
|
|
-
|
|
|
- const userStore = useUserStore();
|
|
|
-
|
|
|
- const tenantName = computed(() => {
|
|
|
- return userStore.info.tenantName;
|
|
|
+ const tenantId = computed(() => {
|
|
|
+ return userStore.info.tenantId;
|
|
|
});
|
|
|
+ const currentTenant = ref(localTId ? Number(localTId) : Number(tenantId.value));
|
|
|
+ const options = ref<TenantOption[]>([]);
|
|
|
|
|
|
onMounted(() => {
|
|
|
queryListTenant().then((res) => {
|
|
|
@@ -47,7 +41,7 @@
|
|
|
|
|
|
const handleChange = (targetTenantId: string) => {
|
|
|
setValue(targetTenantId);
|
|
|
- currentTenant.value = targetTenantId;
|
|
|
+ currentTenant.value = Number(targetTenantId) ;
|
|
|
window.location.reload();
|
|
|
};
|
|
|
</script>
|