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