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;