From e348632b5de0040e4df70e50c29c5d729fde1ece Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 6 Jul 2026 17:19:57 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E8=AE=BE=E5=A4=87=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=8F=82=E6=95=B0=E5=88=86=E6=9E=90-=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AE=BE=E5=A4=87=E6=A0=87=E8=AF=86/=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iot/deviceParamAnalysis/index.vue | 63 ++++++++++++++++++--- 1 file changed, 55 insertions(+), 8 deletions(-) diff --git a/src/views/iot/deviceParamAnalysis/index.vue b/src/views/iot/deviceParamAnalysis/index.vue index fdd2326a..2e3b6237 100644 --- a/src/views/iot/deviceParamAnalysis/index.vue +++ b/src/views/iot/deviceParamAnalysis/index.vue @@ -2,13 +2,19 @@ - +
+ + + + {{ t('DataCollection.DeviceParamAnalysis.refreshButtonText') }} + +
+ > + +
@@ -93,11 +106,13 @@ defineOptions({ name: 'DeviceParamAnalysis' }) const { t } = useI18n() type TreeNodeType = 'device' | 'param' +type TreeNodeTag = 'equipment' type DeviceTreeNode = { id: string label: string type: TreeNodeType + tag?: TreeNodeTag children?: DeviceTreeNode[] orgClass?: string deviceId?: number @@ -203,6 +218,14 @@ const handleKeywordChange = () => { }, 300) } +const handleTreeRefresh = async () => { + if (keywordTimer) { + window.clearTimeout(keywordTimer) + keywordTimer = undefined + } + await loadTree() +} + const toFiniteId = (value: any): number | undefined => { if (typeof value === 'number') return Number.isFinite(value) ? value : undefined if (typeof value === 'string') { @@ -300,6 +323,7 @@ const buildTreeFromApi = (orgs: ApiTreeOrg[]): DeviceTreeNode[] => { id: `equipment-${org.id}-${eq.id}`, label: eq?.name ?? String(eq?.id ?? ''), type: 'device', + tag: 'equipment', deviceId: toFiniteId(eq.id), paramCount: params.length, children: paramNodes.length ? paramNodes : undefined, @@ -695,6 +719,29 @@ onMounted(async () => { gap: 12px; } +.device-param-tree-toolbar { + display: flex; + align-items: center; + gap: 8px; +} + +.device-param-tree-toolbar__input { + flex: 1; + min-width: 0; +} + +.device-param-tree-node { + display: inline-flex; + align-items: center; + gap: 6px; + min-width: 0; +} + +.device-param-tree-node__label { + overflow: hidden; + text-overflow: ellipsis; +} + :deep(.el-tree) { max-height: calc(100vh - 280px); overflow: auto;