From 4689c339a24436b99bd8be105bd2ee524c50b1bc Mon Sep 17 00:00:00 2001 From: fuguobin Date: Wed, 6 Mar 2024 15:58:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9B=91=E6=8E=A7=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.ts | 4 ++-- src/types/components.d.ts | 1 - src/views/data-visual/index.scss | 6 +++--- src/views/data-visual/index.vue | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/permission.ts b/src/permission.ts index 11876cf..1bee866 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -54,8 +54,8 @@ router.beforeEach(async (to, from, next) => { //登录后连接webSocket const userStorageInfo = sessionStorage.getItem('userInfo'); const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo); - // const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址 - const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址 + const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址 + // const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址 socket.initialize(wsUrl); next({ ...to, replace: true }); } catch (error) { diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 6fa5559..12b6d56 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -57,7 +57,6 @@ declare module '@vue/runtime-core' { NInputNumber: typeof import('naive-ui')['NInputNumber'] NMenu: typeof import('naive-ui')['NMenu'] NModal: typeof import('naive-ui')['NModal'] - NNumberAnimation: typeof import('naive-ui')['NNumberAnimation'] NScrollbar: typeof import('naive-ui')['NScrollbar'] NSpin: typeof import('naive-ui')['NSpin'] NSwitch: typeof import('naive-ui')['NSwitch'] diff --git a/src/views/data-visual/index.scss b/src/views/data-visual/index.scss index 837f4f0..8cc0c9c 100644 --- a/src/views/data-visual/index.scss +++ b/src/views/data-visual/index.scss @@ -1,8 +1,8 @@ @import url('@/assets/fonts/font.css'); .screenContainer { - // position: fixed; - // left: 50%; - // top: 50%; + position: fixed; + left: 50%; + top: 50%; transform-origin: 0 0; transition: 0.3s; color: #fff; diff --git a/src/views/data-visual/index.vue b/src/views/data-visual/index.vue index 7a2d253..9d85f2b 100644 --- a/src/views/data-visual/index.vue +++ b/src/views/data-visual/index.vue @@ -32,11 +32,11 @@ const baseHeight = 1440; // * 需保持的比例(默认32:9) const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5)); onMounted(() => { - // calcRate(); + calcRate(); }); window.addEventListener('resize', () => { // 监听窗口改变,改变后重新获取 - // resize(); + resize(); }); function calcRate() { const appRef = screenRef.value;