fix: use existing dict option API in im views

This commit is contained in:
richjohnrambo
2026-09-03 14:53:26 +08:00
parent 82675c7500
commit 5a2ed4b2a4
23 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -121,7 +121,7 @@
const submitLoading = ref(false); const submitLoading = ref(false);
const formValue = ref<State>(newState(null)); const formValue = ref<State>(newState(null));
const dialogWidth = computed(() => adaModalWidth(560)); const dialogWidth = computed(() => adaModalWidth(560));
const targetTypeOptions = computed(() => dict.getOptions('ImAbuseTargetTypeOptions')); const targetTypeOptions = dict.getOption('ImAbuseTargetTypeOptions');
const currentTenantReady = computed( const currentTenantReady = computed(
() => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId () => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId
); );
+2 -2
View File
@@ -51,7 +51,7 @@ export const schemas = ref<FormSchema[]>([
label: '对象', label: '对象',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImAbuseTargetTypeOptions')), options: dict.getOption('ImAbuseTargetTypeOptions'),
placeholder: '请选择对象类型', placeholder: '请选择对象类型',
}, },
}, },
@@ -70,7 +70,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImAbuseReasonEnabledOptions')), options: dict.getOption('ImAbuseReasonEnabledOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+2 -2
View File
@@ -138,8 +138,8 @@
const submitLoading = ref(false); const submitLoading = ref(false);
const formValue = ref<State>(newState(null)); const formValue = ref<State>(newState(null));
const dialogWidth = computed(() => adaModalWidth(720)); const dialogWidth = computed(() => adaModalWidth(720));
const platformOptions = computed(() => dict.getOptions('ImAppPlatformOptions')); const platformOptions = dict.getOption('ImAppPlatformOptions');
const updateTypeOptions = computed(() => dict.getOptions('ImAppUpdateTypeOptions')); const updateTypeOptions = dict.getOption('ImAppUpdateTypeOptions');
const currentTenantReady = computed( const currentTenantReady = computed(
() => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId () => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId
); );
+1 -1
View File
@@ -55,7 +55,7 @@ export const schemas = ref<FormSchema[]>([
label: '平台', label: '平台',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImAppPlatformOptions')), options: dict.getOption('ImAppPlatformOptions'),
placeholder: '请选择平台', placeholder: '请选择平台',
}, },
}, },
+1 -1
View File
@@ -59,7 +59,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImKafkaDeadLetterStatusOptions')), options: dict.getOption('ImKafkaDeadLetterStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -55,7 +55,7 @@ export const schemas = ref<FormSchema[]>([
label: '服务', label: '服务',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImExternalServiceOptions')), options: dict.getOption('ImExternalServiceOptions'),
placeholder: '请选择服务', placeholder: '请选择服务',
}, },
}, },
+2 -2
View File
@@ -70,7 +70,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImFileStatusOptions')), options: dict.getOption('ImFileStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
@@ -80,7 +80,7 @@ export const schemas = ref<FormSchema[]>([
label: '用途', label: '用途',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImFilePurposeOptions')), options: dict.getOption('ImFilePurposeOptions'),
placeholder: '请选择用途', placeholder: '请选择用途',
}, },
}, },
+3 -3
View File
@@ -51,7 +51,7 @@ export const schemas = ref<FormSchema[]>([
label: '用途', label: '用途',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImFilePurposeOptions')), options: dict.getOption('ImFilePurposeOptions'),
placeholder: '请选择用途', placeholder: '请选择用途',
}, },
}, },
@@ -61,7 +61,7 @@ export const schemas = ref<FormSchema[]>([
label: '自动清理', label: '自动清理',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImFilePolicySwitchOptions')), options: dict.getOption('ImFilePolicySwitchOptions'),
placeholder: '请选择开关', placeholder: '请选择开关',
}, },
}, },
@@ -71,7 +71,7 @@ export const schemas = ref<FormSchema[]>([
label: '病毒扫描', label: '病毒扫描',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImFilePolicySwitchOptions')), options: dict.getOption('ImFilePolicySwitchOptions'),
placeholder: '请选择开关', placeholder: '请选择开关',
}, },
}, },
+2 -2
View File
@@ -144,7 +144,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImGroupStateOptions')), options: dict.getOption('ImGroupStateOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
@@ -154,7 +154,7 @@ export const schemas = ref<FormSchema[]>([
label: '业务状态', label: '业务状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImGroupStatusOptions')), options: dict.getOption('ImGroupStatusOptions'),
placeholder: '请选择业务状态', placeholder: '请选择业务状态',
}, },
}, },
+1 -1
View File
@@ -85,7 +85,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImAdminCommandStatusOptions')), options: dict.getOption('ImAdminCommandStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -115,7 +115,7 @@
const submitLoading = ref(false); const submitLoading = ref(false);
const formValue = ref<State>(newState(null)); const formValue = ref<State>(newState(null));
const dialogWidth = computed(() => adaModalWidth(720)); const dialogWidth = computed(() => adaModalWidth(720));
const statusOptions = computed(() => dict.getOptions('ImNotificationTemplateStatusOptions')); const statusOptions = dict.getOption('ImNotificationTemplateStatusOptions');
const sceneLabel = computed( const sceneLabel = computed(
() => dict.getLabel('ImNotificationSceneOptions', formValue.value.scene) || formValue.value.name () => dict.getLabel('ImNotificationSceneOptions', formValue.value.scene) || formValue.value.name
); );
+2 -2
View File
@@ -53,7 +53,7 @@ export const schemas = ref<FormSchema[]>([
label: '场景', label: '场景',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImNotificationSceneOptions')), options: dict.getOption('ImNotificationSceneOptions'),
placeholder: '请选择场景', placeholder: '请选择场景',
}, },
}, },
@@ -63,7 +63,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImNotificationTemplateStatusOptions')), options: dict.getOption('ImNotificationTemplateStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+2 -2
View File
@@ -256,8 +256,8 @@
tenantSchema.ifShow = () => isPlatformAdmin.value; tenantSchema.ifShow = () => isPlatformAdmin.value;
} }
const departmentStateOptions = computed(() => dict.getOptions('ImOrgDepartmentStateOptions')); const departmentStateOptions = dict.getOption('ImOrgDepartmentStateOptions');
const employmentStateOptions = computed(() => dict.getOptions('ImOrgEmploymentStateOptions')); const employmentStateOptions = dict.getOption('ImOrgEmploymentStateOptions');
const parentDepartmentOptions = computed(() => [ const parentDepartmentOptions = computed(() => [
{ label: '根部门', value: 'root' }, { label: '根部门', value: 'root' },
...departmentOptions.value.filter((item) => item.value !== departmentForm.value.departmentId), ...departmentOptions.value.filter((item) => item.value !== departmentForm.value.departmentId),
+2 -2
View File
@@ -92,7 +92,7 @@ export const departmentSchemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImOrgDepartmentStateOptions')), options: dict.getOption('ImOrgDepartmentStateOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
@@ -111,7 +111,7 @@ export const memberSchemas = ref<FormSchema[]>([
label: '在职状态', label: '在职状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImOrgEmploymentStateOptions')), options: dict.getOption('ImOrgEmploymentStateOptions'),
placeholder: '请选择在职状态', placeholder: '请选择在职状态',
}, },
}, },
+2 -2
View File
@@ -58,7 +58,7 @@ export const schemas = ref<FormSchema[]>([
defaultValue: 'business', defaultValue: 'business',
componentProps: { componentProps: {
clearable: false, clearable: false,
options: computed(() => dict.getOptions('ImOutboxSourceOptions')), options: dict.getOption('ImOutboxSourceOptions'),
placeholder: '请选择来源', placeholder: '请选择来源',
}, },
}, },
@@ -68,7 +68,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImOutboxStatusOptions')), options: dict.getOption('ImOutboxStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -67,7 +67,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImRealnameStatusOptions')), options: dict.getOption('ImRealnameStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -43,7 +43,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImTaskDashboardStatusOptions')), options: dict.getOption('ImTaskDashboardStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -126,7 +126,7 @@
const dialogWidth = computed(() => { const dialogWidth = computed(() => {
return adaModalWidth(840); return adaModalWidth(840);
}); });
const stateOptions = computed(() => dict.getOptions('ImTenantStateOptions')); const stateOptions = dict.getOption('ImTenantStateOptions');
// 提交表单 // 提交表单
function confirmForm(e) { function confirmForm(e) {
+1 -1
View File
@@ -117,7 +117,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImTenantStateOptions')), options: dict.getOption('ImTenantStateOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -115,7 +115,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImUserStateOptions')), options: dict.getOption('ImUserStateOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+1 -1
View File
@@ -83,7 +83,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImWorkOrderStatusOptions')), options: dict.getOption('ImWorkOrderStatusOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },
+2 -2
View File
@@ -138,8 +138,8 @@
const tableRows = ref<State[]>([]); const tableRows = ref<State[]>([]);
const formValue = ref<State>(newState(null)); const formValue = ref<State>(newState(null));
const dialogWidth = computed(() => adaModalWidth(640)); const dialogWidth = computed(() => adaModalWidth(640));
const routeOptions = computed(() => dict.getOptions('ImWorkbenchRouteOptions')); const routeOptions = dict.getOption('ImWorkbenchRouteOptions');
const permissionOptions = computed(() => dict.getOptions('ImWorkbenchPermissionOptions')); const permissionOptions = dict.getOption('ImWorkbenchPermissionOptions');
const currentTenantReady = computed( const currentTenantReady = computed(
() => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId () => !isPlatformAdmin.value || !!searchFormRef.value?.formModel?.tenantId
); );
+1 -1
View File
@@ -71,7 +71,7 @@ export const schemas = ref<FormSchema[]>([
label: '状态', label: '状态',
componentProps: { componentProps: {
clearable: true, clearable: true,
options: computed(() => dict.getOptions('ImWorkbenchAppEnabledOptions')), options: dict.getOption('ImWorkbenchAppEnabledOptions'),
placeholder: '请选择状态', placeholder: '请选择状态',
}, },
}, },