From fa653ac8872f57b63ba39a539ffda2fc7a830e0e Mon Sep 17 00:00:00 2001 From: panda <1565636758@qq.com> Date: Fri, 22 May 2026 14:52:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96IoT=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=94=AF=E6=8C=81=E5=8A=A8=E6=80=81=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E9=82=AE=E4=BB=B6=E3=80=81=E7=9F=AD=E4=BF=A1=E3=80=81?= =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=E7=9A=84=E6=A8=A1=E6=9D=BF=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BE=9D=E8=B5=96templateCode=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/alert/config/index.ts | 3 + src/api/system/mail/template/index.ts | 10 ++ src/api/system/notify/template/index.ts | 16 +- src/api/system/sms/smsTemplate/index.ts | 10 ++ .../iot/alert/config/AlertConfigForm.vue | 160 ++++++++++++++++-- 5 files changed, 184 insertions(+), 15 deletions(-) diff --git a/src/api/iot/alert/config/index.ts b/src/api/iot/alert/config/index.ts index e3ddc2a59..f61c04f93 100644 --- a/src/api/iot/alert/config/index.ts +++ b/src/api/iot/alert/config/index.ts @@ -10,6 +10,9 @@ export interface AlertConfig { sceneRuleIds: string // 关联的场景联动规则编号数组 receiveUserIds: string // 接收的用户编号数组 receiveTypes: string // 接收的类型数组 + smsTemplateCode?: string // 短信模板编号 + mailTemplateCode?: string // 邮件模板编号 + notifyTemplateCode?: string // 站内信模板编号 } // IoT 告警配置 API diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts index d340f8a24..20ff23f79 100644 --- a/src/api/system/mail/template/index.ts +++ b/src/api/system/mail/template/index.ts @@ -19,6 +19,16 @@ export interface MailSendReqVO { templateParams: Map } +export interface MailTemplateSimpleVO { + id: number + name: string + code: string +} + +// 查询邮件模版精简列表 +export const getSimpleMailTemplateList = async () => { + return await request.get({ url: '/system/mail-template/simple-list' }) +} // 查询邮件模版列表 export const getMailTemplatePage = async (params: PageParam) => { return await request.get({ url: '/system/mail-template/page', params }) diff --git a/src/api/system/notify/template/index.ts b/src/api/system/notify/template/index.ts index c6bc54872..d61bc8890 100644 --- a/src/api/system/notify/template/index.ts +++ b/src/api/system/notify/template/index.ts @@ -18,6 +18,17 @@ export interface NotifySendReqVO { templateParams: Map } +export interface NotifyTemplateSimpleVO { + id: number + name: string + code: string +} + +// 查询站内信模板精简列表 +export const getSimpleNotifyTemplateList = async () => { + return await request.get({ url: '/system/notify-template/simple-list' }) +} + // 查询站内信模板列表 export const getNotifyTemplatePage = async (params: PageParam) => { return await request.get({ url: '/system/notify-template/page', params }) @@ -45,7 +56,10 @@ export const deleteNotifyTemplate = async (id: number) => { // 批量删除站内信模板 export const deleteNotifyTemplateList = async (ids: number[]) => { - return await request.delete({ url: '/system/notify-template/delete-list', params: { ids: ids.join(',') } }) + return await request.delete({ + url: '/system/notify-template/delete-list', + params: { ids: ids.join(',') } + }) } // 发送站内信 diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts index 2171ff646..d5a883abb 100644 --- a/src/api/system/sms/smsTemplate/index.ts +++ b/src/api/system/sms/smsTemplate/index.ts @@ -21,6 +21,16 @@ export interface SendSmsReqVO { templateParams: Map } +export interface SmsTemplateSimpleVO { + id: number + name: string + code: string +} + +// 查询短信模板精简列表 +export const getSimpleSmsTemplateList = () => { + return request.get({ url: '/system/sms-template/simple-list' }) +} // 查询短信模板列表 export const getSmsTemplatePage = (params: PageParam) => { return request.get({ url: '/system/sms-template/page', params }) diff --git a/src/views/iot/alert/config/AlertConfigForm.vue b/src/views/iot/alert/config/AlertConfigForm.vue index f5c938f37..b1381954f 100644 --- a/src/views/iot/alert/config/AlertConfigForm.vue +++ b/src/views/iot/alert/config/AlertConfigForm.vue @@ -11,12 +11,7 @@ - + @@ -83,6 +78,63 @@ /> + + + + + + + + + + + + + + +