fix : 修改ws切换bug
This commit is contained in:
@@ -165,7 +165,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { getUserInfo } from "@/api/login";
|
||||
import { initSceneData } from "@/api/tunnelScene";
|
||||
import { getTunnelList } from "@/api/tunnelManage";
|
||||
|
||||
import { debounce, throttle } from 'lodash'
|
||||
const authStore = useAuthStore();
|
||||
const router = useRouter();
|
||||
const previewId = reactive(router.currentRoute.value.params.tunnelId)
|
||||
@@ -262,7 +262,6 @@ onMounted(() => {
|
||||
nextTick(() => {
|
||||
showFan.value = true;
|
||||
});
|
||||
|
||||
});
|
||||
const changeName = (id) => {
|
||||
for (let item of equipmentOption.value) {
|
||||
@@ -504,6 +503,7 @@ const changeTunnel = (e) => {
|
||||
|
||||
}
|
||||
const manageSelect = (index) => {
|
||||
socket.close()
|
||||
if (index === '站点管理') {
|
||||
if (currentUserId.value) {
|
||||
router.push("/site/" + currentUserId.value + '/' + currentSiteId.value);
|
||||
@@ -518,7 +518,7 @@ const manageSelect = (index) => {
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleChangeSite = (item) => {
|
||||
const handleChangeSite = debounce((item) => {
|
||||
socket.close()
|
||||
currentSite.value = item.label
|
||||
currentSiteId.value = item.value
|
||||
@@ -536,7 +536,7 @@ const handleChangeSite = (item) => {
|
||||
nextTick(() => {
|
||||
showTunnelTitle.value = true
|
||||
});
|
||||
}
|
||||
},1000)
|
||||
const closeLeft = () => {
|
||||
drawerLeft.value = !drawerLeft.value;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user