diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts index 141816379..445e38712 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts @@ -118,9 +118,17 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { if (schemaItem?.isSearch || schemaItem.search?.show) { let itemRenderName = schemaItem?.search?.itemRender?.name || '$input' const options: any[] = [] - let itemRender: FormItemRenderOptions = { - name: itemRenderName, - props: { placeholder: t('common.inputText') } + let itemRender: FormItemRenderOptions + if (schemaItem.search?.itemRender) { + itemRender = schemaItem.search.itemRender + } else { + itemRender = { + name: itemRenderName, + props: + itemRenderName == '$input' + ? { placeholder: t('common.inputText') } + : { placeholder: t('common.selectText') } + } } if (schemaItem.dictType) { const allOptions = { label: '全部', value: '' } diff --git a/yudao-ui-admin-vue3/src/views/system/operatelog/operatelog.data.ts b/yudao-ui-admin-vue3/src/views/system/operatelog/operatelog.data.ts index fc386f59d..66d241d65 100644 --- a/yudao-ui-admin-vue3/src/views/system/operatelog/operatelog.data.ts +++ b/yudao-ui-admin-vue3/src/views/system/operatelog/operatelog.data.ts @@ -1,7 +1,10 @@ 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() // 国际化 + const crudSchemas = reactive({ primaryKey: 'id', primaryType: 'seq', @@ -60,8 +63,23 @@ const crudSchemas = reactive({ slots: { default: 'resultCode' } - }, - isSearch: true // TODO 星语:这里可能有点特殊,不确定好不好处理哈。管理后台返回的是错误码,最终前台展示的是 成功 or 失败,然后筛选页是这样的 + } + }, + { + title: '操作结果', + field: 'success', + isTable: false, + search: { + show: true, + itemRender: { + name: '$select', + props: { placeholder: t('common.selectText') }, + options: [ + { label: '成功', value: 'true' }, + { label: '失败', value: 'false' } + ] + } + } }, { title: '操作日期',