fix : 修复预览隧道时切换报错bug
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<div v-else class="shrink-right" @click="closeRight"></div>
|
||||
</div>
|
||||
<div class="switch-btn">
|
||||
<div class="arrow" @click="previousBtn"></div>
|
||||
<div class="arrow" @click="previousBtn"></div>{{initialIndex}}
|
||||
<el-carousel height="150px" type="card" ref="tunnelBtn" :autoplay="false" :initial-index="initialIndex"
|
||||
@change="changeTunnel">
|
||||
<div class="btn">
|
||||
@@ -113,7 +113,6 @@
|
||||
<el-table-column prop="alarmTime" label="告警时间" align="center" width="480px" />
|
||||
<el-table-column prop="lookupStatus" label="查阅状态" align="center" width="200px"
|
||||
v-if="roleKey !== 'administrator'">
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag :type="scope.row.lookupStatus ? 'success' : 'warning'">{{ scope.row.lookupStatus ? '已读' : '未读' }}
|
||||
</el-tag>
|
||||
@@ -485,7 +484,10 @@ const getTunnel = (id) => {
|
||||
});
|
||||
}
|
||||
const changeTunnel = (e) => {
|
||||
socket.close()
|
||||
console.info("🚀 ~method:'socket' -----", socket)
|
||||
if(socket){
|
||||
socket.close()
|
||||
}
|
||||
let newObj = {}
|
||||
tunnelList.value.forEach((item, index) => {
|
||||
if (index === e) {
|
||||
@@ -519,10 +521,14 @@ const manageSelect = (index) => {
|
||||
router.push("/user/" + localStorage.getItem('currentSiteId'));
|
||||
}
|
||||
}
|
||||
socket.close()
|
||||
if(socket){
|
||||
socket.close()
|
||||
}
|
||||
};
|
||||
const handleChangeSite = debounce((item) => {
|
||||
socket.close()
|
||||
if(socket){
|
||||
socket.close()
|
||||
}
|
||||
currentSite.value = item.label
|
||||
currentSiteId.value = item.value
|
||||
getTunnel(item.value)
|
||||
|
||||
Reference in New Issue
Block a user