From ff7beb6db2ce31dcccb0cdff4b508d679d63ec58 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 5 Aug 2025 21:12:33 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90system=20=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=8A=9F=E8=83=BD=E3=80=91=E9=82=AE=E7=AE=B1=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8A=84=E9=80=81=E3=80=81=E5=AF=86=E9=80=81=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/mail/log/index.ts | 4 +- src/api/system/mail/template/index.ts | 9 +++- src/views/system/mail/log/MailLogDetail.vue | 28 +++++++++++-- src/views/system/mail/log/index.vue | 42 +++++++++++++++---- .../mail/template/MailTemplateSendForm.vue | 31 +++++++++++--- 5 files changed, 94 insertions(+), 20 deletions(-) diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts index d891db07c..409ced631 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 c6dae688a..6e1d083f2 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 a7ec449bb..37d757a3d 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 dd915e52f..1bd794f59 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 6e4c918e6..3decb448c 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() }