From ba327cd8aeff7870f82cb8e2389a2915eabf588c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 Mar 2023 10:39:19 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9A=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E6=A8=A1=E7=89=88=E7=9A=84=E6=96=B0=E5=A2=9E=E5=92=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/mail/template/index.ts | 20 ++---- src/views/system/mail/account/form.vue | 1 - src/views/system/mail/template/form.vue | 66 +++++++++++++++++++ src/views/system/mail/template/index.vue | 16 ++--- .../system/mail/template/template.data.ts | 23 +++++-- 5 files changed, 98 insertions(+), 28 deletions(-) create mode 100644 src/views/system/mail/template/form.vue diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts index c044ddd4..fb7ce5ea 100644 --- a/src/api/system/mail/template/index.ts +++ b/src/api/system/mail/template/index.ts @@ -13,14 +13,6 @@ export interface MailTemplateVO { remark: string } -export interface MailTemplatePageReqVO extends PageParam { - name?: string - code?: string - accountId?: number - status?: number - createTime?: Date[] -} - export interface MailSendReqVO { mail: string templateCode: string @@ -28,31 +20,31 @@ export interface MailSendReqVO { } // 查询邮件模版列表 -export const getMailTemplatePageApi = async (params: MailTemplatePageReqVO) => { +export const getMailTemplatePage = async (params: PageParam) => { return await request.get({ url: '/system/mail-template/page', params }) } // 查询邮件模版详情 -export const getMailTemplateApi = async (id: number) => { +export const getMailTemplate = async (id: number) => { return await request.get({ url: '/system/mail-template/get?id=' + id }) } // 新增邮件模版 -export const createMailTemplateApi = async (data: MailTemplateVO) => { +export const createMailTemplate = async (data: MailTemplateVO) => { return await request.post({ url: '/system/mail-template/create', data }) } // 修改邮件模版 -export const updateMailTemplateApi = async (data: MailTemplateVO) => { +export const updateMailTemplate = async (data: MailTemplateVO) => { return await request.put({ url: '/system/mail-template/update', data }) } // 删除邮件模版 -export const deleteMailTemplateApi = async (id: number) => { +export const deleteMailTemplate = async (id: number) => { return await request.delete({ url: '/system/mail-template/delete?id=' + id }) } // 发送邮件 -export const sendMailApi = (data: MailSendReqVO) => { +export const sendMail = (data: MailSendReqVO) => { return request.post({ url: '/system/mail-template/send-mail', data }) } diff --git a/src/views/system/mail/account/form.vue b/src/views/system/mail/account/form.vue index 70683830..78d7cf0d 100644 --- a/src/views/system/mail/account/form.vue +++ b/src/views/system/mail/account/form.vue @@ -25,7 +25,6 @@ const openModal = async (type: string, id?: number) => { modelVisible.value = true modelTitle.value = t('action.' + type) formType.value = type - // resetForm() // 修改时,设置数据 if (id) { formLoading.value = true diff --git a/src/views/system/mail/template/form.vue b/src/views/system/mail/template/form.vue new file mode 100644 index 00000000..92f3c5c1 --- /dev/null +++ b/src/views/system/mail/template/form.vue @@ -0,0 +1,66 @@ + + diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue index d9684e86..ef8d800d 100644 --- a/src/views/system/mail/template/index.vue +++ b/src/views/system/mail/template/index.vue @@ -49,28 +49,28 @@ - +