diff --git a/src/api/system/mail/account/index.ts b/src/api/system/mail/account/index.ts new file mode 100644 index 0000000..10bcfe8 --- /dev/null +++ b/src/api/system/mail/account/index.ts @@ -0,0 +1,39 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +export interface MailAccount { + id?: number + mail: string + username: string + password?: string + host: string + port: number + sslEnable: boolean + starttlsEnable: boolean + remark?: string + createTime?: string +} + +export function getMailAccountPage(params: PageParam) { + return http.get>('/system/mail-account/page', params) +} + +export function getSimpleMailAccountList() { + return http.get('/system/mail-account/simple-list') +} + +export function getMailAccount(id: number) { + return http.get(`/system/mail-account/get?id=${id}`) +} + +export function createMailAccount(data: MailAccount) { + return http.post('/system/mail-account/create', data) +} + +export function updateMailAccount(data: MailAccount) { + return http.put('/system/mail-account/update', data) +} + +export function deleteMailAccount(id: number) { + return http.delete(`/system/mail-account/delete?id=${id}`) +} diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts new file mode 100644 index 0000000..5d848c5 --- /dev/null +++ b/src/api/system/mail/log/index.ts @@ -0,0 +1,27 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +export interface MailLog { + id?: number + userId?: number + userType?: number + templateId?: number + templateCode?: string + templateTitle?: string + templateContent?: string + templateParams?: Record + accountId?: number + fromMail?: string + toMails?: string[] + ccMails?: string[] + bccMails?: string[] + sendStatus?: number + sendTime?: string + sendMessageId?: string + sendException?: string + createTime?: string +} + +export function getMailLogPage(params: PageParam) { + return http.get>('/system/mail-log/page', params) +} diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts new file mode 100644 index 0000000..43d601e --- /dev/null +++ b/src/api/system/mail/template/index.ts @@ -0,0 +1,48 @@ +import type { PageParam, PageResult } from '@/http/types' +import { http } from '@/http/http' + +export interface MailTemplate { + id?: number + name: string + code: string + accountId?: number + nickname?: string + title: string + content: string + status: number + remark?: string + params?: string[] + createTime?: string +} + +export interface MailSendReqVO { + templateCode: string + templateParams: Record + toMails: string[] + ccMails?: string[] + bccMails?: string[] +} + +export function getMailTemplatePage(params: PageParam) { + return http.get>('/system/mail-template/page', params) +} + +export function getMailTemplate(id: number) { + return http.get(`/system/mail-template/get?id=${id}`) +} + +export function createMailTemplate(data: MailTemplate) { + return http.post('/system/mail-template/create', data) +} + +export function updateMailTemplate(data: MailTemplate) { + return http.put('/system/mail-template/update', data) +} + +export function deleteMailTemplate(id: number) { + return http.delete(`/system/mail-template/delete?id=${id}`) +} + +export function sendMail(data: MailSendReqVO) { + return http.post('/system/mail-template/send-mail', data) +} diff --git a/src/pages-system/mail/account/detail/index.vue b/src/pages-system/mail/account/detail/index.vue new file mode 100644 index 0000000..b692910 --- /dev/null +++ b/src/pages-system/mail/account/detail/index.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/pages-system/mail/account/form/index.vue b/src/pages-system/mail/account/form/index.vue new file mode 100644 index 0000000..c1d7513 --- /dev/null +++ b/src/pages-system/mail/account/form/index.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/pages-system/mail/components/account-list.vue b/src/pages-system/mail/components/account-list.vue new file mode 100644 index 0000000..d405fd6 --- /dev/null +++ b/src/pages-system/mail/components/account-list.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/pages-system/mail/components/account-search-form.vue b/src/pages-system/mail/components/account-search-form.vue new file mode 100644 index 0000000..0f8bb5d --- /dev/null +++ b/src/pages-system/mail/components/account-search-form.vue @@ -0,0 +1,64 @@ + + + diff --git a/src/pages-system/mail/components/log-list.vue b/src/pages-system/mail/components/log-list.vue new file mode 100644 index 0000000..8f34cec --- /dev/null +++ b/src/pages-system/mail/components/log-list.vue @@ -0,0 +1,118 @@ + + + diff --git a/src/pages-system/mail/components/log-search-form.vue b/src/pages-system/mail/components/log-search-form.vue new file mode 100644 index 0000000..3cfdf38 --- /dev/null +++ b/src/pages-system/mail/components/log-search-form.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/pages-system/mail/components/template-list.vue b/src/pages-system/mail/components/template-list.vue new file mode 100644 index 0000000..449b517 --- /dev/null +++ b/src/pages-system/mail/components/template-list.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/pages-system/mail/components/template-search-form.vue b/src/pages-system/mail/components/template-search-form.vue new file mode 100644 index 0000000..f655729 --- /dev/null +++ b/src/pages-system/mail/components/template-search-form.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/pages-system/mail/index.vue b/src/pages-system/mail/index.vue new file mode 100644 index 0000000..024f172 --- /dev/null +++ b/src/pages-system/mail/index.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/src/pages-system/mail/log/detail/index.vue b/src/pages-system/mail/log/detail/index.vue new file mode 100644 index 0000000..113539c --- /dev/null +++ b/src/pages-system/mail/log/detail/index.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/src/pages-system/mail/template/detail/components/send-form.vue b/src/pages-system/mail/template/detail/components/send-form.vue new file mode 100644 index 0000000..c1a399e --- /dev/null +++ b/src/pages-system/mail/template/detail/components/send-form.vue @@ -0,0 +1,162 @@ + + + diff --git a/src/pages-system/mail/template/detail/index.vue b/src/pages-system/mail/template/detail/index.vue new file mode 100644 index 0000000..7b9f767 --- /dev/null +++ b/src/pages-system/mail/template/detail/index.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/src/pages-system/mail/template/form/index.vue b/src/pages-system/mail/template/form/index.vue new file mode 100644 index 0000000..9cfc320 --- /dev/null +++ b/src/pages-system/mail/template/form/index.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts index 0cae970..15e0baf 100644 --- a/src/pages/index/index.ts +++ b/src/pages/index/index.ts @@ -101,6 +101,14 @@ const menuGroupsData: MenuGroup[] = [ iconColor: '#36cfc9', permission: 'system:sms-channel:query', }, + { + key: 'mail', + name: '邮件管理', + icon: 'mail', + url: '/pages-system/mail/index', + iconColor: '#40a9ff', + permission: 'system:mail-account:query', + }, ], }, {