【功能新增】IoT: 规则场景基础 CRUD

This commit is contained in:
puhui999
2025-03-18 17:37:58 +08:00
parent e29d6f910a
commit 477b2439c5
5 changed files with 1962 additions and 1309 deletions

View File

@ -0,0 +1,39 @@
import request from '@/config/axios'
// IoT 规则场景(场景联动) VO
export interface RuleSceneVO {
id: number // 场景编号
name: string // 场景名称
description: string // 场景描述
status: number // 场景状态
triggers: string // 触发器数组
actions: string // 执行器数组
}
// IoT 规则场景(场景联动) API
export const RuleSceneApi = {
// 查询规则场景(场景联动)分页
getRuleScenePage: async (params: any) => {
return await request.get({ url: `/iot/rule-scene/page`, params })
},
// 查询规则场景(场景联动)详情
getRuleScene: async (id: number) => {
return await request.get({ url: `/iot/rule-scene/get?id=` + id })
},
// 新增规则场景(场景联动)
createRuleScene: async (data: RuleSceneVO) => {
return await request.post({ url: `/iot/rule-scene/create`, data })
},
// 修改规则场景(场景联动)
updateRuleScene: async (data: RuleSceneVO) => {
return await request.put({ url: `/iot/rule-scene/update`, data })
},
// 删除规则场景(场景联动)
deleteRuleScene: async (id: number) => {
return await request.delete({ url: `/iot/rule-scene/delete?id=` + id })
}
}