From 59aa2a92d14c76a603f9c52703bc81266be9069c Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 27 Feb 2024 17:07:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E5=88=87=E6=8D=A2=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E5=BD=93=E6=97=A0=E9=9A=A7=E9=81=93=E6=97=B6=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tunnel/index.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/tunnel/index.vue b/src/views/tunnel/index.vue index 99296be..d4b3a97 100644 --- a/src/views/tunnel/index.vue +++ b/src/views/tunnel/index.vue @@ -257,9 +257,14 @@ const getScreenInfo = (id) => { const getTunnel = (id) => { getTunnelBySiteId(id).then((res) => { if (res?.code === 1000) { - getScreenInfo(res.data[0]?.value) - tunnelName = res.data[0].label - tunnelList.value = res.data + if(res.data.length === 0){ + ElMessage.warning('该站点下无隧道, 请新增隧道后再尝试!') + tunnelList.value = [] + }else { + getScreenInfo(res.data[0]?.value) + tunnelName = res.data[0].label + tunnelList.value = res.data + } } }); }