From c288098e103cc3ff7851cb40abe0878b9025c17e Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 5 Sep 2025 12:24:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A0=B4=E5=9D=8F=E6=80=A7?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dict=20=E6=8A=BD=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-ele/src/views/pay/wallet/rechargePackage/data.ts | 5 ++++- apps/web-ele/src/views/system/loginlog/data.ts | 3 ++- apps/web-ele/src/views/system/mail/log/data.ts | 4 +++- apps/web-ele/src/views/system/notify/message/data.ts | 4 +++- apps/web-ele/src/views/system/notify/my/data.ts | 4 +++- apps/web-ele/src/views/system/role/data.ts | 9 +++++++-- apps/web-ele/src/views/system/sms/log/data.ts | 4 +++- apps/web-ele/src/views/system/social/user/data.ts | 4 +++- 8 files changed, 28 insertions(+), 9 deletions(-) diff --git a/apps/web-ele/src/views/pay/wallet/rechargePackage/data.ts b/apps/web-ele/src/views/pay/wallet/rechargePackage/data.ts index 40c26316..aa5089f6 100644 --- a/apps/web-ele/src/views/pay/wallet/rechargePackage/data.ts +++ b/apps/web-ele/src/views/pay/wallet/rechargePackage/data.ts @@ -1,7 +1,10 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { VxeTableGridOptions } from '#/adapter/vxe-table'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; + +import { getRangePickerDefaultProps } from '#/utils'; /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { diff --git a/apps/web-ele/src/views/system/loginlog/data.ts b/apps/web-ele/src/views/system/loginlog/data.ts index f5d7e83d..e40f3111 100644 --- a/apps/web-ele/src/views/system/loginlog/data.ts +++ b/apps/web-ele/src/views/system/loginlog/data.ts @@ -3,8 +3,9 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemLoginLogApi } from '#/api/system/login-log'; import { useAccess } from '@vben/access'; +import { DICT_TYPE } from '@vben/constants'; -import { DICT_TYPE, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess(); diff --git a/apps/web-ele/src/views/system/mail/log/data.ts b/apps/web-ele/src/views/system/mail/log/data.ts index b2b11e00..1d24dcce 100644 --- a/apps/web-ele/src/views/system/mail/log/data.ts +++ b/apps/web-ele/src/views/system/mail/log/data.ts @@ -3,9 +3,11 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemMailLogApi } from '#/api/system/mail/log'; import { useAccess } from '@vben/access'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; import { getSimpleMailAccountList } from '#/api/system/mail/account'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess(); diff --git a/apps/web-ele/src/views/system/notify/message/data.ts b/apps/web-ele/src/views/system/notify/message/data.ts index f8150e26..981f7315 100644 --- a/apps/web-ele/src/views/system/notify/message/data.ts +++ b/apps/web-ele/src/views/system/notify/message/data.ts @@ -3,8 +3,10 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemNotifyMessageApi } from '#/api/system/notify/message'; import { useAccess } from '@vben/access'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess(); diff --git a/apps/web-ele/src/views/system/notify/my/data.ts b/apps/web-ele/src/views/system/notify/my/data.ts index d966980b..7f61ae8d 100644 --- a/apps/web-ele/src/views/system/notify/my/data.ts +++ b/apps/web-ele/src/views/system/notify/my/data.ts @@ -5,10 +5,12 @@ import type { DescriptionItemSchema } from '#/components/description'; import { h } from 'vue'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; import { formatDateTime } from '@vben/utils'; import { DictTag } from '#/components/dict-tag'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; /** 列表的搜索表单 */ export function useGridFormSchema(): VbenFormSchema[] { diff --git a/apps/web-ele/src/views/system/role/data.ts b/apps/web-ele/src/views/system/role/data.ts index 6eb14a88..dc737275 100644 --- a/apps/web-ele/src/views/system/role/data.ts +++ b/apps/web-ele/src/views/system/role/data.ts @@ -3,10 +3,15 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemRoleApi } from '#/api/system/role'; import { useAccess } from '@vben/access'; -import { CommonStatusEnum, SystemDataScopeEnum } from '@vben/constants'; +import { + CommonStatusEnum, + DICT_TYPE, + SystemDataScopeEnum, +} from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; import { z } from '#/adapter/form'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess(); diff --git a/apps/web-ele/src/views/system/sms/log/data.ts b/apps/web-ele/src/views/system/sms/log/data.ts index 27bc2294..048401ff 100644 --- a/apps/web-ele/src/views/system/sms/log/data.ts +++ b/apps/web-ele/src/views/system/sms/log/data.ts @@ -3,9 +3,11 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemSmsLogApi } from '#/api/system/sms/log'; import { useAccess } from '@vben/access'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; import { getSimpleSmsChannelList } from '#/api/system/sms/channel'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess(); diff --git a/apps/web-ele/src/views/system/social/user/data.ts b/apps/web-ele/src/views/system/social/user/data.ts index 9dacbf26..afa35d06 100644 --- a/apps/web-ele/src/views/system/social/user/data.ts +++ b/apps/web-ele/src/views/system/social/user/data.ts @@ -3,8 +3,10 @@ import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { SystemSocialUserApi } from '#/api/system/social/user'; import { useAccess } from '@vben/access'; +import { DICT_TYPE } from '@vben/constants'; +import { getDictOptions } from '@vben/hooks'; -import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; +import { getRangePickerDefaultProps } from '#/utils'; const { hasAccessByCodes } = useAccess();