From dd4372ed9b039328c387f638b5fe396efc8d11f5 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Fri, 2 Aug 2024 15:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=8E=A7-tab?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=BB=91=E5=AE=9Aactive=E5=80=BC=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/govern/device/control/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/govern/device/control/index.vue b/src/views/govern/device/control/index.vue index ee33792..04cb3b3 100644 --- a/src/views/govern/device/control/index.vue +++ b/src/views/govern/device/control/index.vue @@ -416,9 +416,11 @@ const eventRef: any = ref() const timer: any = ref() //tab点击事件 const handleClick = async (tab?: any) => { - let activeName = '' - activeName = tab?.props.name ? tab?.props.name : deviceData.value.dataSetList[0].id - dataSet.value = activeName + //点击tab时更新dataSet最新值 + if(tab&&tab.props&&tab.props.name&&dataSet.value!=tab.props.name){ + dataSet.value = tab.props.name + } + tableLoading.value = true //初始化点击tab隐藏实时录波、实时趋势、谐波频谱按钮 realTimeFlag.value = false