fix: show bound tenant in im menus

This commit is contained in:
richjohnrambo
2026-09-16 16:54:12 +08:00
parent 156e8b9c9f
commit fe5c7af7e2
47 changed files with 401 additions and 437 deletions
+4 -6
View File
@@ -284,7 +284,7 @@
groupName: { required: true, message: '请输入分组名称', trigger: 'blur' },
};
const tenantSchema = schemas.value.find((v) => v.field === 'tenantId');
if (tenantSchema) tenantSchema.ifShow = () => userStore.isCompanyDept;
if (tenantSchema) tenantSchema.ifShow = () => true;
const [register, { setFieldsValue }] = useForm({
gridProps: { cols: '1 s:1 m:2 l:3 xl:4' },
labelWidth: 90,
@@ -335,7 +335,7 @@
}
async function fetchLoginIPWhitelist() {
const tenantId = currentTenantId();
if (userStore.isCompanyDept && tenantId <= 0) {
if (tenantId <= 0) {
return null;
}
return await LoginIPWhitelist({ tenantId });
@@ -479,10 +479,8 @@
}
onMounted(async () => {
loadOptions();
if (userStore.isCompanyDept) {
await loadPolicyTenantOptions(true);
await setFieldsValue({ tenantId: getDefaultTenantValue(policyTenantOptions.value) });
}
await loadPolicyTenantOptions(true);
await setFieldsValue({ tenantId: getDefaultTenantValue(policyTenantOptions.value) });
reloadTable();
});
</script>