From 74aeffec123c0267b4664afd757b098384ea344b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 25 Mar 2023 00:29:09 +0800 Subject: [PATCH] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9AREVIEW=20?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/sms/smsTemplate/index.ts | 44 +-- src/views/system/sms/log/index.vue | 2 +- .../system/sms/template/SmsTemplateForm.vue | 160 +++++++++ .../sms/template/SmsTemplateSendForm.vue | 117 +++++++ src/views/system/sms/template/form.vue | 267 -------------- src/views/system/sms/template/index.vue | 325 ++++++++---------- 6 files changed, 441 insertions(+), 474 deletions(-) create mode 100644 src/views/system/sms/template/SmsTemplateForm.vue create mode 100644 src/views/system/sms/template/SmsTemplateSendForm.vue delete mode 100644 src/views/system/sms/template/form.vue diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts index 55a61762..35cb489d 100644 --- a/src/api/system/sms/smsTemplate/index.ts +++ b/src/api/system/sms/smsTemplate/index.ts @@ -3,7 +3,7 @@ import request from '@/config/axios' export interface SmsTemplateVO { id: number | null type: number | null - status: number | null + status: number code: string name: string content: string @@ -21,60 +21,40 @@ export interface SendSmsReqVO { templateParams: Map } -export interface SmsTemplatePageReqVO extends PageParam { - type?: number | null - status?: number | null - code?: string - content?: string - apiTemplateId?: string - channelId?: number | null - createTime?: Date[] -} - -export interface SmsTemplateExportReqVO { - type?: number - status?: number - code?: string - content?: string - apiTemplateId?: string - channelId?: number - createTime?: Date[] -} - // 查询短信模板列表 -export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { +export const getSmsTemplatePage = (params: PageParam) => { return request.get({ url: '/system/sms-template/page', params }) } // 查询短信模板详情 -export const getSmsTemplateApi = (id: number) => { +export const getSmsTemplate = (id: number) => { return request.get({ url: '/system/sms-template/get?id=' + id }) } // 新增短信模板 -export const createSmsTemplateApi = (data: SmsTemplateVO) => { +export const createSmsTemplate = (data: SmsTemplateVO) => { return request.post({ url: '/system/sms-template/create', data }) } // 修改短信模板 -export const updateSmsTemplateApi = (data: SmsTemplateVO) => { +export const updateSmsTemplate = (data: SmsTemplateVO) => { return request.put({ url: '/system/sms-template/update', data }) } // 删除短信模板 -export const deleteSmsTemplateApi = (id: number) => { +export const deleteSmsTemplate = (id: number) => { return request.delete({ url: '/system/sms-template/delete?id=' + id }) } -// 发送短信 -export const sendSmsApi = (data: SendSmsReqVO) => { - return request.post({ url: '/system/sms-template/send-sms', data }) -} - // 导出短信模板 -export const exportPostApi = (params: SmsTemplateExportReqVO) => { +export const exportSmsTemplate = (params) => { return request.download({ url: '/system/sms-template/export-excel', params }) } + +// 发送短信 +export const sendSms = (data: SendSmsReqVO) => { + return request.post({ url: '/system/sms-template/send-sms', data }) +} diff --git a/src/views/system/sms/log/index.vue b/src/views/system/sms/log/index.vue index a0acdfaa..ec8a4659 100644 --- a/src/views/system/sms/log/index.vue +++ b/src/views/system/sms/log/index.vue @@ -102,7 +102,7 @@ plain @click="handleExport" :loading="exportLoading" - v-hasPermi="['infra:config:export']" + v-hasPermi="['system:sms-log:export']" > 导出 diff --git a/src/views/system/sms/template/SmsTemplateForm.vue b/src/views/system/sms/template/SmsTemplateForm.vue new file mode 100644 index 00000000..e6bdce6c --- /dev/null +++ b/src/views/system/sms/template/SmsTemplateForm.vue @@ -0,0 +1,160 @@ + + diff --git a/src/views/system/sms/template/SmsTemplateSendForm.vue b/src/views/system/sms/template/SmsTemplateSendForm.vue new file mode 100644 index 00000000..f2ecbe9f --- /dev/null +++ b/src/views/system/sms/template/SmsTemplateSendForm.vue @@ -0,0 +1,117 @@ + + diff --git a/src/views/system/sms/template/form.vue b/src/views/system/sms/template/form.vue deleted file mode 100644 index 4c9825f9..00000000 --- a/src/views/system/sms/template/form.vue +++ /dev/null @@ -1,267 +0,0 @@ - - diff --git a/src/views/system/sms/template/index.vue b/src/views/system/sms/template/index.vue index ffdd4240..85d84e88 100644 --- a/src/views/system/sms/template/index.vue +++ b/src/views/system/sms/template/index.vue @@ -1,17 +1,22 @@ @@ -196,33 +208,29 @@ v-model:limit="queryParams.pageSize" @pagination="getList" /> - + - + + +