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
+3 -5
View File
@@ -200,7 +200,7 @@
groupId: { required: true, type: 'number', message: '请选择分组' },
};
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,
@@ -309,10 +309,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) });
await loadGroups();
reload();
});