|
|
|
|
@ -663,7 +663,7 @@ const buildTransferLabel = (item: any) => {
|
|
|
|
|
|
|
|
|
|
const loadConfigCandidatesByDevice = async (deviceId: number) => {
|
|
|
|
|
const data = await DeviceApi.getDeviceAttributeList(deviceId)
|
|
|
|
|
const list = (data?.list ?? data?.data ?? []) as any[]
|
|
|
|
|
const list = (data ?? []) as any[]
|
|
|
|
|
const deviceItems = (list ?? [])
|
|
|
|
|
.map((item: any) => {
|
|
|
|
|
const key = normalizeKey(item?.attributeId ?? item?.id)
|
|
|
|
|
@ -674,12 +674,7 @@ const loadConfigCandidatesByDevice = async (deviceId: number) => {
|
|
|
|
|
} as TransferItem
|
|
|
|
|
})
|
|
|
|
|
.filter((it: any) => it && typeof it.key === 'number') as TransferItem[]
|
|
|
|
|
const merged = new Map<number, TransferItem>()
|
|
|
|
|
for (const it of deviceItems) merged.set(it.key, it)
|
|
|
|
|
for (const it of configSelectedItems.value) {
|
|
|
|
|
if (!merged.has(it.key)) merged.set(it.key, it)
|
|
|
|
|
}
|
|
|
|
|
configCandidates.value = Array.from(merged.values())
|
|
|
|
|
configCandidates.value = deviceItems
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const openConfigDialog = async (recipeId: number | string) => {
|
|
|
|
|
|