diff --git a/src/api/iot/device/device/index.ts b/src/api/iot/device/device/index.ts index 252ea433..b32eaf64 100644 --- a/src/api/iot/device/device/index.ts +++ b/src/api/iot/device/device/index.ts @@ -165,5 +165,16 @@ export const DeviceApi = { // 获取设备MQTT连接参数 getMqttConnectionParams: async (deviceId: number) => { return await request.get({ url: `/iot/device/mqtt-connection-params`, params: { deviceId } }) + }, + + // 根据ProductKey和DeviceNames获取设备列表 + getDevicesByProductKeyAndNames: async (productKey: string, deviceNames: string[]) => { + return await request.get({ + url: `/iot/device/get-by-product-key-and-names`, + params: { + productKey, + deviceNames: deviceNames.join(',') + } + }) } } diff --git a/src/api/iot/product/product/index.ts b/src/api/iot/product/product/index.ts index 496fb049..f03339d1 100644 --- a/src/api/iot/product/product/index.ts +++ b/src/api/iot/product/product/index.ts @@ -78,5 +78,10 @@ export const ProductApi = { // 查询产品(精简)列表 getSimpleProductList() { return request.get({ url: '/iot/product/simple-list' }) + }, + + // 根据ProductKey获取产品信息 + getProductByKey: async (productKey: string) => { + return await request.get({ url: `/iot/product/get-by-key`, params: { productKey } }) } } diff --git a/src/views/iot/rule/scene/components/action/ActionExecutor.vue b/src/views/iot/rule/scene/components/action/ActionExecutor.vue index c4433b60..3d9e4d4a 100644 --- a/src/views/iot/rule/scene/components/action/ActionExecutor.vue +++ b/src/views/iot/rule/scene/components/action/ActionExecutor.vue @@ -1,6 +1,6 @@