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 @@