Pre Merge pull request !815 from puhui999/feature/iot
commit
a779ebd04d
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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})`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue