diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts index d891db07..409ced63 100644 --- a/src/api/system/mail/log/index.ts +++ b/src/api/system/mail/log/index.ts @@ -4,7 +4,9 @@ export interface MailLogVO { id: number userId: number userType: number - toMail: string + toMails: string[] + ccMails?: string[] + bccMails?: string[] accountId: number fromMail: string templateId: number diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts index c6dae688..6e1d083f 100644 --- a/src/api/system/mail/template/index.ts +++ b/src/api/system/mail/template/index.ts @@ -14,7 +14,9 @@ export interface MailTemplateVO { } export interface MailSendReqVO { - mail: string + toMails: string[] + ccMails?: string[] + bccMails?: string[] templateCode: string templateParams: Map } @@ -46,7 +48,10 @@ export const deleteMailTemplate = async (id: number) => { // 批量删除邮件模版 export const deleteMailTemplateList = async (ids: number[]) => { - return await request.delete({ url: '/system/mail-template/delete-list', params: { ids: ids.join(',') } }) + return await request.delete({ + url: '/system/mail-template/delete-list', + params: { ids: ids.join(',') } + }) } // 发送邮件 diff --git a/src/views/system/mail/log/MailLogDetail.vue b/src/views/system/mail/log/MailLogDetail.vue index a7ec449b..37d757a3 100644 --- a/src/views/system/mail/log/MailLogDetail.vue +++ b/src/views/system/mail/log/MailLogDetail.vue @@ -13,12 +13,34 @@ {{ detailData.templateNickname }} - - {{ detailData.toMail }} + ({{ detailData.userId }}) + + + +
+
+ 收件: + + {{ mail }} + +
+
+ 抄送: + + {{ mail }} + +
+
+ 密送: + + {{ mail }} + +
+
{{ detailData.templateTitle }} @@ -58,7 +80,7 @@ defineOptions({ name: 'SystemMailLogDetail' }) const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 -const accountList = ref([]) // 邮箱账号列表 +const accountList = ref([]) // 邮箱账号列表 /** 打开弹窗 */ const open = async (data: MailLogApi.MailLogVO) => { diff --git a/src/views/system/mail/log/index.vue b/src/views/system/mail/log/index.vue index dd915e52..1bd794f5 100644 --- a/src/views/system/mail/log/index.vue +++ b/src/views/system/mail/log/index.vue @@ -119,12 +119,36 @@ width="180" :formatter="dateFormatter" /> - + + + + @@ -185,15 +209,15 @@ const queryParams = reactive({ pageNo: 1, pageSize: 10, toMail: '', - accountId: null, - templateId: null, - sendStatus: null, - userId: null, - userType: null, + accountId: undefined, + templateId: undefined, + sendStatus: undefined, + userId: undefined, + userType: undefined, sendTime: [] }) const exportLoading = ref(false) // 导出的加载中 -const accountList = ref([]) // 邮箱账号列表 +const accountList = ref([]) // 邮箱账号列表 /** 查询列表 */ const getList = async () => { diff --git a/src/views/system/mail/template/MailTemplateSendForm.vue b/src/views/system/mail/template/MailTemplateSendForm.vue index 6e4c918e..3decb448 100644 --- a/src/views/system/mail/template/MailTemplateSendForm.vue +++ b/src/views/system/mail/template/MailTemplateSendForm.vue @@ -10,8 +10,26 @@ - - + + + + + + + + { formData.value = { content: '', params: {}, - mail: '', + toMails: [], + ccMails: [], + bccMails: [], templateCode: '', templateParams: new Map() }