diff --git a/src/views/iot/deviceParamAnalysis/index.vue b/src/views/iot/deviceParamAnalysis/index.vue index 74226294..493a93ac 100644 --- a/src/views/iot/deviceParamAnalysis/index.vue +++ b/src/views/iot/deviceParamAnalysis/index.vue @@ -4,8 +4,7 @@
-
@@ -15,8 +14,7 @@ ref="treeRef" v-loading="treeLoading" :data="treeData" :props="treeProps" node-k - @@ -409,8 +407,10 @@ const handleTreeNodeClick = async (data: DeviceTreeNode) => { return } + + const isEmptyOrgNode = typeof data?.id === 'string' && data.id.startsWith('org-') const isEquipmentNode = typeof data?.id === 'string' && data.id.startsWith('equipment-') - if (isEquipmentNode && (data.paramCount ?? 0) <= 0) { + if (isEquipmentNode && (data.paramCount ?? 0) <= 0 || isEmptyOrgNode) { selectedParam.value = data selectedDeviceId.value = undefined selectedModelId.value = undefined