diff --git a/src/views/system/mail/template/MailTemplateForm.vue b/src/views/system/mail/template/MailTemplateForm.vue
index 0d9fa8999..faf2020b4 100644
--- a/src/views/system/mail/template/MailTemplateForm.vue
+++ b/src/views/system/mail/template/MailTemplateForm.vue
@@ -1,12 +1,52 @@
-
diff --git a/src/views/system/mail/template/MailTemplateSendForm.vue b/src/views/system/mail/template/MailTemplateSendForm.vue
index ebf945dff..6e4c918e6 100644
--- a/src/views/system/mail/template/MailTemplateSendForm.vue
+++ b/src/views/system/mail/template/MailTemplateSendForm.vue
@@ -5,7 +5,7 @@
v-loading="formLoading"
:model="formData"
:rules="formRules"
- label-width="120px"
+ label-width="140px"
>
diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue
index 0e79286f2..76907b8e5 100644
--- a/src/views/system/mail/template/index.vue
+++ b/src/views/system/mail/template/index.vue
@@ -1,97 +1,259 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
- 新增
+ 新增
- 批量删除
+ 批量删除
-
-
+
+ 导出
+
+
+
-
-
-
- 测试
-
-
- 编辑
-
-
- 删除
-
-
-
+
+
+
+
+
+
+
+
+ {{ getAccountMail(scope.row.accountId) }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+ 测试
+
+
+ 删除
+
+
+
+
+
+
-
-
+
diff --git a/src/views/system/mail/template/template.data.ts b/src/views/system/mail/template/template.data.ts
deleted file mode 100644
index c11d5fe9f..000000000
--- a/src/views/system/mail/template/template.data.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter } from '@/utils/formatTime'
-import { TableColumn } from '@/types/table'
-import * as MailAccountApi from '@/api/system/mail/account'
-
-// 邮箱账号的列表
-const accountList = await MailAccountApi.getSimpleMailAccountList()
-
-// 表单校验
-export const rules = reactive({
- name: [required],
- code: [required],
- accountId: [required],
- label: [required],
- content: [required],
- params: [required],
- status: [required]
-})
-
-// CrudSchema:https://doc.iocoder.cn/vue3/crud-schema/
-const crudSchemas = reactive([
- {
- label: '模板编码',
- field: 'code',
- isSearch: true,
- search: {
- componentProps: {
- style: {
- width: '240px'
- }
- }
- }
- },
- {
- label: '模板名称',
- field: 'name',
- isSearch: true,
- search: {
- componentProps: {
- style: {
- width: '240px'
- }
- }
- }
- },
- {
- label: '模板标题',
- field: 'title'
- },
- {
- label: '模板内容',
- field: 'content',
- form: {
- component: 'Editor',
- componentProps: {
- valueHtml: '',
- height: 200
- }
- }
- },
- {
- label: '邮箱账号',
- field: 'accountId',
- width: '200px',
- formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- return accountList.find((account) => account.id === cellValue)?.mail
- },
- search: {
- show: true,
- component: 'Select',
- api: () => accountList,
- componentProps: {
- optionsAlias: {
- labelField: 'mail',
- valueField: 'id'
- },
- style: {
- width: '240px'
- }
- }
- },
- form: {
- component: 'Select',
- api: () => accountList,
- componentProps: {
- optionsAlias: {
- labelField: 'mail',
- valueField: 'id'
- }
- }
- }
- },
- {
- label: '发送人名称',
- field: 'nickname'
- },
- {
- label: '开启状态',
- field: 'status',
- isSearch: true,
- dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number',
- search: {
- componentProps: {
- style: {
- width: '240px'
- }
- }
- }
- },
- {
- label: '备注',
- field: 'remark',
- isTable: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- isForm: false,
- formatter: dateFormatter,
- search: {
- show: true,
- component: 'DatePicker',
- componentProps: {
- valueFormat: 'YYYY-MM-DD HH:mm:ss',
- type: 'daterange',
- defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')],
- style: {
- width: '240px'
- }
- }
- }
- },
- {
- label: '操作',
- field: 'action',
- isForm: false
- }
-])
-export const { allSchemas } = useCrudSchemas(crudSchemas)