diff --git a/yudao-ui-admin-vue3/src/store/modules/dict.ts b/yudao-ui-admin-vue3/src/store/modules/dict.ts index 5e3722950..30442982f 100644 --- a/yudao-ui-admin-vue3/src/store/modules/dict.ts +++ b/yudao-ui-admin-vue3/src/store/modules/dict.ts @@ -3,10 +3,10 @@ import { store } from '../index' import { DictDataVO } from '@/api/system/dict/types' export interface DictValueType { - value: string | number | boolean + value: string label: string - clorType: string - cssClass: string + clorType?: string + cssClass?: string } export interface DictTypeType { dictType: string diff --git a/yudao-ui-admin-vue3/src/types/form.d.ts b/yudao-ui-admin-vue3/src/types/form.d.ts index 8673ec7d5..980c8cc6d 100644 --- a/yudao-ui-admin-vue3/src/types/form.d.ts +++ b/yudao-ui-admin-vue3/src/types/form.d.ts @@ -1,6 +1,5 @@ import type { CSSProperties } from 'vue' import { ColProps, ComponentProps, ComponentName } from '@/types/components' -import { FormValueType, FormValueType } from '@/types/form' import type { AxiosPromise } from 'axios' export type FormSetPropsType = { diff --git a/yudao-ui-admin-vue3/src/utils/dict.ts b/yudao-ui-admin-vue3/src/utils/dict.ts index a5d714abd..f1ab5a7bf 100644 --- a/yudao-ui-admin-vue3/src/utils/dict.ts +++ b/yudao-ui-admin-vue3/src/utils/dict.ts @@ -23,8 +23,11 @@ export interface DictDataType { export const getDictOptions = (dictType: string) => { const dictOptions: DictDataType[] = [] dictStore.getDictMap.forEach((dict: DictDataType) => { - if (dict.dictType + '' === dictType) { - dictOptions.push(dict) + if (dict.dictType.toString() === dictType) { + dictOptions.push({ + ...dict, + value: dict.value + }) } }) return dictOptions @@ -37,18 +40,17 @@ export const getIntDictOptions = (dictType: string) => { if (dict.dictType.toString() === dictType) { dictOptions.push({ ...dict, - value: dict.value + value: parseInt(dict.value + '') }) } }) - console.log(dictOptions) return dictOptions } export const getDictObj = (dictType: string, value: string | number | boolean) => { const dictOptions: DictDataType[] = getDictOptions(dictType) dictOptions.forEach((dict: DictDataType) => { - if (dict.value === value) { + if (dict.value === value.toString()) { return dict } }) diff --git a/yudao-ui-admin-vue3/src/views/system/loginlog/loginLog.data.ts b/yudao-ui-admin-vue3/src/views/system/loginlog/loginLog.data.ts index c08af0735..4ef2eb9c1 100644 --- a/yudao-ui-admin-vue3/src/views/system/loginlog/loginLog.data.ts +++ b/yudao-ui-admin-vue3/src/views/system/loginlog/loginLog.data.ts @@ -1,8 +1,6 @@ import { reactive } from 'vue' -import { useI18n } from '@/hooks/web/useI18n' import { DICT_TYPE } from '@/utils/dict' import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas' -const { t } = useI18n() // 国际化 // CrudSchema const crudSchemas = reactive({ @@ -16,10 +14,6 @@ const crudSchemas = reactive({ field: 'logType', dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE }, - { - title: '用户类型', - field: 'userType' - }, { title: '用户名称', field: 'username', @@ -40,10 +34,10 @@ const crudSchemas = reactive({ dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT }, { - title: t('common.createTime'), + title: '登录日期', field: 'createTime', formatter: 'formatDate', - isForm: false, + isSearch: true, search: { itemRender: { name: 'XDataTimePicker'