diff --git a/src/api/system/mail/account.ts b/src/api/system/mail/account.ts new file mode 100644 index 00000000..821afc3d --- /dev/null +++ b/src/api/system/mail/account.ts @@ -0,0 +1,31 @@ +import { defHttp } from '@/utils/http/axios' + +// 创建邮箱账号 +export const createMailAccountApi = (data) => { + return defHttp.post({ url: '/system/mail-account/create', data }) +} + +// 更新邮箱账号 +export const updateMailAccountApi = (data) => { + return defHttp.put({ url: '/system/mail-account/update', data }) +} + +// 删除邮箱账号 +export const deleteMailAccountApi = (id: number) => { + return defHttp.delete({ url: '/system/mail-account/delete?id=' + id }) +} + +// 获得邮箱账号 +export const getMailAccountApi = (id: number) => { + return defHttp.get({ url: '/system/mail-account/get?id=' + id }) +} + +// 获得邮箱账号分页 +export const getMailAccountPageApi = (params) => { + return defHttp.get({ url: '/system/mail-account/page', params }) +} + +// 获取邮箱账号的精简信息列表 +export const getSimpleMailAccountListApi = () => { + return defHttp.get({ url: '/system/mail-account/list-all-simple' }) +} diff --git a/src/api/system/mail/log.ts b/src/api/system/mail/log.ts new file mode 100644 index 00000000..a540dc98 --- /dev/null +++ b/src/api/system/mail/log.ts @@ -0,0 +1,11 @@ +import { defHttp } from '@/utils/http/axios' + +// 获得邮件日志 +export const getMailLogApi = (id: number) => { + return defHttp.get({ url: '/system/mail-log/get?id=' + id }) +} + +// 获得邮件日志分页 +export const getMailAccountPageApi = (params) => { + return defHttp.get({ url: '/system/mail-log/page', params }) +} diff --git a/src/api/system/mail/template.ts b/src/api/system/mail/template.ts new file mode 100644 index 00000000..c0a050a6 --- /dev/null +++ b/src/api/system/mail/template.ts @@ -0,0 +1,31 @@ +import { defHttp } from '@/utils/http/axios' + +// 创建邮件模版 +export const createMailTemplateApi = (data) => { + return defHttp.post({ url: '/system/mail-template/create', data }) +} + +// 更新邮件模版 +export const updateMailTemplateApi = (data) => { + return defHttp.put({ url: '/system/mail-template/update', data }) +} + +// 删除邮件模版 +export const deleteMailTemplateApi = (id: number) => { + return defHttp.delete({ url: '/system/mail-template/delete?id=' + id }) +} + +// 获得邮件模版 +export const getMailTemplateApi = (id: number) => { + return defHttp.get({ url: '/system/mail-template/get?id=' + id }) +} + +// 获得邮件模版分页 +export const getMailTemplatePageApi = (params) => { + return defHttp.get({ url: '/system/mail-template/page', params }) +} + +// 发送测试邮件 +export const sendMail = (data) => { + return defHttp.post({ url: '/system/mail-template/send-mail', data }) +} diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message.ts similarity index 100% rename from src/api/system/notify/message/index.ts rename to src/api/system/notify/message.ts diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template.ts similarity index 100% rename from src/api/system/notify/template/index.ts rename to src/api/system/notify/template.ts diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts index 5a913a66..de858b0b 100644 --- a/src/views/system/tenant/tenant.data.ts +++ b/src/views/system/tenant/tenant.data.ts @@ -147,7 +147,7 @@ export const formSchema: FormSchema[] = [ label: '用户名称', field: 'username', component: 'Input', - dynamicDisabled: ({ values }) => values.id !== undefined + ifShow: ({ values }) => values.id !== undefined }, { label: '用户密码', @@ -165,7 +165,7 @@ export const formSchema: FormSchema[] = [ label: '过期时间', field: 'expireTime', required: true, - component: 'TimePicker' + component: 'DatePicker' }, { label: '绑定域名', diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index 5ee15962..d7ee4e01 100644 --- a/src/views/system/user/user.data.ts +++ b/src/views/system/user/user.data.ts @@ -21,8 +21,11 @@ export const columns: BasicColumn[] = [ }, { title: '部门', - dataIndex: 'dept.name', - width: 120 + dataIndex: 'deptId', + width: 120, + customRender: ({ record }) => { + return useRender.renderTag(record.dept && record.dept.name) + } }, { title: '手机号码',