Pre Merge pull request !815 from puhui999/feature/iot

pull/815/MERGE
puhui999 2025-08-24 03:50:43 +00:00 committed by Gitee
commit a779ebd04d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -212,7 +212,7 @@
<span <span
class="text-[#0b1d30] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[130px]" class="text-[#0b1d30] inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap max-w-[130px]"
> >
{{ item.deviceName || '-' }} {{ item.nickname || item.deviceName }}
</span> </span>
</div> </div>
</div> </div>

View File

@ -108,7 +108,7 @@
import { ProductApi } from '@/api/iot/product/product' import { ProductApi } from '@/api/iot/product/product'
import { DeviceApi } from '@/api/iot/device/device' import { DeviceApi } from '@/api/iot/device/device'
import { ThingModelApi } from '@/api/iot/thingmodel' 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 formData = ref<any[]>([])
const productList = ref<any[]>([]) // const productList = ref<any[]>([]) //
@ -149,9 +149,9 @@ const getThingModelOptions = (row: any) => {
const thingModels: any[] = thingModelCache.value.get(row.productId) || [] const thingModels: any[] = thingModelCache.value.get(row.productId) || []
let filteredModels: any[] = [] let filteredModels: any[] = []
if (row.method === IotDeviceMessageMethodEnum.EVENT_POST.method) { 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) { } 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) => ({ return filteredModels.map((item: any) => ({
label: `${item.name} (${item.identifier})`, label: `${item.name} (${item.identifier})`,