From 831e7ee987ff4196c634ffbd9cce7fc85b32552f Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 19 Nov 2024 17:02:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A5=E5=85=B7ipfer=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=AE=A2=E6=88=B7=E7=AB=AFhost=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/iperf/index.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/views/tool/iperf/index.vue b/src/views/tool/iperf/index.vue index 8a0d95a8..389a3975 100644 --- a/src/views/tool/iperf/index.vue +++ b/src/views/tool/iperf/index.vue @@ -63,7 +63,11 @@ async function fnIPerf3() { }); return; } - if (state.dataType === 'options' && state.data.host === '') { + if ( + state.dataType === 'options' && + state.data.client && + state.data.host === '' + ) { message.warning({ content: 'Please fill in the Host', duration: 2, @@ -77,9 +81,12 @@ async function fnIPerf3() { }); return; } - if (state.initialized) { - fnResend(); - return; + + // 网元切换时重置 + if (neType !== state.params.neType || neId !== state.params.neId) { + state.initialized = false; + state.params.neType = neType; + state.params.neId = neId; } state.params.neType = neType; @@ -95,6 +102,12 @@ async function fnIPerf3() { } else { state.versionInfo = resVersion.data; } + + // 初始化的直接重发 + if (state.initialized) { + fnResend(); + return; + } state.initialized = true; }