Przeglądaj źródła

fix: 【IoT 物联网】修复枚举引入错误导致的数据流转页面报错

puhui999 5 miesięcy temu
rodzic
commit
e61971d002

+ 3 - 3
src/views/iot/rule/data/rule/components/SourceConfigForm.vue

@@ -108,7 +108,7 @@
 import { ProductApi } from '@/api/iot/product/product'
 import { DeviceApi } from '@/api/iot/device/device'
 import { ThingModelApi } from '@/api/iot/thingmodel'
-import { IotDeviceMessageMethodEnum, IotThingModelTypeEnum } from '@/views/iot/utils/constants'
+import { IotDeviceMessageMethodEnum, IoTThingModelTypeEnum } from '@/views/iot/utils/constants'
 
 const formData = ref<any[]>([])
 const productList = ref<any[]>([]) // 产品列表
@@ -149,9 +149,9 @@ const getThingModelOptions = (row: any) => {
   const thingModels: any[] = thingModelCache.value.get(row.productId) || []
   let filteredModels: any[] = []
   if (row.method === IotDeviceMessageMethodEnum.EVENT_POST.method) {
-    filteredModels = thingModels.filter((item: any) => item.type === IotThingModelTypeEnum.EVENT)
+    filteredModels = thingModels.filter((item: any) => item.type === IoTThingModelTypeEnum.EVENT)
   } else if (row.method === IotDeviceMessageMethodEnum.PROPERTY_POST.method) {
-    filteredModels = thingModels.filter((item: any) => item.type === IotThingModelTypeEnum.PROPERTY)
+    filteredModels = thingModels.filter((item: any) => item.type === IoTThingModelTypeEnum.PROPERTY)
   }
   return filteredModels.map((item: any) => ({
     label: `${item.name} (${item.identifier})`,