diff --git a/apps/web-antd/src/views/system/mail/log/data.ts b/apps/web-antd/src/views/system/mail/log/data.ts index 2d568850e..4e677b70f 100644 --- a/apps/web-antd/src/views/system/mail/log/data.ts +++ b/apps/web-antd/src/views/system/mail/log/data.ts @@ -4,13 +4,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 { getSimpleMailAccountList } from '#/api/system/mail/account'; import { DictTag } from '#/components/dict-tag'; -import { DICT_TYPE } from '@vben/constants'; -import { getDictOptions } from '@vben/hooks'; - import { getRangePickerDefaultProps } from '#/utils'; /** 列表的搜索表单 */ @@ -84,22 +83,24 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'id', title: '编号', + minWidth: 100, }, { field: 'sendTime', title: '发送时间', + minWidth: 180, formatter: 'formatDateTime', }, { field: 'userType', title: '接收用户', - width: 150, + minWidth: 150, slots: { default: 'userInfo' }, }, { field: 'toMails', title: '接收信息', - width: 300, + minWidth: 300, formatter: ({ row }) => { const lines: string[] = []; if (row.toMails && row.toMails.length > 0) { @@ -117,18 +118,22 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'templateTitle', title: '邮件标题', + minWidth: 120, }, { field: 'templateContent', title: '邮件内容', + minWidth: 300, }, { field: 'fromMail', title: '发送邮箱', + minWidth: 120, }, { field: 'sendStatus', title: '发送状态', + minWidth: 120, cellRender: { name: 'CellDict', props: { type: DICT_TYPE.SYSTEM_MAIL_SEND_STATUS }, @@ -137,6 +142,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'templateCode', title: '模板编码', + minWidth: 120, }, { title: '操作', diff --git a/apps/web-antd/src/views/system/mail/log/index.vue b/apps/web-antd/src/views/system/mail/log/index.vue index 9bf683559..9d0584e9a 100644 --- a/apps/web-antd/src/views/system/mail/log/index.vue +++ b/apps/web-antd/src/views/system/mail/log/index.vue @@ -8,6 +8,7 @@ import { DICT_TYPE } from '@vben/constants'; import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; import { getMailLogPage } from '#/api/system/mail/log'; import { DictTag } from '#/components/dict-tag'; +import { $t } from '#/locales'; import { useGridColumns, useGridFormSchema } from './data'; import Detail from './modules/detail.vue'; @@ -18,7 +19,7 @@ const [DetailModal, detailModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -48,6 +49,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -62,7 +64,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ - +