From 0743d372c2a96cb04ee8ea8061b2592fe5885569 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 21 Mar 2025 17:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91IoT:=20=E8=8E=B7=E5=8F=96=E4=BA=A7=E5=93=81=E7=89=A9?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=20TSL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/thingmodel/index.ts | 7 ++-- .../rule/scene/components/DeviceListener.vue | 41 +++++++++++++++---- .../components/DeviceListenerCondition.vue | 20 +++++---- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/src/api/iot/thingmodel/index.ts b/src/api/iot/thingmodel/index.ts index 5deaaad5b..df188c43c 100644 --- a/src/api/iot/thingmodel/index.ts +++ b/src/api/iot/thingmodel/index.ts @@ -58,11 +58,10 @@ export const ThingModelApi = { return await request.get({ url: `/iot/thing-model/list`, params }) }, - // 获得产品物模型 - getThingModelListByProductId: async (params: any) => { + // 获得产品物模型 TSL + getThingModelTSLByProductId: async (productId: number) => { return await request.get({ - url: `/iot/thing-model/list-by-product-id`, - params + url: `/iot/thing-model/tsl-by-product-id?productId=${productId}` }) }, diff --git a/src/views/iot/rule/scene/components/DeviceListener.vue b/src/views/iot/rule/scene/components/DeviceListener.vue index 3a948c432..dbca1c9ee 100644 --- a/src/views/iot/rule/scene/components/DeviceListener.vue +++ b/src/views/iot/rule/scene/components/DeviceListener.vue @@ -44,12 +44,15 @@ >
- + + + + + + + + +
@@ -57,6 +60,7 @@ v-for="(parameter, index2) in condition.parameters" :key="index2" :model-value="parameter" + :thingModels="thingModels(condition)" @update:model-value="(val) => (condition.parameters[index2] = val)" class="mb-10px last:mb-0" > @@ -107,11 +111,12 @@