From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/api/iot/alert/config/index.ts | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/src/api/iot/alert/config/index.ts b/src/api/iot/alert/config/index.ts
new file mode 100644
index 0000000..e3ddc2a
--- /dev/null
+++ b/src/api/iot/alert/config/index.ts
@@ -0,0 +1,46 @@
+import request from '@/config/axios'
+
+/** IoT 鍛婅閰嶇疆淇℃伅 */
+export interface AlertConfig {
+ id: number // 閰嶇疆缂栧彿
+ name?: string // 閰嶇疆鍚嶇О
+ description: string // 閰嶇疆鎻忚堪
+ level?: number // 鍛婅绾у埆
+ status?: number // 閰嶇疆鐘舵��
+ sceneRuleIds: string // 鍏宠仈鐨勫満鏅仈鍔ㄨ鍒欑紪鍙锋暟缁�
+ receiveUserIds: string // 鎺ユ敹鐨勭敤鎴风紪鍙锋暟缁�
+ receiveTypes: string // 鎺ユ敹鐨勭被鍨嬫暟缁�
+}
+
+// IoT 鍛婅閰嶇疆 API
+export const AlertConfigApi = {
+ // 鏌ヨ鍛婅閰嶇疆鍒嗛〉
+ getAlertConfigPage: async (params: any) => {
+ return await request.get({ url: `/iot/alert-config/page`, params })
+ },
+
+ // 鏌ヨ鍛婅閰嶇疆璇︽儏
+ getAlertConfig: async (id: number) => {
+ return await request.get({ url: `/iot/alert-config/get?id=` + id })
+ },
+
+ // 鏂板鍛婅閰嶇疆
+ createAlertConfig: async (data: AlertConfig) => {
+ return await request.post({ url: `/iot/alert-config/create`, data })
+ },
+
+ // 淇敼鍛婅閰嶇疆
+ updateAlertConfig: async (data: AlertConfig) => {
+ return await request.put({ url: `/iot/alert-config/update`, data })
+ },
+
+ // 鍒犻櫎鍛婅閰嶇疆
+ deleteAlertConfig: async (id: number) => {
+ return await request.delete({ url: `/iot/alert-config/delete?id=` + id })
+ },
+
+ // 鑾峰彇鍛婅閰嶇疆绠�鍗曞垪琛�
+ getSimpleAlertConfigList: async () => {
+ return await request.get({ url: `/iot/alert-config/simple-list` })
+ }
+}
--
Gitblit v1.8.0