fix: show bound tenant in im menus
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user