From a80b88671309d0a7a7b43336773c2de4a274f1a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com>
Date: Tue, 26 Nov 2024 10:45:01 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/file/emailTemplate/columns.ts | 78 +++++++
src/views/file/emailTemplate/edit.vue | 198 +++++++++++++++++
src/views/file/emailTemplate/index.vue | 203 ++++++++++++++++++
src/views/file/emailTemplate/querySchemas.ts | 34 +++
src/views/file/fileTemplate/columns.ts | 56 +++++
src/views/file/fileTemplate/edit.vue | 169 +++++++++++++++
src/views/file/fileTemplate/index.vue | 200 +++++++++++++++++
src/views/file/fileTemplate/querySchemas.ts | 11 +
src/views/file/messageTemplate/columns.ts | 67 ++++++
src/views/file/messageTemplate/edit.vue | 197 +++++++++++++++++
src/views/file/messageTemplate/index.vue | 201 +++++++++++++++++
.../file/messageTemplate/querySchemas.ts | 34 +++
src/views/file/smsTemplate/columns.ts | 67 ++++++
src/views/file/smsTemplate/edit.vue | 191 ++++++++++++++++
src/views/file/smsTemplate/index.vue | 201 +++++++++++++++++
src/views/file/smsTemplate/querySchemas.ts | 34 +++
16 files changed, 1941 insertions(+)
create mode 100644 src/views/file/emailTemplate/columns.ts
create mode 100644 src/views/file/emailTemplate/edit.vue
create mode 100644 src/views/file/emailTemplate/index.vue
create mode 100644 src/views/file/emailTemplate/querySchemas.ts
create mode 100644 src/views/file/fileTemplate/columns.ts
create mode 100644 src/views/file/fileTemplate/edit.vue
create mode 100644 src/views/file/fileTemplate/index.vue
create mode 100644 src/views/file/fileTemplate/querySchemas.ts
create mode 100644 src/views/file/messageTemplate/columns.ts
create mode 100644 src/views/file/messageTemplate/edit.vue
create mode 100644 src/views/file/messageTemplate/index.vue
create mode 100644 src/views/file/messageTemplate/querySchemas.ts
create mode 100644 src/views/file/smsTemplate/columns.ts
create mode 100644 src/views/file/smsTemplate/edit.vue
create mode 100644 src/views/file/smsTemplate/index.vue
create mode 100644 src/views/file/smsTemplate/querySchemas.ts
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 @@
+
+
+
+
+
+
+
+
+
+ {{ formData.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+ {{ formData.code }}
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+ {{ formData.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+ {{ formData.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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',
+ },
+ ],
+ },
+ },
+];