feat: add tenant bound restriction for IM dashboard and management pages

1. extract isTenantBound utility from user store logic
2. add disabled state to tenant select components across all IM pages
3. update policy tenant options logic to hide global option for bound tenants
4. add backend scope validation for IM admin operations
This commit is contained in:
Austin
2026-09-22 11:34:40 +08:00
parent 40ac52923e
commit 0596599db9
31 changed files with 154 additions and 77 deletions
+2 -1
View File
@@ -2,7 +2,7 @@ import { computed, ref } from 'vue';
import { cloneDeep } from 'lodash-es';
import { FormSchema } from '@/components/Form';
import { useDictStore } from '@/store/modules/dict';
import { loadImTenantOptions } from '@/views/imTenantOptions';
import { isTenantBound, loadImTenantOptions } from '@/views/imTenantOptions';
const dict = useDictStore();
@@ -77,6 +77,7 @@ export const departmentSchemas = ref<FormSchema[]>([
componentProps: {
clearable: false,
options: computed(() => tenantOptions.value),
disabled: isTenantBound(),
placeholder: '请选择商户',
},
},