【代码评审】IoT:场景联动的 review
This commit is contained in:
@@ -162,12 +162,13 @@ export const DeviceApi = {
|
||||
return await request.get({ url: `/iot/device/log/page`, params })
|
||||
},
|
||||
|
||||
// 获取设备MQTT连接参数
|
||||
// 获取设备 MQTT 连接参数
|
||||
getMqttConnectionParams: async (deviceId: number) => {
|
||||
return await request.get({ url: `/iot/device/mqtt-connection-params`, params: { deviceId } })
|
||||
},
|
||||
|
||||
// 根据ProductKey和DeviceNames获取设备列表
|
||||
// 根据 ProductKey 和 DeviceNames 获取设备列表
|
||||
// TODO @puhui999:getDeviceListByProductKeyAndNames 哈。项目的风格统一~
|
||||
getDevicesByProductKeyAndNames: async (productKey: string, deviceNames: string[]) => {
|
||||
return await request.get({
|
||||
url: `/iot/device/list-by-product-key-and-names`,
|
||||
|
||||
@@ -79,8 +79,8 @@ export const ProductApi = {
|
||||
getSimpleProductList() {
|
||||
return request.get({ url: '/iot/product/simple-list' })
|
||||
},
|
||||
|
||||
// 根据ProductKey获取产品信息
|
||||
|
||||
// 根据 ProductKey 获取产品信息
|
||||
getProductByKey: async (productKey: string) => {
|
||||
return await request.get({ url: `/iot/product/get-by-key`, params: { productKey } })
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ export const DataBridgeApi = {
|
||||
},
|
||||
|
||||
// 查询数据桥梁(精简)列表
|
||||
// TODO @puhui999:getDataBridgeSimpleList 哈。项目的风格统一~ 之前有几个,我写错了。。。
|
||||
getSimpleDataBridgeList() {
|
||||
return request.get({ url: '/iot/data-bridge/simple-list' })
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ interface ActionAlert {
|
||||
|
||||
// 执行器配置
|
||||
interface ActionConfig {
|
||||
key: any // 解决组件索引重用
|
||||
key: any // 解决组件索引重用 TODO @puhui999:看看有没更好的解决方案呢。
|
||||
type: number // 执行类型
|
||||
deviceControl?: ActionDeviceControl // 设备控制
|
||||
alert?: ActionAlert // 告警执行
|
||||
|
||||
Reference in New Issue
Block a user