From caab65d0e481c72ede79b286b065e3a8067fe82d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 27 Jun 2025 23:45:37 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90IoT=20=E7=89=A9=E8=81=94?= =?UTF-8?q?=E7=BD=91=E3=80=91=E5=AE=8C=E5=96=84=E5=91=8A=E8=AD=A6=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E5=8D=95=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E8=81=94=E5=8A=A8=E8=A7=84=E5=88=99=E5=92=8C=E6=8E=A5?= =?UTF-8?q?=E6=94=B6=E7=94=A8=E6=88=B7=E7=9A=84=E9=80=89=E6=8B=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/rule/scene/index.ts | 5 + src/utils/dict.ts | 3 +- .../iot/alert/config/AlertConfigForm.vue | 105 +++++++++++++++--- src/views/iot/alert/config/index.vue | 24 +++- 4 files changed, 114 insertions(+), 23 deletions(-) diff --git a/src/api/iot/rule/scene/index.ts b/src/api/iot/rule/scene/index.ts index 7cbb438b7..9789e275b 100644 --- a/src/api/iot/rule/scene/index.ts +++ b/src/api/iot/rule/scene/index.ts @@ -26,5 +26,10 @@ export const RuleSceneApi = { // 删除场景联动 deleteRuleScene: async (id: number) => { return await request.delete({ url: `/iot/rule-scene/delete?id=` + id }) + }, + + // 获取场景联动简单列表 + getSimpleRuleSceneList: async () => { + return await request.get({ url: `/iot/rule-scene/simple-list` }) } } diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 202c5335e..aa7176931 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -240,5 +240,6 @@ export enum DICT_TYPE { IOT_DATA_SINK_TYPE_ENUM = 'iot_data_sink_type_enum', // IoT 数据流转目的类型 IOT_RULE_SCENE_TRIGGER_TYPE_ENUM = 'iot_rule_scene_trigger_type_enum', // IoT 场景流转的触发类型枚举 IOT_RULE_SCENE_ACTION_TYPE_ENUM = 'iot_rule_scene_action_type_enum', // IoT 规则场景的触发类型枚举 - IOT_ALERT_LEVEL = 'iot_alert_level' // IoT 告警级别 + IOT_ALERT_LEVEL = 'iot_alert_level', // IoT 告警级别 + IOT_ALERT_RECEIVE_TYPE = 'iot_alert_receive_type' // IoT 告警接收类型 } diff --git a/src/views/iot/alert/config/AlertConfigForm.vue b/src/views/iot/alert/config/AlertConfigForm.vue index b53856e2e..bece0fffb 100644 --- a/src/views/iot/alert/config/AlertConfigForm.vue +++ b/src/views/iot/alert/config/AlertConfigForm.vue @@ -4,17 +4,24 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="100px" + label-width="140px" v-loading="formLoading" > - + - + + + @@ -26,14 +33,50 @@ /> - - + + + + - - + + + + - - + + + +