feat:【system 系统功能】邮箱增加抄送、密送,支持多个
This commit is contained in:
@@ -91,9 +91,28 @@ export function useGridColumns<T = SystemMailLogApi.MailLog>(
|
||||
formatter: 'formatDateTime',
|
||||
},
|
||||
{
|
||||
field: 'toMail',
|
||||
title: '收件邮箱',
|
||||
minWidth: 160,
|
||||
field: 'userType',
|
||||
title: '接收用户',
|
||||
minWidth: 150,
|
||||
slots: { default: 'userInfo' },
|
||||
},
|
||||
{
|
||||
field: 'toMails',
|
||||
title: '接收信息',
|
||||
minWidth: 300,
|
||||
formatter: ({ row }) => {
|
||||
const lines: string[] = [];
|
||||
if (row.toMails && row.toMails.length > 0) {
|
||||
lines.push(`收件:${row.toMails.join('、')}`);
|
||||
}
|
||||
if (row.ccMails && row.ccMails.length > 0) {
|
||||
lines.push(`抄送:${row.ccMails.join('、')}`);
|
||||
}
|
||||
if (row.bccMails && row.bccMails.length > 0) {
|
||||
lines.push(`密送:${row.bccMails.join('、')}`);
|
||||
}
|
||||
return lines.join('\n');
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'templateTitle',
|
||||
|
||||
@@ -9,6 +9,8 @@ import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getMailLogPage } from '#/api/system/mail/log';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { DICT_TYPE } from '#/utils';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
import Detail from './modules/detail.vue';
|
||||
@@ -78,6 +80,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
|
||||
<DetailModal @success="onRefresh" />
|
||||
<Grid table-title="邮件日志列表">
|
||||
<template #userInfo="{ row }">
|
||||
<div v-if="row.userType && row.userId" class="flex items-center gap-1">
|
||||
<DictTag :type="DICT_TYPE.USER_TYPE" :value="row.userType" />
|
||||
<span>({{ row.userId }})</span>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
<template #toolbar-tools> </template>
|
||||
</Grid>
|
||||
</Page>
|
||||
|
||||
@@ -47,17 +47,31 @@ const [Modal, modalApi] = useVbenModal({
|
||||
<ElDescriptionsItem label="创建时间">
|
||||
{{ formatDateTime(formData?.createTime || '') }}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="收件邮箱">
|
||||
{{ formData?.toMail }}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="发送邮箱">
|
||||
{{ formData?.fromMail }}
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="用户编号">
|
||||
{{ formData?.userId }}
|
||||
<ElDescriptionsItem label="接收用户">
|
||||
<div
|
||||
v-if="formData?.userType && formData?.userId"
|
||||
class="flex items-center gap-1"
|
||||
>
|
||||
<DictTag :type="DICT_TYPE.USER_TYPE" :value="formData.userType" />
|
||||
<span>({{ formData.userId }})</span>
|
||||
</div>
|
||||
<div v-else>无</div>
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="用户类型">
|
||||
{{ formData?.userType }}
|
||||
<ElDescriptionsItem label="接收信息" :span="2">
|
||||
<div v-if="formData">
|
||||
<div v-if="formData.toMails && formData.toMails.length > 0">
|
||||
收件:{{ formData.toMails.join('、') }}
|
||||
</div>
|
||||
<div v-if="formData.ccMails && formData.ccMails.length > 0">
|
||||
抄送:{{ formData.ccMails.join('、') }}
|
||||
</div>
|
||||
<div v-if="formData.bccMails && formData.bccMails.length > 0">
|
||||
密送:{{ formData.bccMails.join('、') }}
|
||||
</div>
|
||||
</div>
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="模板编号">
|
||||
{{ formData?.templateId }}
|
||||
|
||||
Reference in New Issue
Block a user