diff --git a/src/views/file/emailTemplate/columns.ts b/src/views/file/emailTemplate/columns.ts new file mode 100644 index 0000000..5905573 --- /dev/null +++ b/src/views/file/emailTemplate/columns.ts @@ -0,0 +1,78 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '模板名称', + key: 'title', + width: 150, + }, + { + title: '模板编码', + key: 'code', + width: 150, + }, + { + title: '模板类型', + key: 'type', + width: 100, + render(record) { + let typeText = ''; + switch (record.type) { + case 1: + typeText = '普通邮件'; + break; + case 2: + typeText = '图文邮件'; + break; + case 3: + typeText = '模板文件'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '文件名称', + key: 'fileName', + width: 100, + }, + { + title: '文件路径', + key: 'filePath', + width: 100, + render(record) { + return h( + 'a', + { + href: record.filePath, + target: '_blank', + }, + '点击查看文件', + ); + }, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/file/emailTemplate/edit.vue b/src/views/file/emailTemplate/edit.vue new file mode 100644 index 0000000..6ae3b5d --- /dev/null +++ b/src/views/file/emailTemplate/edit.vue @@ -0,0 +1,198 @@ + + diff --git a/src/views/file/emailTemplate/index.vue b/src/views/file/emailTemplate/index.vue new file mode 100644 index 0000000..8d78d00 --- /dev/null +++ b/src/views/file/emailTemplate/index.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/src/views/file/emailTemplate/querySchemas.ts b/src/views/file/emailTemplate/querySchemas.ts new file mode 100644 index 0000000..20ea21b --- /dev/null +++ b/src/views/file/emailTemplate/querySchemas.ts @@ -0,0 +1,34 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'title', + component: 'NInput', + label: '模板名称', + componentProps: { + placeholder: '请输入模板名称', + }, + }, + { + field: 'type', + component: 'NSelect', + label: '邮件类型', + componentProps: { + placeholder: '请选择邮件类型', + clearable: true, + options: [ + { + label: '普通邮件', + value: '1', + }, + { + label: '图文邮件', + value: '2', + }, + { + label: '模板文件', + value: '3', + }, + ], + }, + }, +]; diff --git a/src/views/file/fileTemplate/columns.ts b/src/views/file/fileTemplate/columns.ts new file mode 100644 index 0000000..5453a6a --- /dev/null +++ b/src/views/file/fileTemplate/columns.ts @@ -0,0 +1,56 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '模板名称', + key: 'name', + width: 150, + }, + { + title: '模板编码', + key: 'code', + width: 150, + }, + { + title: '文件名称', + key: 'fileName', + width: 150, + }, + { + title: '文件路径', + key: 'filePath', + width: 150, + render(record) { + return h( + 'a', + { + href: record.filePath, + target: '_blank', + }, + '点击查看文件', + ); + }, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/file/fileTemplate/edit.vue b/src/views/file/fileTemplate/edit.vue new file mode 100644 index 0000000..c16976c --- /dev/null +++ b/src/views/file/fileTemplate/edit.vue @@ -0,0 +1,169 @@ + + diff --git a/src/views/file/fileTemplate/index.vue b/src/views/file/fileTemplate/index.vue new file mode 100644 index 0000000..b6c5fe0 --- /dev/null +++ b/src/views/file/fileTemplate/index.vue @@ -0,0 +1,200 @@ + + + + + diff --git a/src/views/file/fileTemplate/querySchemas.ts b/src/views/file/fileTemplate/querySchemas.ts new file mode 100644 index 0000000..251f960 --- /dev/null +++ b/src/views/file/fileTemplate/querySchemas.ts @@ -0,0 +1,11 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'name', + component: 'NInput', + label: '模板名称', + componentProps: { + placeholder: '请输入模板名称', + }, + }, +]; diff --git a/src/views/file/messageTemplate/columns.ts b/src/views/file/messageTemplate/columns.ts new file mode 100644 index 0000000..b1a7f47 --- /dev/null +++ b/src/views/file/messageTemplate/columns.ts @@ -0,0 +1,67 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '模板编号', + key: 'number', + width: 100, + }, + { + title: '模板名称', + key: 'title', + width: 150, + }, + { + title: '模板编码', + key: 'code', + width: 150, + }, + { + title: '消息类型', + key: 'type', + render(record) { + let typeText = ''; + switch (record.type) { + case 1: + typeText = '系统通知'; + break; + case 2: + typeText = '用户私信'; + break; + case 3: + typeText = '代办事项'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '模板内容', + key: 'content', + width: 350, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/file/messageTemplate/edit.vue b/src/views/file/messageTemplate/edit.vue new file mode 100644 index 0000000..51144d8 --- /dev/null +++ b/src/views/file/messageTemplate/edit.vue @@ -0,0 +1,197 @@ + + diff --git a/src/views/file/messageTemplate/index.vue b/src/views/file/messageTemplate/index.vue new file mode 100644 index 0000000..c2275b3 --- /dev/null +++ b/src/views/file/messageTemplate/index.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/views/file/messageTemplate/querySchemas.ts b/src/views/file/messageTemplate/querySchemas.ts new file mode 100644 index 0000000..3d3baa0 --- /dev/null +++ b/src/views/file/messageTemplate/querySchemas.ts @@ -0,0 +1,34 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'title', + component: 'NInput', + label: '模板标题', + componentProps: { + placeholder: '请输入模板标题', + }, + }, + { + field: 'type', + component: 'NSelect', + label: '消息类型', + componentProps: { + placeholder: '请选择消息类型', + clearable: true, + options: [ + { + label: '系统通知', + value: 1, + }, + { + label: '用户私信', + value: 2, + }, + { + label: '代办事项', + value: 3, + }, + ], + }, + }, +]; diff --git a/src/views/file/smsTemplate/columns.ts b/src/views/file/smsTemplate/columns.ts new file mode 100644 index 0000000..ad53e84 --- /dev/null +++ b/src/views/file/smsTemplate/columns.ts @@ -0,0 +1,67 @@ +import { h } from 'vue'; +import { NTag } from 'naive-ui'; + +export const columns = [ + { + type: 'selection', + width: 50, + fixed: 'left', + }, + { + title: 'ID', + key: 'id', + fixed: 'left', + width: 50, + }, + { + title: '模板编号', + key: 'number', + width: 100, + }, + { + title: '模板名称', + key: 'title', + width: 150, + }, + { + title: '模板编码', + key: 'code', + width: 150, + }, + { + title: '模板类型', + key: 'type', + render(record) { + let typeText = ''; + switch (record.type) { + case 1: + typeText = '阿里云'; + break; + case 2: + typeText = '腾讯云'; + break; + case 3: + typeText = '华为云'; + break; + default: + break; + } + return h('span', typeText || '-'); + }, + }, + { + title: '模板内容', + key: 'content', + width: 350, + }, + { + title: '创建人', + key: 'createUser', + width: 100, + }, + { + title: '创建时间', + key: 'createTime', + width: 180, + }, +]; diff --git a/src/views/file/smsTemplate/edit.vue b/src/views/file/smsTemplate/edit.vue new file mode 100644 index 0000000..26c24a4 --- /dev/null +++ b/src/views/file/smsTemplate/edit.vue @@ -0,0 +1,191 @@ + + diff --git a/src/views/file/smsTemplate/index.vue b/src/views/file/smsTemplate/index.vue new file mode 100644 index 0000000..ba59337 --- /dev/null +++ b/src/views/file/smsTemplate/index.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/src/views/file/smsTemplate/querySchemas.ts b/src/views/file/smsTemplate/querySchemas.ts new file mode 100644 index 0000000..b9f1937 --- /dev/null +++ b/src/views/file/smsTemplate/querySchemas.ts @@ -0,0 +1,34 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'title', + component: 'NInput', + label: '模板名称', + componentProps: { + placeholder: '请输入模板名称', + }, + }, + { + field: 'type', + component: 'NSelect', + label: '模板类型', + componentProps: { + placeholder: '请选择模板类型', + clearable: true, + options: [ + { + label: '阿里云', + value: '1', + }, + { + label: '腾讯云', + value: '2', + }, + { + label: '华为云', + value: '3', + }, + ], + }, + }, +];