-
+
@@ -29,64 +29,64 @@
@@ -95,14 +95,14 @@
-
+
-
-
-
+
+
+
@@ -113,7 +113,7 @@
-
diff --git a/src/views/mp/material/components/UploadFile.vue b/src/views/mp/material/components/UploadFile.vue
new file mode 100644
index 00000000..3ab62224
--- /dev/null
+++ b/src/views/mp/material/components/UploadFile.vue
@@ -0,0 +1,67 @@
+
+
+
+ {{ uploading ? '正在上传' : '点击上传' }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/UploadVideo.vue b/src/views/mp/material/components/UploadVideo.vue
new file mode 100644
index 00000000..816711d1
--- /dev/null
+++ b/src/views/mp/material/components/UploadVideo.vue
@@ -0,0 +1,125 @@
+
+
+
+
+ 选择视频
+
+ 格式支持 MP4,文件大小不超过 10MB
+
+
+
+
+
+
+
+
+
+
+
+ 取 消
+ 提 交
+
+
+
+
+
diff --git a/src/views/mp/material/components/VideoTable.vue b/src/views/mp/material/components/VideoTable.vue
new file mode 100644
index 00000000..81472959
--- /dev/null
+++ b/src/views/mp/material/components/VideoTable.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.createTime }}
+
+
+
+
+
+ 下载
+
+
+ 删除
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/VoiceTable.vue b/src/views/mp/material/components/VoiceTable.vue
new file mode 100644
index 00000000..6f37e1a0
--- /dev/null
+++ b/src/views/mp/material/components/VoiceTable.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.createTime }}
+
+
+
+
+
+ 下载
+
+
+ 删除
+
+
+
+
+
+
+
diff --git a/src/views/mp/material/components/upload.ts b/src/views/mp/material/components/upload.ts
new file mode 100644
index 00000000..239665a2
--- /dev/null
+++ b/src/views/mp/material/components/upload.ts
@@ -0,0 +1,71 @@
+import type { UploadProps, UploadRawFile } from 'element-plus'
+import { getAccessToken } from '@/utils/auth'
+const message = useMessage() // 消息
+const HEADERS = { Authorization: 'Bearer ' + getAccessToken() } // 请求头
+// const UPLOAD_URL = 'http://127.0.0.1:8000/upload/' // 上传地址
+const UPLOAD_URL = import.meta.env.VITE_BASE_URL + '/admin-api/mp/material/upload-permanent' // 上传地址
+
+enum MaterialType {
+ Image = 'image',
+ Voice = 'voice',
+ Video = 'video'
+}
+
+interface UploadData {
+ type: MaterialType
+ title: string
+ introduction: string
+}
+
+const beforeUpload = (rawFile: UploadRawFile, materialType: MaterialType): boolean => {
+ let allowTypes: string[] = []
+ let maxSizeMB = 0
+ let name = ''
+ switch (materialType) {
+ case MaterialType.Image:
+ allowTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/jpg']
+ maxSizeMB = 2
+ name = '图片'
+ break
+ case MaterialType.Voice:
+ allowTypes = ['audio/mp3', 'audio/mpeg', 'audio/wma', 'audio/wav', 'audio/amr']
+ maxSizeMB = 2
+ name = '图片'
+ break
+ case MaterialType.Video:
+ allowTypes = ['video/mp4']
+ maxSizeMB = 10
+ name = '视频'
+ break
+ }
+ // 格式不正确
+ if (!allowTypes.includes(rawFile.type)) {
+ message.error(`上传${name}格式不对!`)
+ return false
+ }
+ // 大小不正确
+ if (rawFile.size / 1024 / 1024 > maxSizeMB) {
+ message.error(`上传${name}大小不能超过${maxSizeMB}M!`)
+ return false
+ }
+ return true
+}
+
+const beforeImageUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Image)
+
+const beforeVoiceUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Voice)
+
+const beforeVideoUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) =>
+ beforeUpload(rawFile, MaterialType.Video)
+
+export {
+ HEADERS,
+ UPLOAD_URL,
+ MaterialType,
+ UploadData,
+ beforeImageUpload,
+ beforeVoiceUpload,
+ beforeVideoUpload
+}
diff --git a/src/views/mp/material/index.vue b/src/views/mp/material/index.vue
index c6d8055d..4d8d3707 100644
--- a/src/views/mp/material/index.vue
+++ b/src/views/mp/material/index.vue
@@ -12,47 +12,19 @@
-
+
图片
-
-
- 点击上传
-
-
- 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
-
-
-
-
-
+
+ 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
+
+
+
-
+
语音
-
-
- 点击上传
-
-
- 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
-
-
-
-
-
+
+ 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
+
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.createTime }}
-
-
-
-
-
- 下载
-
-
- 删除
-
-
-
-
+
-
+
视频
-
- 新建视频
-
-
- 新建视频
-
-
- 选择视频
-
- 格式支持 MP4,文件大小不超过 10MB
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取 消
- 提 交
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.createTime }}
-
-
-
-
-
- 下载
-
-
- 删除
-
-
-
-
+
-
-
-
diff --git a/src/views/mp/tag/TagForm.vue b/src/views/mp/tag/TagForm.vue
index 73b29baa..b1f96eb4 100644
--- a/src/views/mp/tag/TagForm.vue
+++ b/src/views/mp/tag/TagForm.vue
@@ -1,23 +1,23 @@
-
-
diff --git a/src/views/system/notify/template/NotifyTemplateSendForm.vue b/src/views/system/notify/template/NotifyTemplateSendForm.vue
new file mode 100644
index 00000000..9e292a8d
--- /dev/null
+++ b/src/views/system/notify/template/NotifyTemplateSendForm.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确 定
+ 取 消
+
+
+
+
diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue
index 45c1be6d..6d1938ad 100644
--- a/src/views/system/notify/template/index.vue
+++ b/src/views/system/notify/template/index.vue
@@ -1,251 +1,232 @@
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
-
-
-
-
-
-
-
-
diff --git a/src/views/system/notify/template/template.data.ts b/src/views/system/notify/template/template.data.ts
deleted file mode 100644
index ae8c7b07..00000000
--- a/src/views/system/notify/template/template.data.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
-
-// 表单校验
-export const rules = reactive({
- name: [required],
- code: [required],
- content: [required],
- type: [required],
- status: [required]
-})
-
-// CrudSchema
-const crudSchemas = reactive
({
- primaryKey: 'id',
- primaryTitle: '编号',
- primaryType: null,
- action: true,
- actionWidth: '260', // 3个按钮默认200,如有删减对应增减即可
- columns: [
- {
- title: '模版编码',
- field: 'code',
- isSearch: true
- },
- {
- title: '模板名称',
- field: 'name',
- isSearch: true
- },
- {
- title: '发件人名称',
- field: 'nickname'
- },
- {
- title: '类型',
- field: 'type',
- dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE,
- dictClass: 'number'
- },
- {
- title: '模版内容',
- field: 'content',
- table: {
- width: 300
- },
- form: {
- component: 'Input',
- componentProps: {
- type: 'textarea',
- rows: 4
- },
- colProps: {
- span: 24
- }
- }
- },
- {
- title: '状态',
- field: 'status',
- dictType: DICT_TYPE.COMMON_STATUS,
- dictClass: 'number',
- isSearch: true
- },
- {
- title: '备注',
- field: 'remark'
- },
- {
- title: '创建时间',
- field: 'createTime',
- isForm: false,
- formatter: 'formatDate',
- search: {
- show: true,
- itemRender: {
- name: 'XDataTimePicker'
- }
- },
- table: {
- width: 180
- }
- }
- ]
-})
-export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
diff --git a/src/views/system/oauth2/client/ClientForm.vue b/src/views/system/oauth2/client/ClientForm.vue
index b5936c37..d874a249 100644
--- a/src/views/system/oauth2/client/ClientForm.vue
+++ b/src/views/system/oauth2/client/ClientForm.vue
@@ -1,11 +1,11 @@
-
+
@@ -20,7 +20,7 @@
-
+
@@ -42,8 +42,8 @@
@@ -58,9 +58,9 @@
@@ -70,8 +70,8 @@
@@ -81,9 +81,9 @@
@@ -98,9 +98,9 @@
@@ -115,9 +115,9 @@
@@ -131,22 +131,23 @@
- 确 定
+ 确 定
取 消
-