Merge pull request 'fix : 切换站点当无隧道时提示' (#275) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/275
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user